[FIX] context is not propagated through account_period.name_search to account_period...
authorGuewen Baconnier <guewen.baconnier@camptocamp.com>
Tue, 7 May 2013 11:53:06 +0000 (13:53 +0200)
committerGuewen Baconnier <guewen.baconnier@camptocamp.com>
Tue, 7 May 2013 11:53:06 +0000 (13:53 +0200)
lp bug: https://launchpad.net/bugs/1177348 fixed

bzr revid: guewen.baconnier@camptocamp.com-20130507115306-lrnb0t3139lfxtie

addons/account/account.py

index 58c4cf4..ea3303d 100644 (file)
@@ -1040,9 +1040,15 @@ class account_period(osv.osv):
             context = {}
         ids = []
         if name:
-            ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
+            ids = self.search(cr, user,
+                              [('code', 'ilike', name)] + args,
+                              limit=limit,
+                              context=context)
         if not ids:
-            ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
+            ids = self.search(cr, user,
+                              [('name', operator, name)] + args,
+                              limit=limit,
+                              context=context)
         return self.name_get(cr, user, ids, context=context)
 
     def write(self, cr, uid, ids, vals, context=None):