diff --git a/addons/purchase/tests/test_purchase_order.py b/addons/purchase/tests/test_purchase_order.py index 2c9a8dc5828..88848cfcdb1 100644 --- a/addons/purchase/tests/test_purchase_order.py +++ b/addons/purchase/tests/test_purchase_order.py @@ -79,7 +79,7 @@ class TestPurchaseOrder(AccountingTestCase): self.invoice = self.AccountInvoice.create({ 'partner_id': self.partner_id.id, 'purchase_id': self.po.id, - 'account_id': self.AccountInvoiceLine.get_invoice_line_account('in_invoice', self.product_id_1, self.po.fiscal_position_id, self.env.user.company_id).id, + 'account_id': self.partner_id.property_account_payable_id.id, }) self.invoice.purchase_order_change() self.assertEqual(self.po.order_line.mapped('qty_invoiced'), [5.0, 5.0], 'Purchase: all products should be invoiced"')