From cc46bf97a4e1bd438d170c36d53abd0bef1e3040 Mon Sep 17 00:00:00 2001 From: Nhomar Hernandez Date: Sun, 30 Sep 2018 08:09:48 +0000 Subject: [PATCH] [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 --- addons/sale/tests/test_sale_to_invoice_and_to_be_invoiced.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/tests/test_sale_to_invoice_and_to_be_invoiced.py b/addons/sale/tests/test_sale_to_invoice_and_to_be_invoiced.py index cc4f9cfa438..b5a28a435d3 100644 --- a/addons/sale/tests/test_sale_to_invoice_and_to_be_invoiced.py +++ b/addons/sale/tests/test_sale_to_invoice_and_to_be_invoiced.py @@ -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.')