diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index db16d61e24ebd51fc72ed94d0c46cc54bb5c9b26..afdd18cbeb860db8565164c9d11759d849115cc3 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -480,7 +480,9 @@ class AccountInvoice(models.Model): else: account_id = pay_account.id payment_term_id = p.property_supplier_payment_term_id.id - fiscal_position = p.property_account_position_id.id + addr = self.partner_id.address_get(['delivery']) + fiscal_position = self.env['account.fiscal.position'].get_fiscal_position(self.partner_id.id, delivery_id=addr['delivery']) + bank_id = p.bank_ids and p.bank_ids.ids[0] or False # If partner has no warning, check its company