Browse Source

[FIX filter domain

14.0
Rémi FRANÇOIS 4 years ago
parent
commit
444c63f4bb
  1. 4
      pos_restaurant_booking/views/restaurant_table_booking.xml

4
pos_restaurant_booking/views/restaurant_table_booking.xml

@ -75,8 +75,8 @@
<field name="table_id"/>
<field name="datetime_start"/>
<group expand="0" string="Filters">
<filter name="this_week" string="This week" domain="[('datetime_start','&gt;=',(context_today() + relativedelta(weekday=0)).strftime('%Y-%m-%d 00:00:00')),('date','&lt;=',(context_today() + relativedelta(weekday=6)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter name="next_week" string="Next week" domain="[('datetime_start','&gt;=',(context_today() + relativedelta(weeks=1, weekday=0)).strftime('%Y-%m-%d 00:00:00')),('date','&lt;=',(context_today() + relativedelta(weeks=1, weekday=6)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter name="this_week" string="This week" domain="[('datetime_start','&gt;=',(context_today() + relativedelta(weekday=0)).strftime('%Y-%m-%d 00:00:00')),('datetime_start','&lt;=',(context_today() + relativedelta(weekday=6)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter name="next_week" string="Next week" domain="[('datetime_start','&gt;=',(context_today() + relativedelta(weeks=1, weekday=0)).strftime('%Y-%m-%d 00:00:00')),('datetime_start','&lt;=',(context_today() + relativedelta(weeks=1, weekday=6)).strftime('%Y-%m-%d 23:59:59'))]"/>
<separator/>
<filter name="upcoming" string="Upcoming" domain="[('datetime_start','&gt;=',context_today().strftime('%Y-%m-%d 00:00:00'))]"/>
</group>

Loading…
Cancel
Save