Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
5 Ответы
8213 Представления

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>**

Аватар
Отменить
Лучший ответ

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

You try this. i think this will help you.


Аватар
Отменить

use domain or attrs

Лучший ответ

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

Лучший ответ

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

Related Posts Ответы Просмотры Активность
1
мая 21
11914
2
июн. 20
5862
7
апр. 16
15133
1
мар. 15
6288
2
мар. 15
5423