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
|
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_payment_term_line_tree" model="ir.ui.view">
<field name="name">account.payment.term.line.tree</field>
<field name="model">account.payment.term.line</field>
<field name="arch" type="xml">
<tree string="Payment Terms">
<field name="sequence" widget="handle"/>
<field name="value" string="Due Type"/>
<field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
<field name="days"/>
<field name="option" string=""/>
<field name="day_of_the_month" string="Day of the month"/>
</tree>
</field>
</record>
<record id="view_payment_term_line_form" model="ir.ui.view">
<field name="name">account.payment.term.line.form</field>
<field name="model">account.payment.term.line</field>
<field name="arch" type="xml">
<form string="Payment Terms">
<h2>Term Type</h2>
<group>
<group>
<field name="value" widget="radio"/>
</group>
<group>
<div attrs="{'invisible':[('value','=', 'balance')]}" class="o_row">
<label for="value_amount" attrs="{'invisible':[('value','=', 'balance')]}"/>
<field name="value_amount" class="oe_inline"/>
<span class="o_form_label oe_inline" attrs="{'invisible':[('value','!=','percent')]}">%</span>
</div>
</group>
</group>
<field name="sequence" invisible="1"/>
<h2>Due Date Computation</h2>
<div colspan="2">
<label for="days" string="Due" attrs="{'invisible': [('option','!=', 'day_after_invoice_date')]}"/>
<label for="days" string="Due the" attrs="{'invisible': [('option','=', 'day_after_invoice_date')]}"/>
<field name="days" class="oe_inline"/>
<label for="option" string=""/> <!--Empty label to force space between elements-->
<field name="option" class="oe_inline"/>
</div>
<div colspan="2" attrs="{'invisible': [('option','!=', 'day_after_invoice_date')]}">
<label for="day_of_the_month" string="On the"/>
<field name="day_of_the_month" class="oe_inline"/>
<span class="o_form_label">of the month</span>
</div>
</form>
</field>
</record>
<record id="view_payment_term_search" model="ir.ui.view">
<field name="name">account.payment.term.search</field>
<field name="model">account.payment.term</field>
<field name="arch" type="xml">
<search string="Payment Terms">
<field name="name" string="Payment Terms"/>
<field name="active"/>
<separator/>
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
</search>
</field>
</record>
<record id="view_payment_term_tree" model="ir.ui.view">
<field name="name">account.payment.term.tree</field>
<field name="model">account.payment.term</field>
<field name="arch" type="xml">
<tree string="Payment Terms">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="view_payment_term_form" model="ir.ui.view">
<field name="name">account.payment.term.form</field>
<field name="model">account.payment.term</field>
<field name="arch" type="xml">
<form string="Payment Terms">
<sheet>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group>
<group>
<field name="active" invisible="1"/>
<field name="name"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</group>
</group>
<label for="note"/>
<field name="note" placeholder="Payment term explanation for the customer..."/>
<separator string="Terms"/>
<p class="text-muted">
The last line's computation type should be "Balance" to ensure that the whole amount will be allocated.
</p>
<field name="line_ids"/>
</sheet>
</form>
</field>
</record>
<record id="view_account_payment_term_kanban" model="ir.ui.view">
<field name="name">account.payment.term.kanban</field>
<field name="model">account.payment.term</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="name"/>
<field name="note"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div><strong class="o_kanban_record_title"><t t-esc="record.name.value"/></strong></div>
<div t-if="record.note.value"><t t-esc="record.note.value"/></div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="action_payment_term_form" model="ir.actions.act_window">
<field name="name">Payment Terms</field>
<field name="res_model">account.payment.term</field>
<field name="view_mode">tree,kanban,form</field>
<field name="search_view_id" ref="view_payment_term_search"/>
</record>
</data>
</odoo>
|