← Back to team overview

openerp-dev-web team mailing list archive

[Bug 716300] [NEW] context not passed in tree_but_action

 

Devishree Brahmbhatt (OpenERP) (dbr-openerp) has assigned this bug to you for 5.0:

In openerp web client 5 (not tested in 6), the context is not passed to the tree_but_action in tree views.
So for example, when clicking on an account in chart of account, it returns all entries of that account regardless of wizard parameters.
I made a patch to fix this:

=== modified file 'openerp/controllers/tree.py'
--- openerp/controllers/tree.py 2009-09-18 10:10:44 +0000
+++ openerp/controllers/tree.py 2011-02-10 08:44:46 +0000
@@ -191,7 +191,7 @@
             record = {}
 
             record['id'] = item.pop('id')
-            record['action'] = url('/tree/open', model=model, id=record['id'])
+            record['action'] = url('/tree/open', model=model, id=record['id'], context=ctx)
             record['target'] = None
 
             record['icon'] = None
@@ -219,7 +219,7 @@
         params, data = TinyDict.split(datas)
 
         model = params.model
-        context = params._terp_context or {}
+        context = params.context or {}
         ids = data.get('ids') or []
 
         ctx = rpc.session.context.copy()

** Affects: openobject-client-web
     Importance: Low
     Assignee: OpenERP SA's Web Client R&D (openerp-dev-web)
         Status: Confirmed

** Affects: openobject-client-web/5.0
     Importance: Low
     Assignee: Jay Vora (OpenERP) (jvo-openerp)
         Status: Confirmed

-- 
context not passed in tree_but_action
https://bugs.launchpad.net/bugs/716300
You received this bug notification because you are a member of OpenERP SA's Web Client R&D, which is a bug assignee.