[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

This commit is contained in:
qdp-odoo
2015-10-09 23:10:42 +02:00
parent 80e050f306
commit ea06c3550e
+1 -1
View File
@@ -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"')