[FIX] sale: Call the proper method in the test and not the partial one.
With this we can test the invoices properlly in other environments where we do not depend on sale due to the fact of this incorrectly set test we hade collateral damage in the localizationsfor example (also related to doesn't have a new created field called correctly in invoice_open and the method action_date_assign was not called propperly. With this fix we do not need to make defensive programming in the localizations in order to allow us to test it properlly. closes odoo/odoo#27316
This commit is contained in:
@@ -71,7 +71,7 @@ class TestSaleOrderInvoicing(AccountingTestCase):
|
||||
self.assertEqual(sum(order.order_line.mapped('amt_invoiced')), 0.0, 'Sale: the Amount Invoiced for the sale order should be 0.0.')
|
||||
|
||||
# Now I validate invoice_1.
|
||||
invoice_1.invoice_validate()
|
||||
invoice_1.action_invoice_open()
|
||||
|
||||
self.assertEqual(sum(order.order_line.mapped('amt_to_invoice')), 300.0, 'Sale: the Amount To Invoice for the sale order should be 300.0.')
|
||||
self.assertEqual(sum(order.order_line.mapped('amt_invoiced')), 500.0, 'Sale: the Amount Invoiced for the sale order should be 500.0.')
|
||||
|
||||
Reference in New Issue
Block a user