[IMP] broaden scope of search of bank statement reconciliation candidates
Looking for accounts with reconcile=True is enough. Restricting on payable/receivable account types narrows the search to much and makes it difficult to implement transfer account holding the payment while they are in transit at the bank.
This commit is contained in:
parent
c21f26ac35
commit
ae742db21d
|
@ -587,13 +587,9 @@ class account_bank_statement_line(osv.osv):
|
|||
mv_line_pool = self.pool.get('account.move.line')
|
||||
|
||||
# Make domain
|
||||
domain = additional_domain + [('reconcile_id', '=', False), ('state', '=', 'valid')]
|
||||
domain = additional_domain + [('reconcile_id', '=', False), ('state', '=', 'valid'), ('account_id.reconcile', '=', True)]
|
||||
if st_line.partner_id.id:
|
||||
domain += [('partner_id', '=', st_line.partner_id.id),
|
||||
'|', ('account_id.type', '=', 'receivable'),
|
||||
('account_id.type', '=', 'payable')]
|
||||
else:
|
||||
domain += [('account_id.reconcile', '=', True), ('account_id.type', '=', 'other')]
|
||||
domain += [('partner_id', '=', st_line.partner_id.id)]
|
||||
if excluded_ids:
|
||||
domain.append(('id', 'not in', excluded_ids))
|
||||
if str:
|
||||
|
|
Loading…
Reference in New Issue