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.

1

how to use time in xml

By
Maulik
on 6/4/13, 11:29 AM 1,382 views

Hello,

I wanted to add domain to my record having domain condition for time that is

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

3
NIKHIL KRISHNAN
On 7/25/16, 1:17 AM

('call_schedule_date', '&lt;', datetime.datetime.strftime('%Y-%m-%d')

You try this. i think this will help you.


use domain or attrs

NIKHIL KRISHNAN
on 7/25/16, 1:19 AM
0
Alex Malone
On 6/4/13, 1:27 PM

Not sure if this helps, but this is how I use datetimes in search view filters:

<filter name="filter_today_timelogs" string="Today" domain="[('log_date','&lt;=',time.strftime('%%Y-%%m-%%d 23:59:59')),('log_date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]" />

Main difference I can see between our code samples is mine uses double percent (%) signs in the domain and I use < instead of <

Might be worth a try.

thanks for this It helped me

Maulik
on 2/5/14, 3:25 AM
0
Dharmesh Rathod
On 6/4/13, 11:40 AM

Hi,

Use "&lt" instead of '<'

Email : info@acespritech.com
Skype : acespritech
Blog : acespritechblog.wordpress.com

Hello,Used that one too but does nt work like how in project/project_view.xml line # 643 works

Maulik
on 6/4/13, 11:52 AM

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

1 follower(s)

Stats

Asked: 6/4/13, 11:29 AM
Seen: 1382 times
Last updated: 7/25/16, 1:17 AM