context not passed in tree_but_action

Bug #716300 reported by David Janssens
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Won't Fix
Undecided
Unassigned
5.0
Fix Released
Low
Jay Vora (Serpent Consulting Services)

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()

Related branches

affects: openobject-client-web → openobject-addons
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Meera Trambadia (OpenERP) (mtr-openerp) wrote :

Hello David Janssens,

Its fixed in https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 branch.
Revision ID: mtr@mtr-20110211112737-esnj1iyhcwlqn87v
Revision no:4751

Thanks
mtr

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

For fiscalyear its not working.

Changed in openobject-addons:
status: Fix Committed → Confirmed
Changed in openobject-addons:
milestone: none → 6.1
Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Fix Committed
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Fixed in Addons3

revision-id: mra@mra-laptop-20110211123951-c4d0qm3qsllztltr
revno: 4979

thank you,
mra

Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

We have reverted the code from Addons3 branch for now so i reopen the bug we will try to correct it with other good solution.

May be with domain/context on action of the opening journal items currently there is some limitation on gtk/webclient we can not use context.get() on domain with action.

Thank you,
mra

Changed in openobject-addons:
status: Fix Released → Confirmed
milestone: 6.1 → none
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello David Janssens,

Its fixed in lp:~openerp-dev/openobject-addons/trunk-bug-716300-ara branch. It will be merge soon with trunk addons.

Thanks for reporting.

Revision ID: <email address hidden>
Revision no:4640

Thanks,
ara

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
milestone: none → 6.1
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello,

As this bug is not related with Addons module.

Should be fix in gtk/webclient.

Thanks,
mra

Changed in openobject-addons:
status: Fix Committed → Invalid
status: Invalid → Confirmed
Changed in openobject-addons:
milestone: 6.1 → none
affects: openobject-addons → openobject-client-web
Changed in openobject-client-web:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → nobody
importance: Low → Undecided
status: Confirmed → New
Changed in openobject-client-web:
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-client-web:
status: Confirmed → In Progress
Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

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 <email address hidden>

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

Thanks.

Changed in openobject-client-web:
status: In Progress → Fix Committed
Revision history for this message
Jiten (OpenERP) (jiten-openerp) wrote :

Hello,

I have checked it with 6.0 stable web client and found the problem in form view only.

Produced the problem in WEB,
Example
Account - Chart of Accounts >
* set fiscal year as default -> does NOT copy periods into from/to into form.

So, i am convert this bug to 'Confirmed'.

Thanks!

Changed in openobject-client-web:
status: Fix Committed → Confirmed
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

This bug is being closed as Won't Fix in the OpenERP Web Client project, as it is not going to be developed further after the 6.0 series. It will be replaced in 6.1 by a newer and better web frontend known as the OpenERP Web project[1], so further R&D efforts on the 6.0 project would be wasted.
Bugs affecting customers in production of course continue to be handled via the OpenERP Enterprise (OPW) maintenance service.
You can find more details about this in the Bug Management FAQ[2].

Changed in openobject-client-web:
assignee: OpenERP R&D Web Team (openerp-dev-web) → nobody
importance: Low → Undecided
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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