Odoo Help

Welcome!

This community 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.

0

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

By
Krishna
on 11/29/13, 2:44 AM 1,064 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.

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

Hello,

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

Thanks


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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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