openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #25555
[Bug 1229270] [NEW] filtering sale.order with act_window using context_today () error window opens but filters properly
Public bug reported:
I'm filtering by domain sale.order in the act_window.
[('state','not
in',('draft','sent','cancel')),('date_confirm','>',(context_today()+datetime.timedelta(days=-30)).strftime('%Y-%m-%d'))]
when I access to sales menu openerp send me this error but de filter
work fine:
2013-09-23 16:05:48,393 5324 ERROR demo openerp.tools.safe_eval: Cannot eval u"[('state','not in',('draft','sent','cancel')),('date_confirm','>',(context_today()+datetime.timedelta(days=-30)).strftime('%Y-%m-%d'))]"
Traceback (most recent call last):
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/tools/safe_eval.py", line 243, in safe_eval
except Exception:
File "", line 1, in <module>
NameError: name 'context_today' is not defined
2013-09-23 16:05:48,394 5324 ERROR demo openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/addons/src/audittrail/audittrail.py", line 514, in execute_cr
return fct_src(cr, uid, model, method, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/addons/base/ir/ir_ui_menu.py", line 336, in get_needaction_data
dom = menu.action.domain and eval(menu.action.domain, {'uid': uid}) or []
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/tools/safe_eval.py", line 243, in safe_eval
except Exception:
File "", line 1, in <module>
NameError: name 'context_today' is not defined
2013-09-23 16:05:48,394 5324 ERROR demo openerp.netsvc: name 'context_today' is not defined
Traceback (most recent call last):
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/addons/src/audittrail/audittrail.py", line 514, in execute_cr
return fct_src(cr, uid, model, method, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/addons/base/ir/ir_ui_menu.py", line 336, in get_needaction_data
dom = menu.action.domain and eval(menu.action.domain, {'uid': uid}) or []
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/tools/safe_eval.py", line 243, in safe_eval
except Exception:
File "", line 1, in <module>
NameError: name 'context_today' is not defined
Regards :-)
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1229270
Title:
filtering sale.order with act_window using context_today () error
window opens but filters properly
Status in OpenERP Addons (modules):
New
Bug description:
I'm filtering by domain sale.order in the act_window.
[('state','not
in',('draft','sent','cancel')),('date_confirm','>',(context_today()+datetime.timedelta(days=-30)).strftime('%Y-%m-%d'))]
when I access to sales menu openerp send me this error but de filter
work fine:
2013-09-23 16:05:48,393 5324 ERROR demo openerp.tools.safe_eval: Cannot eval u"[('state','not in',('draft','sent','cancel')),('date_confirm','>',(context_today()+datetime.timedelta(days=-30)).strftime('%Y-%m-%d'))]"
Traceback (most recent call last):
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/tools/safe_eval.py", line 243, in safe_eval
except Exception:
File "", line 1, in <module>
NameError: name 'context_today' is not defined
2013-09-23 16:05:48,394 5324 ERROR demo openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/addons/src/audittrail/audittrail.py", line 514, in execute_cr
return fct_src(cr, uid, model, method, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/addons/base/ir/ir_ui_menu.py", line 336, in get_needaction_data
dom = menu.action.domain and eval(menu.action.domain, {'uid': uid}) or []
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/tools/safe_eval.py", line 243, in safe_eval
except Exception:
File "", line 1, in <module>
NameError: name 'context_today' is not defined
2013-09-23 16:05:48,394 5324 ERROR demo openerp.netsvc: name 'context_today' is not defined
Traceback (most recent call last):
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/addons/src/audittrail/audittrail.py", line 514, in execute_cr
return fct_src(cr, uid, model, method, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/addons/base/ir/ir_ui_menu.py", line 336, in get_needaction_data
dom = menu.action.domain and eval(menu.action.domain, {'uid': uid}) or []
File "/home/antoniofregoso/workspace-openerp/sever/src/openerp/tools/safe_eval.py", line 243, in safe_eval
except Exception:
File "", line 1, in <module>
NameError: name 'context_today' is not defined
Regards :-)
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1229270/+subscriptions
Follow ups
References