123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record id="view_sale_orderfilter_search1" model="ir.ui.view">
- <field name="name">sale.order.filter.search1</field>
- <field name="model">sale.order</field>
- <field name="inherit_id" ref="sale.view_sales_order_filter" />
- <field name="arch" type="xml">
- <search>
- <separator/>
- <filter string="Este año" name="year" domain="[('date_order','<=', time.strftime('%%Y-12-31')),('date_order','>=',time.strftime('%%Y-01-01'))]"/>
- <filter string="Año pasado " domain="[('date_order','>=',(context_today()-relativedelta(years=1)).strftime('%%Y-01-01')),('date_order','<=', time.strftime('%%Y-01-01'))]"/>
- <filter string="Mes actual" domain="[('date_order','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date_order','>=',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Mes pasado" domain="[('date_order','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('date_order','<',time.strftime('%%Y-%%m-01'))]"/>
- <filter string="Semana anterior" domain="[('date_order', '>=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date_order', '<=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Esta semana" domain="[('date_order', '>=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date_order', '<=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
- <filter string="Hoy" domain="[('date_order', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('date_order', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
- <filter string="Ayer" domain="[('date_order','<=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('date_order','>=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
- <filter string="Guarani" name="currency_id" domain="[('currency_id','=','PYG')]"/>
- <filter string="Dolar" name="currency_id" domain="[('currency_id','=','USD')]"/>
- <separator/>
- <group string="">
- <filter string="Por dia" context="{'group_by':'date_order:day'}"/>
- <filter string="Por mes" context="{'group_by':'date_order:month'}"/>
- <filter string="Creado por" context="{'group_by':'create_uid'}"/>
- <filter string="Por sucursal" context="{'group_by':'warehouse_id'}"/>
- </group>
- </search>
- </field>
- </record>
- <record id="view_sale_orderline_filter_search1" model="ir.ui.view">
- <field name="name">sale.order.line.filter.search1</field>
- <field name="model">sale.order.line</field>
- <field name="inherit_id" ref="sale.view_sales_order_line_filter" />
- <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="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')))]"/>
- <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'))]"/>
- <separator/>
- <group string="">
- <filter string="Por dia" context="{'group_by':'create_date:day'}"/>
- <filter string="Por mes" context="{'group_by':'create_date:month'}"/>
- <filter string="Creado por" context="{'group_by':'create_uid'}"/>
- <!-- <filter string="Por sucursal" context="{'group_by':'warehouse_id'}"/> -->
- </group>
- </search>
- </field>
- </record>
- </data>
- </openerp>
|