|
@@ -0,0 +1,30 @@
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<openerp>
|
|
|
+ <data>
|
|
|
+ <!-- Crear una nueva vista de búsqueda -->
|
|
|
+ <record id="view_inventory_search_filter" model="ir.ui.view">
|
|
|
+ <field name="name">stock.inventory.search.filter</field>
|
|
|
+ <field name="model">stock.inventory</field>
|
|
|
+ <field name="inherit_id" ref="stock.view_inventory_filter" />
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <search>
|
|
|
+ <separator/>
|
|
|
+ <filter string="Este año" name="year" domain="[('date','<=', time.strftime('%%Y-12-31')),('date','>=',time.strftime('%%Y-01-01'))]"/>
|
|
|
+ <filter string="Año pasado " domain="[('date','>=',(context_today()-relativedelta(years=1)).strftime('%%Y-01-01')),('date','<=', time.strftime('%%Y-01-01'))]"/>
|
|
|
+ <filter string="Mes actual" domain="[('date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date','>=',time.strftime('%%Y-%%m-01'))]"/>
|
|
|
+ <filter string="Mes pasado" domain="[('date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('date','<',time.strftime('%%Y-%%m-01'))]"/>
|
|
|
+ <filter string="Semana anterior" domain="[('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')))]"/>
|
|
|
+ <filter string="Esta semana" domain="[('date', '>=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date', '<=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
|
|
|
+ <filter string="Hoy" domain="[('date', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('date', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
|
|
|
+ <filter string=" Ayer " domain="[('date','<=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('date','>=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
|
|
|
+ <separator/>
|
|
|
+ <group string="Agrupar por">
|
|
|
+ <filter string="Por deposito" context="{'group_by':'location_id'}"/>
|
|
|
+ <filter string="Por dia" context="{'group_by':'date:month'}"/>
|
|
|
+ <filter string="Por estado" context="{'group_by':'state'}"/>
|
|
|
+ </group>
|
|
|
+ </search>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+ </data>
|
|
|
+</openerp>
|