02.04.26
This commit is contained in:
@@ -333,8 +333,8 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
|
||||
self.assertEqual(invoice.report_net, Decimal('800'))
|
||||
|
||||
def test_invoice_report_nb_bale_uses_linked_lot_packaging(self):
|
||||
'invoice reports packaging from linked physical lots with signed prorata'
|
||||
def test_invoice_report_nb_bale_uses_linked_lot_quantity_only(self):
|
||||
'invoice reports packaging from linked physical lots using lot_qt only'
|
||||
Invoice = Pool().get('account.invoice')
|
||||
|
||||
line = Mock(type='line', quantity=Decimal('-15'))
|
||||
@@ -353,17 +353,11 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
||||
)
|
||||
sale_line.lots = [lot]
|
||||
sale = Mock(lines=[sale_line])
|
||||
uom_model = Mock()
|
||||
uom_model.compute_qty.return_value = Decimal('2000')
|
||||
invoice = Invoice()
|
||||
invoice.sales = [sale]
|
||||
invoice.lines = [line]
|
||||
|
||||
with patch(
|
||||
'trytond.modules.purchase_trade.invoice.Pool'
|
||||
) as PoolMock:
|
||||
PoolMock.return_value.get.return_value = uom_model
|
||||
self.assertEqual(invoice.report_nb_bale, 'NB BALES: -5')
|
||||
self.assertEqual(invoice.report_nb_bale, 'NB BALES: 700')
|
||||
|
||||
def test_invoice_report_positive_rate_lines_keep_positive_components(self):
|
||||
'invoice final note pricing section keeps only positive component lines'
|
||||
|
||||
Reference in New Issue
Block a user