You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
2.0 KiB

  1. <?xml version="1.0"?>
  2. <!--
  3. © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  4. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. -->
  6. <odoo>
  7. <record id="invoice_form" model="ir.ui.view">
  8. <field name="name">agreement.customer.invoice.form</field>
  9. <field name="model">account.invoice</field>
  10. <field name="inherit_id" ref="account.invoice_form"/>
  11. <field name="arch" type="xml">
  12. <xpath expr="//page/group/group/field[@name='name']" position="after">
  13. <field name="agreement_id"
  14. domain="[('partner_id', 'child_of', commercial_partner_id), ('agreement_type', '=', 'sale')]"
  15. context="{'default_partner_id': commercial_partner_id, 'default_agreement_type': 'sale'}"/>
  16. <field name="commercial_partner_id" invisible="1"/>
  17. </xpath>
  18. </field>
  19. </record>
  20. <record id="invoice_supplier_form" model="ir.ui.view">
  21. <field name="name">agreement.supplier.invoice.form</field>
  22. <field name="model">account.invoice</field>
  23. <field name="inherit_id" ref="account.invoice_supplier_form"/>
  24. <field name="arch" type="xml">
  25. <xpath expr="//page/group/group/field[@name='company_id']" position="after">
  26. <field name="agreement_id"
  27. domain="[('partner_id', 'child_of', commercial_partner_id), ('agreement_type', '=', 'purchase')]"
  28. context="{'default_partner_id': commercial_partner_id, 'default_agreement_type': 'purchase'}"/>
  29. <field name="commercial_partner_id" invisible="1"/>
  30. </xpath>
  31. </field>
  32. </record>
  33. <record id="view_account_invoice_filter" model="ir.ui.view">
  34. <field name="name">agreement.account.invoice.search</field>
  35. <field name="model">account.invoice</field>
  36. <field name="inherit_id" ref="account.view_account_invoice_filter"/>
  37. <field name="arch" type="xml">
  38. <group expand="0" position="inside">
  39. <filter string="Agreement" name="agreement_groupby"
  40. context="{'group_by': 'agreement_id'}"/>
  41. </group>
  42. </field>
  43. </record>
  44. </odoo>