[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:
@@ -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"')
|
||||
|
||||
Reference in New Issue
Block a user