the transaction id is copied only on account move lines having the same account than the invoice's one (the payable / receivable)
parent
11951edebf
commit
2fb34c240d
|
@ -42,7 +42,9 @@ class AccountInvoice(Model):
|
||||||
|
|
||||||
def finalize_invoice_move_lines(self, cr, uid, invoice_browse, move_lines):
|
def finalize_invoice_move_lines(self, cr, uid, invoice_browse, move_lines):
|
||||||
if invoice_browse.transaction_id:
|
if invoice_browse.transaction_id:
|
||||||
|
invoice_account_id = invoice_browse.account_id.id
|
||||||
for line in move_lines:
|
for line in move_lines:
|
||||||
# tuple (0, 0, {values})
|
# tuple (0, 0, {values})
|
||||||
line[2]['transaction_ref'] = invoice_browse.transaction_id
|
if invoice_account_id == line[2]['account_id']:
|
||||||
|
line[2]['transaction_ref'] = invoice_browse.transaction_id
|
||||||
return move_lines
|
return move_lines
|
||||||
|
|
Loading…
Reference in New Issue