Odoo Help

3

1
4 Answers
1
SIRIUS-INFO France
9/18/15, 9:17 AM

Thanks, but I have anothe error : 

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 300, in checked_call
return self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 796, in __call__
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 396, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 869, in load_needaction
return request.session.model('ir.ui.menu').get_needaction_data(menu_ids, request.context)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 900, in proxy
result = meth(cr, request.uid, *args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_menu.py", line 341, in get_needaction_data
dom = menu.action.domain and eval(menu.action.domain, {'uid': uid}) or []
File "/usr/lib/python2.7/dist-packages/openerp/tools/safe_eval.py", line 312, in safe_eval
c = test_expr(expr, _SAFE_OPCODES, mode=mode)
File "/usr/lib/python2.7/dist-packages/openerp/tools/safe_eval.py", line 174, in test_expr
assert_valid_codeobj(allowed_codes, code_obj, expr)
File "/usr/lib/python2.7/dist-packages/openerp/tools/safe_eval.py", line 146, in assert_valid_codeobj
assert_no_dunder_name(code_obj, expr)
File "/usr/lib/python2.7/dist-packages/openerp/tools/safe_eval.py", line 126, in assert_no_dunder_name
raise NameError('Access to forbidden name %r (%r)' % (name, expr))
NameError: Access to forbidden name '__import__' (u"[('occupation_date_in','>',__import__('time').strftime('%Y-%m-%d'))]")
0
Anton Chepurov Estonia
2/9/17, 7:20 PM

How have you solved it eventually?

EDIT: Sure, here's how I solved it:

https://gist.github.com/a0c/81ef97177d32cc421c5a2fde9199b6a4


1 Comment
SIRIUS-INFO, SIRIUS-INFO France
2/10/17, 4:35 AM

I haven't found any solution, I finally gave up this functionnality.

But I'm still interested on it, if someone has an idea..

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now