summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Trigaux <mat@openerp.com>2013-06-20 16:17:51 +0200
committerMartin Trigaux <mat@openerp.com>2013-06-20 16:17:51 +0200
commit461e73eafd5b76bb600d0fdeeec850ff242b2e53 (patch)
tree09ced6f3dee2a64baa56f22ca2ceabb62555ba0e
parent5fd76c325c84449c4583b48070df2ae7ae52d43a (diff)
parentf50588b5c118e20f2a82bf0cec998383f2145f12 (diff)
[MERGE] [FIX] l10n_be_coda: ensure record rules are applied on res.partner.bank
lp bug: https://launchpad.net/bugs/1128933 fixed bzr revid: mat@openerp.com-20130620141751-9ml90ivro2dwsj4p
-rw-r--r--addons/l10n_be_coda/wizard/account_coda_import.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/l10n_be_coda/wizard/account_coda_import.py b/addons/l10n_be_coda/wizard/account_coda_import.py
index d0bc2fc238c..966bf896b5b 100644
--- a/addons/l10n_be_coda/wizard/account_coda_import.py
+++ b/addons/l10n_be_coda/wizard/account_coda_import.py
@@ -117,6 +117,8 @@ class account_coda_import(osv.osv_memory):
# and so a 'like' operator would return the first account number in the database which matches.
cr.execute("select id from res_partner_bank where replace(replace(acc_number,' ',''),'-','') = %s", (statement['acc_number'],))
bank_ids = [id[0] for id in cr.fetchall()]
+ # Filter bank accounts which are not allowed
+ bank_ids = self.pool.get('res.partner.bank').search(cr, uid, [('id', 'in', bank_ids)])
if bank_ids and len(bank_ids) > 0:
bank_accs = self.pool.get('res.partner.bank').browse(cr, uid, bank_ids)
for bank_acc in bank_accs: