Odoo Help

0

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

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


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

Question tools

0 follower(s)

Stats

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