/
account_payment_view.xml
340 lines (325 loc) · 20.5 KB
/
account_payment_view.xml
1
2
3
4
5
6
7
8
9
10
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_account_payment_tree" model="ir.ui.view">
<field name="name">account.payment.tree</field>
<field name="model">account.payment</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" decoration-muted="state in ['reconciled', 'cancelled']" edit="false">
<field name="payment_date"/>
<field name="name"/>
<field name="journal_id"/>
<field name="payment_method_id"/>
<field name="partner_id" string="Customer"/>
<field name="amount" sum="Amount"/>
<field name="state"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="currency_id" invisible="1"/>
<field name="partner_type" invisible="1"/>
</tree>
</field>
</record>
<record id="view_account_supplier_payment_tree" model="ir.ui.view">
<field name="name">account.supplier.payment.tree</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_tree"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<field name="partner_id" position="attributes">
<attribute name="string">Vendor</attribute>
</field>
</field>
</record>
<record id="view_account_payment_kanban" model="ir.ui.view">
<field name="name">account.payment.kanban</field>
<field name="model">account.payment</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="name"/>
<field name="partner_id"/>
<field name="payment_date"/>
<field name="state"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="row mb4">
<div class="col-6">
<strong><span><field name="name"/></span></strong>
</div>
<div class="col-6 text-right">
<strong><i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/> <t t-esc="record.payment_date.value"/></strong>
</div>
</div>
<div class="row">
<div class="col-12">
<span><field name="partner_id"/></span>
</div>
</div>
<div class="row">
<div class="col-6">
<field name="amount" widget='monetary'/>
</div>
<div class="col-6">
<span class="float-right">
<field name="state" widget="label_selection" options="{'classes': {'draft': 'secondary', 'sent': 'success'}}"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_account_payment_search" model="ir.ui.view">
<field name="name">account.payment.search</field>
<field name="model">account.payment</field>
<field name="arch" type="xml">
<search string="Payments">
<field name="name" string="Payment"
filter_domain="['|', '|', ('name', 'ilike', self), ('partner_id', 'ilike', self), ('communication', 'ilike', self)]"/>
<field name="partner_id" string="Customer/Vendor"/>
<field name="journal_id"/>
<separator/>
<filter string="Customer Payments" name="inbound_filter" domain="[('partner_type', '=', 'customer')]"/>
<filter string="Vendor Payments" name="outbound_filter" domain="[('partner_type', '=', 'supplier')]"/>
<filter string="Transfers" name="transfers_filter" domain="[('payment_type', '=', 'transfer')]"/>
<separator/>
<filter string="Draft" name="state_draft" domain="[('state', '=', 'draft')]"/>
<filter string="Posted" name="state_posted" domain="[('state', '=', 'posted')]"/>
<filter string="Sent" name="state_sent" domain="[('state', '=', 'sent')]"/>
<filter string="Reconciled" name="reconciled" domain="[('state', '=', 'reconciled')]"/>
<separator/>
<filter string="Payment Date" name="payment_date" date="payment_date"/>
<separator/>
<field name="company_id" groups="base.group_multi_company"/>
<filter string="Customer/Vendor" name="partner" domain="[]" context="{'group_by': 'partner_id'}"/>
<filter string="Journal" name="journal" domain="[]" context="{'group_by': 'journal_id'}"/>
<filter string="Payment Method" name="paymentmethod" domain="[]" context="{'group_by': 'payment_method_id'}"/>
<filter string="Status" name="state" domain="[]" context="{'group_by': 'state'}"/>
<filter string="Payment Date" name="groupby_payment_date" domain="[]" context="{'group_by': 'payment_date'}"/>
<filter string="Currency" name="currency" domain="[]" context="{'group_by': 'currency_id'}" groups="base.group_multi_currency"/>
<!-- company_id is not stored (cdca5d4751a979f6b694f02d88160843f81a77f5). But we can't break structure-->
<filter string="Company" name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company" invisible="1"/>
<separator/>
<filter invisible="1" string="Late Activities" name="activities_overdue"
domain="[('activity_ids.date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
help="Show all records which has next action date is before today"/>
<filter invisible="1" string="Today Activities" name="activities_today"
domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
<filter invisible="1" string="Future Activities" name="activities_upcoming_all"
domain="[('activity_ids.date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/>
</search>
</field>
</record>
<record id="view_account_payment_form" model="ir.ui.view">
<field name="name">account.payment.form</field>
<field name="model">account.payment</field>
<field name="arch" type="xml">
<form string="Register Payment">
<header>
<button name="post" class="oe_highlight" states="draft" string="Confirm" type="object"/>
<button name="action_draft" class="btn btn-secondary" attrs="{'invisible': [('state', '=', 'draft')]}" string="Reset To Draft" type="object"/>
<button name="cancel" states="draft" string="Cancel" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted,reconciled,cancelled"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="button_journal_entries"
string="Journal Items" type="object"
groups="account.group_account_user"
attrs="{'invisible':[('move_line_ids','=',[])]}" icon="fa-bars"/>
<field name="move_line_ids" invisible="1"/>
<button class="oe_stat_button" name="button_invoices" type="object" icon="fa-bars" attrs="{'invisible':[('reconciled_invoices_count','=', 0)]}" >
<field name="reconciled_invoices_count"/>
<span attrs="{'invisible':[('reconciled_invoices_count','>',1)]}">Invoice</span>
<span attrs="{'invisible':[('reconciled_invoices_count','<=',1)]}">Invoices</span>
</button>
<field name="has_invoices" invisible="1"/>
<field name="move_reconciled" invisible="1"/>
</div>
<field name="id" invisible="1"/>
<div class="oe_title" attrs="{'invisible': [('state', '=', 'draft')]}">
<h1><field name="name"/></h1>
</div>
<group>
<field name="invoice_ids" invisible="1"/>
<group name="partner_group" invisible="context.get('active_model') == 'account.move'">
<field name="payment_type" widget="radio"/>
<field name="partner_type" widget="selection" attrs="{'required': [('state', '=', 'draft'), ('payment_type', 'in', ('inbound', 'outbound'))], 'invisible': [('payment_type', 'not in', ('inbound', 'outbound'))]}"/>
<field name="partner_id" attrs="{'required': [('state', '=', 'draft'), ('payment_type', 'in', ('inbound', 'outbound'))], 'invisible': [('payment_type', 'not in', ('inbound', 'outbound'))]}" context="{'default_is_company': True}"/>
<field name="company_id" groups="base.group_multi_company" required="1"/>
</group>
<group>
<field name="amount" invisible="1"/>
<field name="journal_id" widget="selection" attrs="{'invisible': [('amount', '=', 0), ('state', '!=', 'draft')]}"/>
<field name="destination_journal_id" widget="selection" attrs="{'required': [('payment_type', '=', 'transfer')], 'invisible': [('payment_type', '!=', 'transfer')]}"/>
<field name="hide_payment_method" invisible="1"/>
<field name="payment_method_id" widget="radio" attrs="{'invisible': [('hide_payment_method', '=', True)]}"/>
<field name="partner_bank_account_id" attrs="{'invisible': [('show_partner_bank_account', '!=', True)], 'required': [('require_partner_bank_account', '=', True)]}" context="{'default_partner_id': partner_id}"/>
<field name="show_partner_bank_account" invisible="1"/>
<field name="require_partner_bank_account" invisible="1"/>
<field name="payment_method_code" invisible="1"/>
</group>
<group name="right_column">
<label for="amount"/>
<div name="amount_div" class="o_row">
<field name="amount"/>
<field name="currency_id" options="{'no_create': True, 'no_open': True}" groups="base.group_multi_currency"/>
</div>
<field name="payment_date"/>
<field name="communication"/>
</group>
<group name="payment_difference" attrs="{'invisible': [('payment_difference', '=', 0.0)]}" groups="account.group_account_user">
<label for="payment_difference"/>
<div>
<field name="payment_difference"/>
<field name="payment_difference_handling" widget="radio" nolabel="1"/>
<div attrs="{'invisible': [('payment_difference_handling','=','open')]}">
<label for="writeoff_account_id" class="oe_edit_only" string="Post Difference In"/>
<field name="writeoff_account_id" options="{'no_create': True}" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile'), ('payment_difference', '!=', 0.0)]}"/>
<label for="writeoff_label" class="oe_edit_only" string="Label"/>
<field name="writeoff_label" attrs="{'required': [('payment_difference_handling', '=', 'reconcile'), ('payment_difference', '!=', 0.0)]}"/>
</div>
</div>
</group>
</group>
</sheet>
<div class="o_attachment_preview"/>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_account_payment_form_multi" model="ir.ui.view">
<field name="name">account.payment.form.multi</field>
<field name="model">account.payment.register</field>
<field name="arch" type="xml">
<form string="Register Payment">
<group>
<group>
<field name="payment_method_id" widget="radio"/>
<field name="group_payment"/>
</group>
<group>
<field name="journal_id" widget="selection"/>
<field name="payment_date"/>
</group>
</group>
<footer>
<button string="Create Payment" name="create_payments" type="object" class="oe_highlight"/>
<button string="Cancel" class="btn btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="view_account_payment_graph" model="ir.ui.view">
<field name="name">account.payment.graph</field>
<field name="model">account.payment</field>
<field name="arch" type="xml">
<graph string="Invoices" type="bar" stacked="1">
<field name="payment_type"/>
<field name="journal_id"/>
<field name="amount" type="measure"/>
</graph>
</field>
</record>
<record id="action_account_payments" model="ir.actions.act_window">
<field name="name">Payments</field>
<field name="res_model">account.payment</field>
<field name="view_mode">tree,kanban,form,graph</field>
<field name="context">{
'default_payment_type': 'inbound',
'default_partner_type': 'customer',
'search_default_inbound_filter': 1,
'res_partner_search_mode': 'customer',
}</field>
<field name="view_id" ref="view_account_payment_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Register a payment
</p><p>
Payments are used to register liquidity movements. You can process those payments by your own means or by using installed facilities.
</p>
</field>
</record>
<record id="action_account_payments_payable" model="ir.actions.act_window">
<field name="name">Payments</field>
<field name="res_model">account.payment</field>
<field name="view_mode">tree,kanban,form,graph</field>
<field name="context">{
'default_payment_type': 'outbound',
'default_partner_type': 'supplier',
'search_default_outbound_filter': 1,
'res_partner_search_mode': 'supplier',
}</field>
<field name="view_id" ref="view_account_supplier_payment_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Register a payment
</p><p>
Payments are used to register liquidity movements. You can process those payments by your own means or by using installed facilities.
</p>
</field>
</record>
<record id="action_account_payments_transfer" model="ir.actions.act_window">
<field name="name">Internal Transfers</field>
<field name="res_model">account.payment</field>
<field name="view_mode">tree,kanban,form,graph</field>
<field name="context">{'default_payment_type': 'transfer', 'search_default_transfers_filter': 1}</field>
<field name="domain">[]</field>
<field name="view_id" ref="view_account_supplier_payment_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Register a payment
</p><p>
Payments are used to register liquidity movements. You can process those payments by your own means or by using installed facilities.
</p>
</field>
</record>
<menuitem action="action_account_payments" id="menu_action_account_payments_receivable" parent="account.menu_finance_receivables" sequence="15"/>
<menuitem action="action_account_payments_payable" id="menu_action_account_payments_payable" parent="account.menu_finance_payables" sequence="20"/>
<record id="view_account_payment_invoice_form" model="ir.ui.view">
<field name="name">account.payment.invoice.form</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="view_account_payment_form"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//header" position='replace'></xpath>
<xpath expr="//div[@name='button_box']" position='replace'></xpath>
<xpath expr="//sheet" position='after'>
<footer>
<field name="state" invisible="1"/>
<button string='Validate' name="post" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>
</xpath>
</field>
</record>
<record id="action_account_invoice_from_list" model="ir.actions.server">
<field name="name">Register Payment</field>
<field name="model_id" ref="account.model_account_payment"/>
<field name="binding_model_id" ref="account.model_account_move"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
action = model.action_register_payment()
</field>
</record>
<!-- Action confirm_payments for multi -->
<record id="action_account_confirm_payments" model="ir.actions.server">
<field name="name">Post Payments</field>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="model_id" ref="account.model_account_payment"/>
<field name="binding_model_id" ref="account.model_account_payment"/>
<field name="binding_view_types">list</field>
<field name="code">
records.post()
</field>
</record>
</data>
</odoo>