[page reload] when active_id is used in context, (i.e. after a tree_but_open)

Bug #1047911 reported by Christophe Combelles
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Web Team

Bug Description

How to reproduce :

- open the account chart (hierarchical view)
- click on an account to open it
- reload the page

Client Traceback (most recent call last):
  File "/home/dadafkas/projets/anybox/anytracker/buildout/parts/openerp-6.1-20120831-231939/openerp/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/home/dadafkas/projets/anybox/anytracker/buildout/parts/openerp-6.1-20120831-231939/openerp/addons/web/controllers/main.py", line 1553, in load
    value = clean_action(req, action[0], do_not_eval)
  File "/home/dadafkas/projets/anybox/anytracker/buildout/parts/openerp-6.1-20120831-231939/openerp/addons/web/controllers/main.py", line 692, in clean_action
    action['context'] = eval( action['context'], eval_ctx ) or {}
  File "<string>", line 1, in <module>
NameError: name 'active_id' is not defined

-----------------------------
Quick analysis :

The missing active_id is required by this view : account/account_view.xml:1298

            <field name="context">{'search_default_account_id': [active_id]}</field>

The problem is that the active_id is lost on the page reload.

Related branches

affects: openobject-server → openerp-web
Changed in openerp-web:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
Revision history for this message
Paramjit Singh Sahota(OpenERP) (psa-openerp) wrote :

Hello,

It has been fixed in lp:~openerp-dev/openerp-web/trunk-bug-1047911-psa branch with the Following Revision Number and Revision ID.

    Revision Number: 3102
    Revision ID: <email address hidden>
    Hope, this will be soon merged with trunk.

Thank you!
   -PSA

Changed in openerp-web:
status: Confirmed → Fix Committed
Revision history for this message
Christophe Combelles (ccomb) wrote :

Sorry but this not an acceptable fix, it completely breaks the search views...

I believe this bug should require a deeper analysis. The main problem comes from the active_id being lost.

Changed in openerp-web:
status: Fix Committed → Confirmed
Revision history for this message
Christophe Combelles (ccomb) wrote :

Actually I forgot to mention this bug is targeted towards the 6.1 branch, not the trunk. I've tried this fix only in 6.1 not trunk.

summary: - Error on page reload after a tree_but_open
+ [page reload] Error on page reload after a tree_but_open
summary: - [page reload] Error on page reload after a tree_but_open
+ page reload when active_id is used in context, (i.e. after a
+ tree_but_open)
summary: - page reload when active_id is used in context, (i.e. after a
+ ]page reload] when active_id is used in context, (i.e. after a
tree_but_open)
summary: - ]page reload] when active_id is used in context, (i.e. after a
+ [page reload] when active_id is used in context, (i.e. after a
tree_but_open)
Changed in openerp-web:
status: Confirmed → In Progress
Revision history for this message
Bhumi Thakkar (Open ERP) (bth-openerp) wrote :
Changed in openerp-web:
status: In Progress → Fix Committed
Changed in openerp-web:
status: Fix Committed → Confirmed
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Of course when treating this there's the issue of handling non-existent active_id: currently the client has little or no recovery code for that as it's an unlikely event. With active_ids as part of the URL, it may become a significantly more frequent occurence.

Changed in openerp-web:
status: Confirmed → In Progress
Revision history for this message
Fabien Meghazi (OpenERP) (fme) wrote :

Fix released for 7.0 in Revision:
3749 revid:<email address hidden>

Changed in openerp-web:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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