[FIX] account_move_transactionid_import: set the account from partner

pull/271/head
sebalix 2019-08-05 15:46:14 +02:00 committed by Yannick Vaucher
parent 99825230fe
commit 9866bc63a3
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ class AccountMoveCompletionRule(models.Model):
_('Line named "%s" was matched by more than '
'one partner.') % line.name)
if len(sales) == 1:
res['partner_id'] = sales[0].partner_id.id
partner = sales[0].partner_id
res['partner_id'] = partner.id
res['account_id'] = partner.property_account_receivable_id.id
return res
def get_from_transaction_id_and_invoice(self, line):