diff --git a/addons/point_of_sale/tests/test_point_of_sale_flow.py b/addons/point_of_sale/tests/test_point_of_sale_flow.py index 976dbe5c081..7646d0c0c13 100644 --- a/addons/point_of_sale/tests/test_point_of_sale_flow.py +++ b/addons/point_of_sale/tests/test_point_of_sale_flow.py @@ -356,12 +356,13 @@ class TestPointOfSaleFlow(TestPointOfSaleCommon): self.assertFalse(self.pos_order_pos1.invoice_id, 'Invoice should not be attached to order.') # I generate an invoice from the order - self.invoice = self.pos_order_pos1.action_pos_order_invoice() + res = self.pos_order_pos1.action_pos_order_invoice() + self.assertIn('res_id', res, "No invoice created") # I test that the total of the attached invoice is correct - self.amount_total = self.pos_order_pos1.amount_total + invoice = self.env['account.invoice'].browse(res['res_id']) self.assertEqual( - float_compare(self.amount_total, 1752.75, precision_digits=2), 0, "Invoice not correct") + float_compare(invoice.amount_total, 1752.75, precision_digits=2), 0, "Invoice not correct") """In order to test the reports on Bank Statement defined in point_of_sale module, I create a bank statement line, confirm it and print the reports"""