diff --git a/views/account_invoice.xml b/views/account_invoice.xml index f1d26ce9af10ff7e636ddf9cafe4cbaf5d0ce474..6eccbf81b7b395b79e1d34c867097b5ed17b06eb 100644 --- a/views/account_invoice.xml +++ b/views/account_invoice.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> <data> + <!-- Form --> <record id="invoice_form_scop_inherited" model="ir.ui.view"> - <field name="name">account.invoice.scop.inherited</field> + <field name="name">account.invoice.form.scop.inherited</field> <field name="model">account.invoice</field> + <field name="mode">primary</field> <field name="inherit_id" ref="account.invoice_form"/> <field name="arch" type="xml"> <field name="user_id" position="after"> @@ -21,9 +23,30 @@ </field> </record> + <!-- Tree --> + <record id="invoice_tree_scop_inherited" model="ir.ui.view"> + <field name="name">account.invoice.tree.scop.inherited</field> + <field name="model">account.invoice</field> + <field name="mode">primary</field> + <field name="inherit_id" ref="account.invoice_tree_with_onboarding"/> + <field name="arch" type="xml"> + + <xpath expr="//field[@name='user_id']" position="attributes"> + <attribute name="invisible">True</attribute> + </xpath> + <xpath expr="//field[@name='company_id']" position="attributes"> + <attribute name="invisible">True</attribute> + </xpath> + <xpath expr="//field[@name='origin']" position="attributes"> + <attribute name="invisible">True</attribute> + </xpath> + + </field> + </record> + <!-- Search --> - <record id="view_account_invoice_cotiz_search" model="ir.ui.view"> - <field name="name">account.invoice.cotiz.search</field> + <record id="invoice_search_scop_inherited" model="ir.ui.view"> + <field name="name">account.invoice.search.scop.inherited</field> <field name="model">account.invoice</field> <field name="priority" eval="25"/> <field name="arch" type="xml"> @@ -36,7 +59,7 @@ <filter name="paid" string="Payé" domain="[('state', '=', 'paid')]"/> <filter name="late" string="Retard" domain="['&', ('date_due', '<', time.strftime('%%Y-%%m-%%d')), ('state', '=', 'open')]" help="Overdue invoices, maturity date passed"/> <separator/> - <filter name="cotiz_to_calculate" domain="[('amount_total','=',0)]" string="Cotisations à calculer"/> + <filter name="cotiz_equals_zero" domain="[('amount_total','=',0)]" string="Cotisation(s) égale(s) à 0"/> <separator/> <field name="partner_id" operator="child_of"/> <field name="user_id" string="Salesperson" domain="[('share','=', False)]"/> @@ -56,38 +79,12 @@ <record id="account.action_invoice_tree1" model="ir.actions.act_window"> <field name="domain" eval="[('type','in', ['out_invoice']), ('is_contribution', '!=', True)]"/> </record> - <!-- Action --> - <record id="action_scop_cotisation_invoice" model="ir.actions.act_window"> - <field name="name">Appels de cotisations</field> - <field name="res_model">account.invoice</field> - <field name="view_mode">tree,form,kanban,calendar,graph,pivot</field> - <field name="domain" eval="[('type','in', ['out_invoice', 'out_refund']), ('is_contribution', '!=', False)]"/> - <field name="context" eval="{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale', 'default_is_contribution': True, 'create': False,}"/> - <field name="search_view_id" ref="view_account_invoice_cotiz_search"/> - </record> - <record id="action_invoice_scop_cotisation_view1" model="ir.actions.act_window.view"> - <field eval="1" name="sequence"/> - <field name="view_mode">tree</field> - <field name="view_id" ref="account.invoice_tree_with_onboarding"/> - <field name="act_window_id" ref="action_scop_cotisation_invoice"/> - </record> - <record id="action_invoice_scop_cotisation_view2" model="ir.actions.act_window.view"> - <field eval="2" name="sequence"/> - <field name="view_mode">form</field> - <field name="view_id" ref="account.invoice_form"/> - <field name="act_window_id" ref="action_scop_cotisation_invoice"/> - </record> <!-- MENUS --> <menuitem id="menu_scop_cotisation" name="Cotisations" parent="account.menu_finance" sequence="1"/> - <menuitem id="menu_scop_cotisation_invoice" - parent="cgscop_cotisation.menu_scop_cotisation" - action="action_scop_cotisation_invoice" - sequence="50"/> - </data> </odoo> \ No newline at end of file