account_invoice_view.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="account_invoice_cobrador" model="ir.ui.view">
  5. <field name="name">account.invoice.cobrador</field>
  6. <field name="model">account.invoice</field>
  7. <field name="inherit_id" ref="account.invoice_form" />
  8. <field name="arch" type="xml">
  9. <field name="account_id" position="after">
  10. <field name="employee_id"/>
  11. <field name="factconcobrador"/>
  12. <field name="promesa_date"/>
  13. </field>
  14. </field>
  15. </record>
  16. <record id="view_accountinvoices_filter_search1" model="ir.ui.view">
  17. <field name="name">accountinvoices.filter.search1</field>
  18. <field name="model">account.invoice</field>
  19. <field name="inherit_id" ref="account.view_account_invoice_filter" />
  20. <field name="arch" type="xml">
  21. <search>
  22. <filter string="Promesa esta semana" domain="[('promesa_date', '&gt;=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('promesa_date', '&lt;=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
  23. <filter string="Promesa hoy" domain="[('promesa_date', '&gt;=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('promesa_date', '&lt;=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
  24. <filter string="Promesa ayer" domain="[('promesa_date','&lt;=', (datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d')),('promesa_date','&gt;=',(datetime.date.today()-relativedelta(days=1)).strftime('%%Y-%%m-%%d'))]"/>
  25. <separator/>
  26. <group string="Agrupar por">
  27. <filter string="Por dia vencimiento" context="{'group_by':'date_due:day'}"/>
  28. <filter string="Por dia promesa" context="{'group_by':'promesa_date:day'}"/>
  29. <filter string="Por mes promesa" context="{'group_by':'promesa_date:month'}"/>
  30. </group>
  31. </search>
  32. </field>
  33. </record>
  34. </data>
  35. </openerp>