mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] account_statement_base_complestion - use invoice commercial_partner_id instead of partner
This commit is contained in:
@@ -178,7 +178,15 @@ class AccountStatementCompletionRule(orm.Model):
|
||||
res = {}
|
||||
inv = self._find_invoice(cr, uid, line, inv_type, context=context)
|
||||
if inv:
|
||||
res = {'partner_id': inv.partner_id.id,
|
||||
# FIXME use only commercial_partner_id of invoice in 7.1
|
||||
# this is for backward compatibility in 7.0 before
|
||||
# the refactoring of res.partner
|
||||
if hasattr(inv, 'commercial_partner_id'):
|
||||
partner_id = inv.commercial_partner_id.id
|
||||
else:
|
||||
partner_id = inv.partner_id.id
|
||||
|
||||
res = {'partner_id': partner_id,
|
||||
'account_id': inv.account_id.id,
|
||||
'type': inv_type}
|
||||
override_acc = line['master_account_id']
|
||||
|
||||
Reference in New Issue
Block a user