Merge pull request #10 from hbrunn/7.0_id_match_with_partner_id

[FIX]  account_banking: only match references when partners match (if any)
This commit is contained in:
Pedro M. Baeza
2014-08-31 18:14:40 +02:00

View File

@@ -267,7 +267,9 @@ class banking_import_transaction(orm.Model):
convert.str2date(x.invoice.date_invoice, '%Y-%m-%d') <=
(convert.str2date(trans.execution_date, '%Y-%m-%d') +
self.payment_window)
and (not _cached(x) or _remaining(x)))
and (not _cached(x) or _remaining(x))
and (not partner_ids
or x.invoice.partner_id.id in partner_ids))
]
# Match on amount expected. Limit this kind of search to known