mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
wrong variable name, copy the invoice's move ref in statement line's ref
This commit is contained in:
@@ -106,13 +106,17 @@ class AccountStatementCompletionRule(Model):
|
||||
[('transaction_id', '=', st_line['transaction_id'])],
|
||||
context=context)
|
||||
if len(invoice_id) > 1:
|
||||
raise ErrorTooManyPartner(_('Line named "%s" (Ref:%s) was matched by more than '
|
||||
raise ErrorTooManyPartner(
|
||||
_('Line named "%s" (Ref:%s) was matched by more than '
|
||||
'one partner.') % (st_line['name'], st_line['ref']))
|
||||
if len(so_id) == 1:
|
||||
invoice = invoice_obj.browse(cr, uid, invoice_id[0], context=context)
|
||||
elif len(invoice_id) == 1:
|
||||
invoice = invoice_obj.browse(cr, uid, invoice_id[0],
|
||||
context=context)
|
||||
res['partner_id'] = invoice.partner_id.id
|
||||
# TODO: should have the same ref than the invoice's move
|
||||
# res['ref'] = invoice.ref
|
||||
# should have the same ref than the invoice's move
|
||||
# what TODO if the invoice is no yet validated
|
||||
if invoice.move_id:
|
||||
res['ref'] = invoice.move_id.ref
|
||||
st_vals = st_obj.get_values_for_line(
|
||||
cr, uid,
|
||||
profile_id=st_line['profile_id'],
|
||||
|
||||
Reference in New Issue
Block a user