Newer
Older
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Copyright 2020 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<data>
<!-- **************************************
Invoices changes for contribution
************************************** -->
<!-- Form -->
<record id="account_move_form_scop_inherited" model="ir.ui.view">
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<field name="name">account.move.form.scop.inherited</field>
<field name="model">account.move</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<xpath expr="//div[@name='journal_div']" 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" />
</xpath>
<xpath expr="//sheet/group[last()]" position="after">
<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='partner_id']" position="after">
<field name="partner_member_number" readonly="1" />
</xpath>
<xpath expr="//field[@name='invoice_date']" position="attributes">
<attribute name="string">Date de cotisation</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='beneficiary_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
<!-- Tree -->
<record id="account_move_tree_scop_inherited" model="ir.ui.view">
<field name="name">account.move.tree.scop.inherited</field>
<field name="model">account.move</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.view_invoice_tree" />
<field name="arch" type="xml">

Benjamin - Le Filament
committed
<xpath
expr="//field[@name='invoice_partner_display_name']"
position="before"
>
<field name="partner_member_number" readonly="1" />
<field
name="invoice_partner_display_name"
string="Adhérent"
/>
<field
name="invoice_date"
string="Date de cotisation"
<xpath expr="//field[@name='invoice_origin']" position="after">
<field name="type_contribution_id" optional="hide" />
<field name="year" optional="hide" />
<xpath expr="//field[@name='activity_ids']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='company_id']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='invoice_origin']" position="attributes">
<attribute name="optional">hide</attribute>
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
</xpath>
<xpath expr="//field[@name='state']" position="after">
<field name="is_sdd" invisible="1" />
</xpath>
</field>
</record>
<record id="account_move_scop_contribution_refund_tree" model="ir.ui.view">
<field name="name">account.invoice.tree.scop.contribution</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<tree create="0" edit="0" delete="0">
<field name="name" />
<field name="invoice_date" string="Date d'émission" />
<field name="ref" />
<field name="amount_total_signed" widget="monetary" />
<field name="state" invisible="1" />
</tree>
</field>
</record>
<!-- Search -->
<record id="account_move_search_scop_inherited" model="ir.ui.view">
<field name="name">account.move.search.scop.inherited</field>
<field name="model">account.move</field>
<field name="priority" eval="25" />
<field name="arch" type="xml">
<search string="Search Invoice">
<filter
name="draft"
string="Brouillon"
domain="['|', ('state','=','draft'), ('move_type','in', ['out_invoice', 'out_refund'])]"
/>
<filter
name="unpaid"
string="Non payées"
domain="[('payment_state', 'in', ['not_paid', 'in_payment', 'partial']), ('state', '=', 'posted')]"
/>
<filter
name="paid"
string="Payé"
domain="[('payment_state', '=', 'paid'), ('state', '=', 'posted')]"
/>
<filter
name="late"
string="Retard"
domain="['&', ('invoice_date_due', '<', time.strftime('%Y-%m-%d')), ('state', '=', 'posted'), ('payment_state', 'in', ('not_paid', 'partial'))]"
/>
<separator />
<filter
name="cotiz_equal_zero"
domain="[('amount_total','=',0)]"
string="Cotisation(s) égale(s) à 0"
/>
<separator />
<filter
name="is_sdd"
string="Cotisation au prélèvement"
domain="[('is_sdd', '=', True)]"
/>
<field name="partner_id" operator="child_of" />
<field
name="name"
string="Invoice"
context="{'active_test': False}"
filter_domain="['|','|','|', ('name','ilike',self), ('invoice_origin','ilike',self), ('reference', 'ilike', self), ('partner_id', 'child_of', self)]"
/>
<field name="date" string="Period" />
<group expand="0" string="Group By">
<filter
name="group_by_partner_id"
string="Adhérent"
context="{'group_by':'commercial_partner_id'}"
/>
<filter
name="status"
string="Statut"
context="{'group_by':'state'}"
/>
<separator />
<filter
string="Date de Facturation"
name="invoicedate"
context="{'group_by':'invoice_date'}"
/>
<filter
string="Date d'échéance"
name="duedate"
context="{'group_by':'invoice_date_due'}"
/>
</group>
</search>
</field>
</record>
<!-- Action -->
<record id="account.action_move_out_invoice_type" model="ir.actions.act_window">
<field
name="domain"
eval="[('move_type','=', 'out_invoice'), ('is_contribution', '!=', True)]"
/>
</record>
<record id="account.action_move_out_refund_type" model="ir.actions.act_window">
<field
name="domain"
eval="[('move_type','=', 'out_refund'), ('is_contribution', '!=', True)]"
/>
</record>
<!-- MENUS -->
<menuitem
id="menu_scop_cotisation"
name="Cotisations"
parent="account.menu_finance"
sequence="2"
/>
<!-- **************************************
Move changes for SDD rejected payments
************************************** -->
<!-- Tree View -->
<record id="scop_account_move_tree" model="ir.ui.view">
<field name="name">scop.account.move.tree</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<tree
decoration-info="state == 'draft'"
string="Pièces comptables"
create="0"
edit="0"
>
<field name="date" />
<field name="name" />
<field name="partner_id" />
<field name="ref" />
<field name="journal_id" />
<field name="amount_total" sum="Total Amount" />
<field name="reversed_entry_id" />
<button
name="%(account.action_view_account_move_reversal)d"
type="action"
string="Rejeter (extourne)"
class="btn-outline-danger btn-sm"
attrs="{'invisible': [('reversed_entry_id', '!=', False), ('state', '=', 'posted')]}"
/>
<field name="state" />
<field name="currency_id" invisible="1" />
</tree>
</field>
</record>
<!-- Search View -->
<record id="scop_account_move_search" model="ir.ui.view">
<field name="name">scop.account.move.search</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<search string="Pièces comptables">
<field name="partner_id" string="Adhérent" />
<field name="ref" string="Référence" />
<field name="name" />
<filter
name="rejected"
domain="[('reversed_entry_id', '!=', False)]"
string="Rejetés"
/>
<filter
name="not_rejected"
domain="[('reversed_entry_id', '=', False)]"
string="En cours"
/>
</search>
</field>
</record>
</data>