[FIX] only match references when partners match (if any)

This commit is contained in:
Holger Brunn
2014-07-09 16:32:42 +02:00
parent 21519237a0
commit 88cc095b13

View File

@@ -308,7 +308,9 @@ class banking_import_transaction(osv.osv):
str2date(x.invoice.date_invoice, '%Y-%m-%d') <=
(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