← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 716300] Re: context not passed in tree_but_action

 

** Changed in: openobject-addons
       Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/716300

Title:
  context not passed in tree_but_action

Status in OpenERP Modules (addons):
  In Progress
Status in OpenERP Web Client 5.0 series:
  Confirmed

Bug description:
  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()



References