Search on account.period lose the context

Bug #1177348 reported by Guewen Baconnier @ Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3
OpenERP Community Backports (Addons)
Status tracked in 7.0
7.0
Fix Released
Undecided
Guewen Baconnier @ Camptocamp

Bug Description

Hi,

When we want to search a period in a many2one, the context is not properly propagated to the 'account_period.search' method.

This is due to the context which is not propagated in the account_period.name_search method here:

    account/account.py:1036

    def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
        if args is None:
            args = []
        if context is None:
            context = {}
        ids = []
        if name:
            ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
        if not ids:
            ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
        return self.name_get(cr, user, ids, context=context)

Related branches

Changed in ocb-addons:
status: New → Confirmed
assignee: nobody → Guewen Baconnier @ Camptocamp (gbaconnier-c2c)
Changed in ocb-addons:
status: Confirmed → Fix Committed
no longer affects: openobject-addons/7.0
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello,
Thank you guys for reporting this issue and providing a fix.
The changes have been integrated into addons v7
revno: 9178 [merge]
revision-id: <email address hidden>

This will forward-ported in trunk soon.
Regards

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

Other bug subscribers

Remote bug watches

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