Odoo Help


Domain defined in action of xml..error producing 'name time is not defined'

on 11/29/13, 2:44 AM 1,117 views

domain code is:

<field name="domain">[('date', '=', time.strftime('%Y-%m-%d')),('user_id','=',uid)]</field>

i am using openerp 7.0

and i have used context_today instead of time but its giving same type error that 'name context_today is not defined'.

Can anyone help Please.. Thanks in advance.

Evans Bernier
On 5/31/16, 2:21 PM


context_today is a function. Use it like that :  context_today().strftime('%%Y-%%m-%%d')


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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.


Odoo Training Center

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

Test it now

Question tools

0 follower(s)


Asked: 11/29/13, 2:44 AM
Seen: 1117 times
Last updated: 5/31/16, 2:21 PM