我的对象中有一个日期字段,并且从数据字段中希望按分组显示数据。我已经尝试过使用likee这个数据组。但它没有效果。
例子:
<filter icon="terp-go-year" string="Year"
domain="[('date_from','<=', time.strftime('%%Y-%%m-%%d')),('date_from','>=',time.strftime('%%Y-01-01'))]"
help="Current Year"/>
<filter icon="terp-go-month" string="Month"
name="month"
domain="[('date_from','<=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','>=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Current Month"/>
<filter icon="terp-go-week"
string="Week"
separator="1"
name="week"
domain="[('date_from','<=', (datetime.date.today() + relativedelta(weeks=0,day=7, weekday=-1)).strftime('%%Y-%%m-%%d')),('date_from','>=',(datetime.date.today() - relativedelta(weeks=1, weekday=0)).strftime('%%Y-%%m-%%d'))]"
help="Current Week"/>
它不适合我:(