[7.0] l10n_be_coda: SQL searching sidesteps the ORM ir.rule on res.partner.bank

Bug #1128933 reported by Niels Huylebroeck
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP Publisher's Warranty Team

Bug Description

The code that tries to match the Coda account number in
http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/l10n_be_coda/wizard/account_coda_import.py#L114

uses plain old SQL searching, when there is a multicompany configuration, it is sidestepping the orm and gives an error when trying to browse the found partner record with an Access Denied on res.partner if the first record happens to point to a partner which is from another company. (The related partner banking information has to be created multiple times in different companies to trigger this error.)

The easiest to implement solution we have found is simply doing another search after the sql search to make sure any ir.rule domains are applied to the search result. (See attached patch)

Related branches

Revision history for this message
Niels Huylebroeck (red15) wrote :
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
status: Confirmed → In Progress
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Committed above fix in lp:~openerp-dev/openobject-addons/7.0-opw-586330-rha,
r8747, <email address hidden>

Thank you Neils,
Rifakat Haradwala

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello Niels,
Thanks for reporting, we have fixed this at revision 9252. I agree this is not ideal to do another search but our ORM does not allow us to do complex requests like this one...
Regards

Changed in openobject-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.