[FIX] account: bank statement reconciliation
To determine the account.move.line to reconcile, first it tries to match with the ref and the amount of the account.bank.statement.line and if it doesn't match, it just tries to match with the amount. opw:643867
This commit is contained in:
parent
1ab007a843
commit
72ec0050b4
|
@ -572,7 +572,11 @@ class account_bank_statement_line(osv.osv):
|
|||
|
||||
# Look for a matching amount
|
||||
domain_exact_amount = domain + [(amount_field, '=', float_round(sign * amount, precision_digits=precision_digits))]
|
||||
match_id = self.get_move_lines_for_reconciliation(cr, uid, st_line, excluded_ids=excluded_ids, offset=0, limit=2, additional_domain=domain_exact_amount)
|
||||
domain_exact_amount_ref = domain_exact_amount + [('ref', '=', st_line.ref)]
|
||||
match_id = self.get_move_lines_for_reconciliation(cr, uid, st_line, excluded_ids=excluded_ids, offset=0, limit=2, additional_domain=domain_exact_amount_ref)
|
||||
if not match_id:
|
||||
match_id = self.get_move_lines_for_reconciliation(cr, uid, st_line, excluded_ids=excluded_ids, offset=0, limit=2, additional_domain=domain_exact_amount)
|
||||
|
||||
if match_id and len(match_id) == 1:
|
||||
return match_id
|
||||
|
||||
|
|
Loading…
Reference in New Issue