[Merge] Merge with main addons.
[odoo/odoo.git] / addons / account / res_config_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <record id="open_account_charts_modules" model="ir.actions.act_window">
6             <field name="name">Chart Templates</field>
7             <field name="res_model">ir.module.module</field>
8             <field name="view_mode">kanban,tree,form</field>
9             <field name="context" eval="{'search_default_category_id': ref('base.module_category_localization_account_charts')}"/>
10             <field name="search_view_id" ref="base.view_module_filter"/>
11         </record>
12
13         <record id="view_account_config_settings" model="ir.ui.view">
14             <field name="name">account settings</field>
15             <field name="model">account.config.settings</field>
16             <field name="type">form</field>
17             <field name="arch" type="xml">
18                 <form string="Configure Accounting" version="7.0" class="oe_form_configuration">
19                     <header>
20                         <button string="Apply" type="object" name="execute" class="oe_highlight"/>
21                         or
22                         <button string="Cancel" type="object" name="cancel" class="oe_link"/>
23                     </header>
24
25                     <field name="has_default_company" invisible="1" />
26                     <field name="has_chart_of_accounts" invisible="1"/>
27                     <field name="complete_tax_set" invisible="1"/>
28                     <field name="has_fiscal_year" invisible="1"/>
29                     <separator string="Chart of Accounts" groups="base.group_multi_company"/>
30                     <group groups="base.group_multi_company">
31                         <label for="id" string="Chart of Accounts"/>
32                         <div>
33                             <div attrs="{'invisible': [('has_default_company', '=', True)]}">
34                                 <label for="company_id" string="Select Company"/>
35                                 <field name="company_id"
36                                     widget="selection"
37                                     on_change="onchange_company_id(company_id)"
38                                     class="oe_inline"/>
39                             </div>
40                             <div>
41                                 <field name="expects_chart_of_accounts" class="oe_inline"/>
42                                 <label for="expects_chart_of_accounts"/>
43                             </div>
44                         </div>
45                     </group>
46                     <separator string="Chart of Accounts" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}"/>
47                     <group attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
48                         <label for="id" string="Chart of Account"/>
49                         <div>
50                             <div>
51                                 <label for="chart_template_id"/>
52                                 <field name="chart_template_id"
53                                     widget="selection"
54                                     domain="[('visible','=', True)]"
55                                     on_change="onchange_chart_template_id(chart_template_id)"
56                                     class="oe_inline"/>
57                                 <button string="Install more chart templates"
58                                     icon="gtk-go-forward"
59                                     name="%(open_account_charts_modules)d"
60                                     type="action"
61                                     class="oe_link"/>
62                             </div>
63                             <div groups="account.group_account_user">
64                                 <label for="code_digits"/>
65                                 <field name="code_digits" class="oe_inline"/>
66                             </div>
67                             <div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}">
68                                 <label for="sale_tax"/>
69                                 <field name="sale_tax"
70                                     domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"
71                                     class="oe_inline"/>
72                             </div>
73                             <div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}">
74                                 <label for="purchase_tax"/>
75                                 <field name="purchase_tax"
76                                     domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"
77                                     class="oe_inline"/>
78                             </div>
79                             <div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}">
80                                 <label for="sale_tax_rate"/>
81                                 <field name="sale_tax_rate" on_change="onchange_tax_rate(sale_tax_rate)"/>
82                             </div>
83                             <div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}">
84                                 <label for="purchase_tax_rate"/>
85                                 <field name="purchase_tax_rate" />
86                             </div>
87                         </div>
88                     </group>
89                     <separator string="No Fiscal Year Defined for This Company" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}"/>
90                     <group attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
91                         <label for="id" string="Fiscal Year"/>
92                         <div>
93                             <div>
94                                 <label for="date_start" string="Date Range"/>
95                                 <field name="date_start"
96                                     on_change="onchange_start_date(date_start)"
97                                     class="oe_inline"/> -
98                                 <field name="date_stop" class="oe_inline"/>
99                             </div>
100                             <div>
101                                 <label for="period"/>
102                                 <field name="period" class="oe_inline"/>
103                             </div>
104                         </div>
105                     </group>
106                     <separator string="Accounting &amp; Finance"/>
107                     <group>
108                         <label for="id" string="Options"/>
109                         <div name="account_config">
110                             <div>
111                                 <label for="currency_id"/>
112                                 <field name="currency_id" class="oe_inline"/>
113                             </div>
114                             <div>
115                                 <label for="decimal_precision"/>
116                                 <field name="decimal_precision" class="oe_inline"/>
117                             </div>
118                             <div>
119                                 <label for="tax_calculation_rounding_method"/>
120                                 <field name="tax_calculation_rounding_method" class="oe_inline"/>
121                             </div>
122                         </div>
123                         <label for="id" string="Features"/>
124                         <div>
125                             <div>
126                                 <field name="module_account_accountant" class="oe_inline"/>
127                                 <label for="module_account_accountant"/>
128                             </div>
129                             <div>
130                                 <field name="module_account_asset" class="oe_inline"/>
131                                 <label for="module_account_asset"/>
132                             </div>
133                             <div>
134                                 <field name="module_account_budget" class="oe_inline"/>
135                                 <label for="module_account_budget"/>
136                             </div>
137                         </div>
138                     </group>
139                     <separator string="eInvoicing &amp; Payments"/>
140                     <group>
141                         <label for="id" string="Customer"/>
142                         <div>
143                             <div attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
144                                 <label for="default_sale_tax"/>
145                                 <field name="default_sale_tax"
146                                     domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"
147                                     class="oe_inline"/>
148                             </div>
149                             <div>
150                                 <label for="sale_sequence_next"/>
151                                 <field name="sale_sequence_prefix"
152                                     class="oe_inline"
153                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
154                                 <field name="sale_sequence_next"
155                                     class="oe_inline"
156                                     attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
157                             </div>
158                             <div>
159                                 <label for="sale_refund_sequence_next"/>
160                                 <field name="sale_refund_sequence_prefix"
161                                     class="oe_inline"
162                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
163                                 <field name="sale_refund_sequence_next"
164                                     class="oe_inline"
165                                     attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
166                             </div>
167                             <div>
168                                 <field name="group_proforma_invoices" class="oe_inline"/>
169                                 <label for="group_proforma_invoices"/>
170                             </div>
171                             <div>
172                                 <field name="module_account_voucher" class="oe_inline"/>
173                                 <label for="module_account_voucher"/>
174                             </div>
175                             <div>
176                                 <field name="module_account_followup" class="oe_inline"/>
177                                 <label for="module_account_followup"/>
178                             </div>
179                         </div>
180                     </group>
181                     <group>
182                         <label for="id" string="Supplier"/>
183                         <div name="other_cofing">
184                             <div attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
185                                 <label for="default_purchase_tax"/>
186                                 <field name="default_purchase_tax"
187                                     domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"
188                                     class="oe_inline"/>
189                             </div>
190                             <div>
191                                 <label for="purchase_sequence_next"/>
192                                 <field name="purchase_sequence_prefix"
193                                     class="oe_inline"
194                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
195                                 <field name="purchase_sequence_next"
196                                     class="oe_inline"
197                                     attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
198                             </div>
199                             <div>
200                                 <label for="purchase_refund_sequence_next"/>
201                                 <field name="purchase_refund_sequence_prefix"
202                                     class="oe_inline"
203                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
204                                 <field name="purchase_refund_sequence_next"
205                                     class="oe_inline"
206                                     attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
207                             </div>
208                             <div>
209                                 <field name="module_account_payment" class="oe_inline"/>
210                                 <label for="module_account_payment"/>
211                             </div>
212                             <div>
213                                 <field name="module_account_check_writing" class="oe_inline"/>
214                                 <label for="module_account_check_writing"/>
215                             </div>
216                         </div>
217                     </group>
218                     <separator string="Bank &amp; Cash"/>
219                     <group>
220                         <label for="id" string="Configuration"/>
221                         <div>
222                             <div>
223                                 <button name="%(action_bank_tree)d"
224                                     string="Configure your bank accounts"
225                                     icon="gtk-go-forward"
226                                     type="action"
227                                     class="oe_inline oe_link"/>
228                             </div>
229                             <div>
230                                 <label for="paypal_account"/>
231                                 <field name="paypal_account" placeholder="e.g. sales@openerp.com" class="oe_inline"/>
232                             </div>
233                         </div>
234                     </group>
235                     <separator name="analytic_account" string="Analytic Accounting" invisible="1"/>
236                     <group name="analytic_account_sale" invisible="1">
237                         <label for="id" string="Sale"/>
238                         <div/>
239                     </group>
240                     <group name="analytic_account_purchase" invisible="1">
241                         <label for="id" string="Purchase"/>
242                         <div/>
243                     </group>
244                     <field name="sale_journal_id" invisible="1"/>
245                     <field name="sale_refund_journal_id" invisible="1"/>
246                     <field name="purchase_journal_id" invisible="1"/>
247                     <field name="purchase_refund_journal_id" invisible="1"/>
248                 </form>
249             </field>
250         </record>
251
252         <record id="action_account_config" model="ir.actions.act_window">
253             <field name="name">Configure Accounting</field>
254             <field name="type">ir.actions.act_window</field>
255             <field name="res_model">account.config.settings</field>
256             <field name="view_mode">form</field>
257             <field name="target">inline</field>
258         </record>
259
260         <menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
261             sequence="14" action="action_account_config"/>
262
263     </data>
264 </openerp>