1234567891011121314151617181920212223242526272829 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record id="view_stock_quant_search1" model="ir.ui.view">
- <field name="name">stock.quant.filter.search1</field>
- <field name="model">stock.quant</field>
- <field name="inherit_id" ref="stock.quant_search_view" />
- <field name="arch" type="xml">
- <search>
- <separator/>
- <filter string="Este año" name="year" domain="[('create_date','<=', time.strftime('%%Y-12-31')),('create_date','>=',time.strftime('%%Y-01-01'))]"/>
- <filter string="Año pasado " domain="[('create_date','>=',(context_today()-relativedelta(years=1)).strftime('%%Y-01-01')),('create_date','<=', time.strftime('%%Y-01-01'))]"/>
- <filter string="Mes actual" domain="[('create_date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('create_date','>=',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Mes pasado" domain="[('create_date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('create_date','<',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Hoy" domain="[('create_date', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('create_date', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
- <filter string="Ayer " domain="[('create_date','<=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('create_date','>=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
- <filter string="Semana anterior" domain="[('create_date', '>=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('create_date', '<=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Esta semana" domain="[('create_date', '>=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('create_date', '<=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <group string="Agrupar">
- <filter string="Por mes" context="{'group_by':'create_date:month'}"/>
- <filter string="Por dia" context="{'group_by':'create_date:day'}"/>
- </group>
- </search>
- </field>
- </record>
- </data>
- </openerp>
|