Correction cron faircot
This commit is contained in:
@@ -258,6 +258,17 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
line.compute_unit_price(),
|
||||
Decimal('123.45'))
|
||||
|
||||
def test_sale_line_linked_unit_factor_keeps_currency_factor_without_product(self):
|
||||
'linked price conversion does not crash when automation builds a sale line before setting product'
|
||||
SaleLine = Pool().get('sale.line')
|
||||
line = SaleLine()
|
||||
line.enable_linked_currency = True
|
||||
line.linked_currency = Mock(factor=Decimal('2'))
|
||||
line.linked_unit = Mock()
|
||||
line.unit = None
|
||||
|
||||
self.assertEqual(line._get_linked_unit_factor(), Decimal('2'))
|
||||
|
||||
def test_purchase_line_default_pricing_rule_comes_from_configuration(self):
|
||||
'purchase line pricing_rule defaults to the purchase_trade singleton value'
|
||||
PurchaseLine = Pool().get('purchase.line')
|
||||
|
||||
Reference in New Issue
Block a user