4dfa1d83c02875535a39b0ddc14313aeee82f75e
[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                     <group attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
47                         <label for="id" string="Select Chart"/>
48                         <div>
49                             <div>
50                                 <field name="chart_template_id"
51                                     widget="selection"
52                                     domain="[('visible','=', True)]"
53                                     on_change="onchange_chart_template_id(chart_template_id)"
54                                     class="oe_inline"/>
55                                 <button string="Install More Chart Templates"
56                                     icon="gtk-go-forward"
57                                     name="%(open_account_charts_modules)d"
58                                     type="action"
59                                     class="oe_link"/>
60                             </div>
61                             <div groups="account.group_account_user">
62                                 <label for="code_digits"/>
63                                 <field name="code_digits" class="oe_inline"/>
64                             </div>
65                             <div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}">
66                                 <label for="sale_tax"/>
67                                 <field name="sale_tax"
68                                     domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"
69                                     class="oe_inline"/>
70                             </div>
71                             <div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}">
72                                 <label for="purchase_tax"/>
73                                 <field name="purchase_tax"
74                                     domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"
75                                     class="oe_inline"/>
76                             </div>
77                             <div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}">
78                                 <label for="sale_tax_rate"/>
79                                 <field name="sale_tax_rate" on_change="onchange_tax_rate(sale_tax_rate)"/>
80                             </div>
81                             <div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}">
82                                 <label for="purchase_tax_rate"/>
83                                 <field name="purchase_tax_rate" />
84                             </div>
85                         </div>
86                     </group>
87                     <separator string="No Fiscal Year Defined for This Company" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}"/>
88                     <group attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
89                         <label for="id" string="Fiscal Year"/>
90                         <div>
91                             <div>
92                                 <label for="date_start" string="Date Range"/>
93                                 <field name="date_start"
94                                     on_change="onchange_start_date(date_start)"
95                                     class="oe_inline"/> -
96                                 <field name="date_stop" class="oe_inline"/>
97                             </div>
98                             <div>
99                                 <label for="period"/>
100                                 <field name="period" class="oe_inline"/>
101                             </div>
102                         </div>
103                     </group>
104                     <separator string="Accounting Configuration"/>
105                     <group>
106                         <label for="id" string="Configuration"/>
107                         <div name="account_config">
108                             <div>
109                                 <field name="module_account_accountant" class="oe_inline"/>
110                                 <label for="module_account_accountant"/>
111                             </div>
112                             <div>
113                                 <label for="currency_id"/>
114                                 <field name="currency_id" class="oe_inline"/>
115                             </div>
116                             <div>
117                                 <label for="decimal_precision"/>
118                                 <field name="decimal_precision" class="oe_inline"/>
119                             </div>
120                             <div>
121                                 <label for="tax_calculation_rounding_method"/>
122                                 <field name="tax_calculation_rounding_method" class="oe_inline"/>
123                             </div>
124                             <div>
125                                 <field name="module_account_asset" class="oe_inline"/>
126                                 <label for="module_account_asset"/>
127                             </div>
128                             <div>
129                                 <field name="module_account_budget" class="oe_inline"/>
130                                 <label for="module_account_budget"/>
131                             </div>
132                         </div>
133                     </group>
134                     <separator string="eInvoicing &amp; Payments"/>
135                     <group>
136                         <label for="id" string="Customer"/>
137                         <div>
138                             <div attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
139                                 <label for="default_sale_tax"/>
140                                 <field name="default_sale_tax"
141                                     domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"
142                                     class="oe_inline"/>
143                             </div>
144                             <div>
145                                 <label for="sale_sequence_next"/>
146                                 <field name="sale_sequence_prefix"
147                                     class="oe_inline"
148                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
149                                 <field name="sale_sequence_next"
150                                     class="oe_inline"
151                                     attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
152                             </div>
153                             <div>
154                                 <label for="sale_refund_sequence_next"/>
155                                 <field name="sale_refund_sequence_prefix"
156                                     class="oe_inline"
157                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
158                                 <field name="sale_refund_sequence_next"
159                                     class="oe_inline"
160                                     attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
161                             </div>
162                             <div>
163                                 <field name="module_account_voucher" class="oe_inline"/>
164                                 <label for="module_account_voucher"/>
165                             </div>
166                             <div>
167                                 <field name="module_account_followup" class="oe_inline"/>
168                                 <label for="module_account_followup"/>
169                             </div>
170                             <div>
171                                 <field name="group_proforma_invoices" class="oe_inline"/>
172                                 <label for="group_proforma_invoices"/>
173                             </div>
174                         </div>
175                         <label for="id" string="Supplier"/>
176                         <div name="other_cofing">
177                             <div attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
178                                 <label for="default_purchase_tax"/>
179                                 <field name="default_purchase_tax"
180                                     domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"
181                                     class="oe_inline"/>
182                             </div>
183                             <div>
184                                 <label for="purchase_sequence_next"/>
185                                 <field name="purchase_sequence_prefix"
186                                     class="oe_inline"
187                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
188                                 <field name="purchase_sequence_next"
189                                     class="oe_inline"
190                                     attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
191                             </div>
192                             <div>
193                                 <label for="purchase_refund_sequence_next"/>
194                                 <field name="purchase_refund_sequence_prefix"
195                                     class="oe_inline"
196                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
197                                 <field name="purchase_refund_sequence_next"
198                                     class="oe_inline"
199                                     attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
200                             </div>
201                             <div>
202                                 <field name="module_account_payment" class="oe_inline"/>
203                                 <label for="module_account_payment"/>
204                             </div>
205                         </div>
206                     </group>
207                     <separator string="Electronic Payments"/>
208                     <group>
209                         <label for="id" string="Payment Settings"/>
210                         <div>
211                             <div>
212                                 <label for="paypal_account"/>
213                                 <field name="paypal_account" placeholder="sales@openerp.com" class="oe_inline"/>
214                             </div>
215                         </div>
216                     </group>
217                     <separator string="Bank &amp; Cash"/>
218                     <group>
219                         <label for="id" string="Configuration"/>
220                         <div>
221                             <div>
222                                 <label string="Configure Bank Accounts"/>
223                                 <button name="%(action_bank_tree)d"
224                                     string="Configure"
225                                     icon="gtk-go-forward"
226                                     type="action"
227                                     class="oe_inline oe_link"/>
228                             </div>
229                             <div>
230                                 <label for="company_footer"/>
231                                 <field name="company_footer" class="oe_inline"/>
232                             </div>
233                             <div>
234                                 <field name="module_account_check_writing" class="oe_inline"/>
235                                 <label for="module_account_check_writing"/>
236                             </div>
237                         </div>
238                     </group>
239                     <separator name="analytic_account" string="Analytic Accounting" invisible="1"/>
240                     <group name="analytic_account" invisible="1">
241                         <label for="id" string="Settings"/>
242                         <div name="analytic_account"/>
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>