From 353cece9bc7ea16d8f1859c580affd544d2b76a8 Mon Sep 17 00:00:00 2001
From: jordan <jordan@le-filament.com>
Date: Thu, 4 Feb 2021 17:18:32 +0100
Subject: [PATCH] [update] adapt invoice voc for cotiz

---
 views/account_invoice.xml | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/views/account_invoice.xml b/views/account_invoice.xml
index 6eccbf8..847c279 100644
--- a/views/account_invoice.xml
+++ b/views/account_invoice.xml
@@ -12,14 +12,28 @@
                 <field name="user_id" position="after">
                     <field name="partner_ur_id" readonly="1" groups="base.group_no_one"/>
                     <field name="is_contribution" readonly="1" groups="base.group_no_one"/>
-                    <field name="year" readonly="1" attrs="{'invisible': [('is_contribution', '!=', True)]}"/>
+                    <field name="year" readonly="1"/>
                 </field>
 
                 <xpath expr="//sheet/group[last()]" position="after">
-                    <group name="cotisations" string="Cotisations" attrs="{'invisible': [('is_contribution', '!=', True)]}">
+                    <group name="cotisations" string="Cotisations">
                         <field name="liasse_fiscale_id" readonly="1"/>
                     </group>
                 </xpath>
+
+                <xpath expr="//field[@name='partner_id']" position="attributes">
+                    <attribute name="string">Adhérent</attribute>
+                </xpath>
+                <xpath expr="//field[@name='date_invoice']" position="attributes">
+                    <attribute name="string">Date de cotisation</attribute>
+                </xpath>
+                <xpath expr="//field[@name='user_id']" position="attributes">
+                    <attribute name="invisible">True</attribute>
+                </xpath>
+                <xpath expr="//field[@name='team_id']" position="attributes">
+                    <attribute name="invisible">True</attribute>
+                </xpath>
+
             </field>
         </record>
 
@@ -31,6 +45,12 @@
             <field name="inherit_id" ref="account.invoice_tree_with_onboarding"/>
             <field name="arch" type="xml">
 
+                <xpath expr="//field[@name='partner_id']" position="attributes">
+                    <attribute name="string">Adhérent</attribute>
+                </xpath>
+                <xpath expr="//field[@name='date_invoice']" position="attributes">
+                    <attribute name="string">Date de cotisation</attribute>
+                </xpath>
                 <xpath expr="//field[@name='user_id']" position="attributes">
                     <attribute name="invisible">True</attribute>
                 </xpath>
-- 
GitLab