|
@@ -0,0 +1,35 @@
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<openerp>
|
|
|
+ <data>
|
|
|
+
|
|
|
+ <record id="view_accountinvoices_filter_search1" model="ir.ui.view">
|
|
|
+ <field name="name">accountinvoices.filter.search1</field>
|
|
|
+ <field name="model">account.invoice.line</field>
|
|
|
+ <field name="inherit_id" ref="product_invoiced_line.product_account_invoice_line_search" />
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <search>
|
|
|
+
|
|
|
+ <separator/>
|
|
|
+
|
|
|
+ <filter string="Facturado este año" name="year" domain="[('inv_date','<=', time.strftime('%%Y-12-31')),('inv_date','>=',time.strftime('%%Y-01-01'))]"/>
|
|
|
+ <filter string="Facturado año pasado " domain="[('inv_date','>=',(context_today()-relativedelta(years=1)).strftime('%%Y-01-01')),('inv_date','<=', time.strftime('%%Y-01-01'))]"/>
|
|
|
+ <filter string="Facturado mes actual" domain="[('inv_date','<',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('inv_date','>=',time.strftime('%%Y-%%m-01'))]"/>
|
|
|
+ <filter string="Facturado mes pasado" domain="[('inv_date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),('inv_date','<',time.strftime('%%Y-%%m-01'))]"/>
|
|
|
+ <filter string="Facturado semana anterior" domain="[('inv_date', '>=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('inv_date', '<=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
|
|
|
+ <filter string="Facturado esta semana" domain="[('inv_date', '>=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('inv_date', '<=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
|
|
|
+ <filter string="Facturado hoy" domain="[('inv_date', '>=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('inv_date', '<=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/> -->
|
|
|
+ <filter string="Facturado ayer" domain="[('inv_date','<=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('inv_date','>=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
|
|
|
+
|
|
|
+
|
|
|
+ <separator/>
|
|
|
+ <group string="Agrupar por">
|
|
|
+ <filter string="Por dia" context="{'group_by':'inv_date:day'}"/>
|
|
|
+ <filter string="Por mes" context="{'group_by':'inv_date:month'}"/>
|
|
|
+ </group>
|
|
|
+ </search>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+
|
|
|
+ </data>
|
|
|
+</openerp>
|