summaryrefslogtreecommitdiff
path: root/addons/account/views/account_chart_template_views.xml
blob: f42f53ecdc75e1faa5f5738e900dc616952b34e4 (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>

        <!-- Chart of Accounts Templates -->

        <record id="view_account_chart_template_form" model="ir.ui.view">
            <field name="name">account.chart.template.form</field>
            <field name="model">account.chart.template</field>
            <field name="arch" type="xml">
                <form string="Chart of Accounts Template">
                    <group col="4">
                        <field name="name"/>
                        <field name="parent_id" />
                        <field name="bank_account_code_prefix"/>
                        <field name="cash_account_code_prefix"/>
                        <field name="transfer_account_code_prefix"/>
                        <field name="code_digits" />
                        <field name="visible" />
                        <field name="complete_tax_set" />
                    </group>
                    <separator string="Default Taxes" colspan="4"/>
                    <field name="tax_template_ids" colspan="4"  nolabel="1"/>
                    <separator string="Properties" colspan="4"/>
                    <group col="4">
                        <field name="property_account_receivable_id"/>
                        <field name="property_account_payable_id"/>
                        <field name="property_account_expense_categ_id"/>
                        <field name="property_account_income_categ_id"/>
                        <field name="property_account_expense_id"/>
                        <field name="property_account_income_id"/>
                    </group>
                </form>
            </field>
        </record>

        <record id="view_account_chart_template_seacrh" model="ir.ui.view">
            <field name="name">account.chart.template.search</field>
            <field name="model">account.chart.template</field>
            <field name="arch" type="xml">
                <search string="Search Chart of Account Templates">
                    <field name="name" string="Account Template"/>
                    <field name="bank_account_code_prefix"/>
                    <field name="cash_account_code_prefix"/>
                    <field name="transfer_account_code_prefix"/>
                    <group expand="0" string="Group By">
                        <filter string="Receivable Account" name="receivalbeacc" domain="[]" context="{'group_by':'property_account_receivable_id'}"/>
                        <filter string="Payable Account" name="payableacc" domain="[]" context="{'group_by':'property_account_payable_id'}"/>
                        <filter string="Income Account" name="incomeacc" domain="[]" context="{'group_by':'property_account_income_categ_id'}"/>
                        <filter string="Expense Account" name="expenseacc" domain="[]" context="{'group_by':'property_account_expense_categ_id'}"/>
                    </group>
                </search>
            </field>
        </record>

        <record id="view_account_chart_template_tree" model="ir.ui.view">
            <field name="name">account.chart.template.tree</field>
            <field name="model">account.chart.template</field>
            <field name="arch" type="xml">
                <tree string="Chart of Accounts Template">
                    <field name="name"/>
                    <field name="property_account_receivable_id" invisible="1"/>
                    <field name="property_account_payable_id" invisible="1"/>
                    <field name="property_account_expense_categ_id" invisible="1"/>
                    <field name="property_account_income_categ_id" invisible="1"/>
                </tree>
            </field>
        </record>
        <record id="action_account_chart_template_form" model="ir.actions.act_window">
            <field name="name">Chart of Accounts Templates</field>
            <field name="res_model">account.chart.template</field>
            <field name="view_mode">tree,form</field>
        </record>


        <!-- Account Templates -->

        <record id="view_account_template_form" model="ir.ui.view">
            <field name="name">account.account.template.form</field>
            <field name="model">account.account.template</field>
            <field name="arch" type="xml">
                <form string="Account Template">
                    <group col="4">
                        <field name="name"/>
                        <field name="code"/>
                        <newline/>
                        <field name="user_type_id" widget="account_hierarchy_selection"/>
                        <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
                        <field name="tag_ids" domain="[('applicability', '!=', 'taxes')]" widget="many2many_tags" context="{'default_applicability': 'accounts'}"/>
                        <field name="reconcile"/>
                        <field name="chart_template_id"/>
                    </group>
                    <separator string="Default Taxes"/>
                    <field name="tax_ids"/>
                    <separator string="Notes"/>
                    <field name="note" placeholder="Internal notes..."/>
                </form>
            </field>
        </record>

        <record id="view_account_template_tree" model="ir.ui.view">
            <field name="name">account.account.template.tree</field>
            <field name="model">account.account.template</field>
            <field name="arch" type="xml">
                <tree string="Account Template">
                    <field name="code"/>
                    <field name="name"/>
                    <field name="user_type_id" widget="account_hierarchy_selection" invisible="1"/>
                </tree>
            </field>
        </record>

        <record id="view_account_template_search" model="ir.ui.view">
            <field name="name">account.account.template.search</field>
            <field name="model">account.account.template</field>
            <field name="arch" type="xml">
                <search string="Search Account Templates">
                    <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Template"/>
                    <field name="user_type_id"/>
                    <group expand="0" string="Group By">
                        <filter string="Account Type" name="accounttype" domain="[]" context="{'group_by':'user_type_id'}"/>
                   </group>
                </search>
            </field>
        </record>

        <!-- Account Tax Templates -->

        <record id="view_account_tax_template_form" model="ir.ui.view">
            <field name="name">account.tax.template.form</field>
            <field name="model">account.tax.template</field>
            <field name="arch" type="xml">
                <form string="Account Tax Template">
                    <sheet>
                        <group name="main_group">
                            <group>
                                <field name="name"/>
                            </group>
                            <group>
                                <field name="type_tax_use"/>
                            </group>
                        </group>
                        <notebook>
                            <page name="definition" string="Definition">
                                <group name="tax_definitions">
                                    <group>
                                        <field name="amount_type" />
                                        <label for="amount" attrs="{'invisible':[('amount_type','=', 'group')]}"/>
                                        <div attrs="{'invisible':[('amount_type','=', 'group')]}">
                                            <field name="amount" class="oe_inline" />
                                            <span class="o_form_label oe_inline" attrs="{'invisible':[('amount_type','=','fixed')]}">%</span>
                                        </div>
                                    </group>
                                </group>
                                <field name="children_tax_ids"
                                    attrs="{'invisible':['|', ('amount_type','!=','group'), ('type_tax_use','=','none')]}"
                                    domain="[('type_tax_use','in',('none',type_tax_use)), ('amount_type','!=','group')]">
                                    <tree string="Children Taxes">
                                        <field name="sequence" widget="handle" />
                                        <field name="name"/>
                                        <field name="amount_type" />
                                        <field name="amount" />
                                    </tree>
                                </field>
                            </page>
                            <page name="advanced_options" string="Advanced Options">
                                <group name="advanced_definitions">
                                    <group>
                                        <field name="description" attrs="{'invisible':[('amount_type','=', 'group')]}"/>
                                        <field name="analytic" attrs="{'invisible':[('amount_type','=', 'group')]}" groups="analytic.group_analytic_accounting" />
                                    </group>
                                    <group name="price_definitions">
                                        <field name="price_include" attrs="{'invisible':[('amount_type','=', 'group')]}" />
                                        <field name="include_base_amount" attrs="{'invisible':[('amount_type','=', 'group')]}" />
                                    </group>
                                    <group name="tax_configuration">
                                        <field name="active" groups="base.group_no_one"/>
                                        <field name="tax_exigibility" widget="radio" attrs="{'invisible':[('amount_type','=', 'group')]}"/>
                                        <field name="cash_basis_transition_account_id" attrs="{'invisible': [('tax_exigibility', '=', 'on_invoice')], 'required': [('tax_exigibility', '=', 'on_payment')]}"/>
                                    </group>
                                </group>
                            </page>
                        </notebook>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="view_account_tax_template_tree" model="ir.ui.view">
            <field name="name">account.tax.template.tree</field>
            <field name="model">account.tax.template</field>
            <field name="arch" type="xml">
                <tree string="Account Tax Template">
                    <field name="name"/>
                    <field name="description"/>
                </tree>
            </field>
        </record>

        <record id="view_account_tax_template_search" model="ir.ui.view">
            <field name="name">account.tax.template.search</field>
            <field name="model">account.tax.template</field>
            <field name="arch" type="xml">
                <search string="Search Tax Templates">
                    <field name="name" filter_domain="['|', ('name', 'ilike', self), ('description', 'ilike', self)]" string="Tax Template"/>
                    <field name="chart_template_id"/>
                    <filter string="Sale" name="sale" domain="[('type_tax_use', '=', 'sale')]" help="Taxes used in Sales"/>
                    <filter string="Purchase" name="purchase" domain="[('type_tax_use', '=', 'purchase')]" help="Taxes used in Purchases"/>
                    <separator/>
                    <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
                </search>
            </field>
        </record>

        <record id="action_account_tax_template_form" model="ir.actions.act_window">
            <field name="name">Tax Templates</field>
            <field name="res_model">account.tax.template</field>
            <field name="view_mode">tree,form</field>
            <field name="search_view_id" ref="view_account_tax_template_search"/>
        </record>

         <!-- Fiscal Position Templates -->

        <record id="view_account_position_template_search" model="ir.ui.view">
            <field name="name">account.fiscal.position.template.search</field>
            <field name="model">account.fiscal.position.template</field>
            <field name="arch" type="xml">
                <search string="Fiscal Position">
                    <field name="name" string="Fiscal Position Template"/>
                </search>
            </field>
        </record>

        <record id="view_account_position_template_form" model="ir.ui.view">
            <field name="name">account.fiscal.position.template.form</field>
            <field name="model">account.fiscal.position.template</field>
            <field name="arch" type="xml">
                <form string="Fiscal Position Template">
                    <group col="4">
                        <field name="name"/>
                        <field name="chart_template_id"/>
                    </group>
                    <field name="tax_ids">
                        <tree string="Taxes Mapping" editable="bottom">
                            <field name="tax_src_id" domain="[('type_tax_use', '!=', None)]"/>
                            <field name="tax_dest_id" domain="[('type_tax_use', '!=', None)]"/>
                        </tree>
                        <form string="Taxes Mapping">
                            <field name="tax_src_id" domain="[('type_tax_use', '!=', None)]"/>
                            <field name="tax_dest_id" domain="[('type_tax_use', '!=', None)]"/>
                        </form>
                    </field>
                    <field name="account_ids">
                        <tree string="Accounts Mapping" editable="bottom">
                            <field name="account_src_id"/>
                            <field name="account_dest_id"/>
                        </tree>
                        <form string="Accounts Mapping">
                            <field name="account_src_id"/>
                            <field name="account_dest_id"/>
                        </form>
                    </field>
                </form>
            </field>
        </record>

        <record id="view_account_position_template_tree" model="ir.ui.view">
            <field name="name">account.fiscal.position.template.tree</field>
            <field name="model">account.fiscal.position.template</field>
            <field name="arch" type="xml">
                <tree string="Fiscal Position">
                    <field name="name"/>
                </tree>
            </field>
        </record>

    </data>
</odoo>