← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 716300] Re: context not passed in tree_but_action

 

Hello David Janssens,

The fix for web-client has been committed to lp:~openerp-dev/openobject-client-web/6.0-opw-5302-sma
with the following revision.

Revision-info:
4596 sma@xxxxxxxxxxx-20110510071646-4ghizow37hss6jx1

Soon it will be merged into trunk and stable web-client.

Thanks.






** Changed in: openobject-client-web
       Status: In Progress => Fix Committed

-- 
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 Web Client:
  Fix Committed
Status in OpenERP Web Client 5.0 series:
  In Progress

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