Valid action domains using `time` cause server-side errors in the "need-action" mechanism. (e.g. NameError: name 'time' is not defined)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Low
|
OpenERP's Framework R&D |
Bug Description
By using the the `time` module within an action domain it is possible to create server-side errors for 'need-action' enabled menus, even though the action domain itself is valid and works on the client-side.
========== Original description ====
I tried connecting to the runbot this morning, and after authenticating as admin, I got the following stack trace displayed on screen:
Server Traceback (most recent call last):
File "/home/
return openerp.
File "/home/
result = ExportService.
File "/home/
res = fn(db, uid, *params)
File "/home/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/
return f(self, dbname, *args, **kwargs)
File "/home/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/
return fct_src(cr, uid, model, method, *args, **kw)
File "/home/
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/
dom = menu.action.domain and eval(menu.
File "/home/
return eval(test_
File "", line 1, in <module>
NameError: name 'time' is not defined
The runbot URL used is http://
Related branches
- Amit Dodiya (OpenERP) (community): Needs Resubmitting
- Olivier Dony (Odoo): Needs Fixing
- Naresh(OpenERP): Pending requested
-
Diff: 38 lines (+20/-1)1 file modifiedopenerp/addons/base/ir/ir_ui_menu.py (+20/-1)
description: | updated |
description: | updated |
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Low |
milestone: | none → 7.0 |
status: | New → Confirmed |
Hi Alexandre,
It seems the error was caused by someone testing customizations of "action domains" on the runbot. If you try the previous or the next 7.0 build on runbot the error does not occur.
There is indeed a real issue in this case, so we can confirm your bug report after correcting the title/description (see the attached merge proposal)
However in general you should not bother reporting errors you see on runbot only, unless you can reproduce them on fresh builds that you know are untouched (which is hard to say, really). At least confirm the error in previous and next builds to be sure that there *is* a problem. It is quite possible to cause errors/invalid behavior on runbot instances by doing random changes as the administrator, and we don't want to have bug reports every time someone does that ;-) (OpenERP catches many such mistakes but not all of them, and covering all exotic cases is not a priority)
Thanks!