From ea06c3550e2b817c99de9aeda5c4929fb7969291 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Fri, 9 Oct 2015 23:08:13 +0200 Subject: [PATCH] [FIX] purchase: fixed wrong test. The account on vendor bill should be the payable account of the partner, not the expense account of the product --- addons/purchase/tests/test_purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"')