我创建了两个过滤器:
<filter string="Board Room A"
name="location_board_a"
domain="[('location','=','Board A')]" />
<filter string="Today"
name="Today"
separator="1"
domain="[('start_datetime','>=', ((context_today()+datetime.timedelta(days=0)).strftime('%Y-%m-%d'))), ('start_datetime','<=', ((context_today()+datetime.timedelta(days=0)).strftime('%Y-%m-%d')))]"
help="Today"/>
如何组合这两个过滤器?我曾尝试使用&#39;&amp;&#39;但我无法通过它
有人可以帮助我吗?
答案 0 :(得分:4)
使用逗号加入域:
<filter string="Board Room A Today"
name="location_board_a_today"
domain="[('location','=','Board A'), ('start_datetime','>=', ((context_today()+datetime.timedelta(days=0)).strftime('%Y-%m-%d'))), ('start_datetime','<=', ((context_today()+datetime.timedelta(days=0)).strftime('%Y-%m-%d')))]" />