Name error generated when db created without demo and assign value on action

Bug #1000703 reported by DJ Patel (OpenERP)
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

Install crm and click on the following menus in web-client:

1.Sales -> Leads.
2.Sales -> Oppurtunities.
3.Phone Calls -> Logged Calls.
4.Phone Calls -> Scheduled Calls.

It gives the following traceback:

Client Traceback (most recent call last):
  File "/home/mdi/openerp/rdtools/web/trunk/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/home/mdi/openerp/rdtools/web/trunk/addons/web/controllers/main.py", line 1504, in load
    value = clean_action(req, action[0], do_not_eval)
  File "/home/mdi/openerp/rdtools/web/trunk/addons/web/controllers/main.py", line 739, in clean_action
    action['context'] = eval( action['context'], eval_ctx ) or {}
  File "<string>", line 1, in <module>
NameError: name 'section_id' is not defined

Thanks,
Divyesh

affects: openerp-web → openobject-addons
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Divyesh,

Problem occurs only when we have installed a db without demo, because on menu action 'section_id' is a value, and if we didn't install demo then section_id doesn't find when called the action.

I have checked your commit but it doesn't correct because you have change the section_id to 'section_id', as I said section_id is a value that's why we can not passed section_id in ''. If you passed the section_id as a 'section' it will never check the salesteam on context. Also on gtk you have faced the following error.

ValueError: invalid literal for int() with base 10: 'section_id'

So as per my "opinion', this should be fix from web side, on 6.1 with same code all are working expected. Problem occurs only on trunk without demo data, and we never option this view.

Thanks!

affects: openobject-addons → openerp-web
summary: - Traceback when click on menus
+ Name error generated when db created without demo and assign value on
+ action
Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Jiten (OpenERP) (jiten-openerp) wrote :

Hello,

This issue has been fixed in trunk branch.
I have tested as your description with latest code of trunk branch And now it's working fine at my end.

Cheers.

Changed in openerp-web:
status: Confirmed → 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.