今年
<filter string="This Year" name="year" domain="[('date','<=', time.strftime('%%Y-12-31')),('date','>=',time.strftime('%%Y-01-01'))]"/>
今天
<filter icon="terp-go-today" string="Today" domain="[('date','<=', datetime.datetime.combine(context_today(), datetime.time(23,59,59))), ('date','>=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]"/>
上月
('date', 'like', (context_today() - datetime.timedelta(month=1)).strftime('%%Y-%%m')) ('date', 'like', (context_today() - relativedelta(month=1)).strftime('%%Y-%%m')) ('picking_type_id','=',%(mtlcs_stock.picking_type_material_production)d ),('date','<', time.strftime('%%Y-%%m-01')),('date','>=', (context_today() - relativedelta(months=1)).strftime('%%Y-%%m-01') ) ('date', '>=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date', '<=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))上周日
('date', '<=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))
上周一
('date', '>=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d')))
本周一
('date', '>=', ((context_today()+relativedelta(weeks=-1, weekday=0)).strftime('%%Y-%%m-%%d')))
实例:
inherit.stock.move.search stock.move