d7eda0a269279eccbc541da3566c5f97daa86b4c
[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">
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
30                     <group groups="base.group_multi_company">
31                         <field name="company_id" string="Select Company" widget="selection"
32                             on_change="onchange_company_id(company_id)"
33                             attrs="{'invisible': [('has_default_company', '=', True)]}"/>
34                         <field name="expects_chart_of_accounts"/>
35                     </group>
36
37                     <div class="oe_form_button_save_dirty">
38                     <group string="Select a Chart of Accounts to Install"
39                         attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
40                         <group>
41                             <field name="chart_template_id" widget="selection" domain="[('visible','=', True)]"
42                                 on_change="onchange_chart_template_id(chart_template_id)"/>
43                             <field name="code_digits" groups="account.group_account_user"/>
44                             <field name="sale_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
45                                 domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
46                             <field name="purchase_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
47                                 domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
48                             <field name="sale_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
49                             <field name="purchase_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}"/>
50                         </group>
51                         <button string="Install More Chart Templates" icon="gtk-go-forward"
52                             name="%(open_account_charts_modules)d" type="action"/>
53                     </group>
54                     </div>
55
56                     <div class="oe_form_button_save_dirty">
57                     <group string="No Fiscal Year Defined for This Company"
58                         attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
59                         <label for="date_start" string="Date Range"/>
60                         <div>
61                             <field name="date_start" on_change="onchange_start_date(date_start)" class="oe_inline"/> -
62                             <field name="date_stop" class="oe_inline"/>
63                         </div>
64                         <field name="period"/>
65                     </group>
66                     </div>
67
68                     <group string="Accounting Configuration">
69                         <group>
70                             <field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"
71                                 attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
72                             <field name="module_account_accountant"/>
73                             <field name="currency_id"/>
74                             <field name="decimal_precision"/>
75                         </group>
76                         <group>
77                             <field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"
78                                 attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
79                             <field name="module_account_asset"/>
80                             <field name="module_account_budget"/>
81                         </group>
82                     </group>
83
84                     <field name="sale_journal_id" invisible="1"/>
85                     <field name="sale_refund_journal_id" invisible="1"/>
86                     <field name="purchase_journal_id" invisible="1"/>
87                     <field name="purchase_refund_journal_id" invisible="1"/>
88                     <group>
89                         <group string="Customer Invoices">
90                             <label for="sale_sequence_next"/>
91                             <group>
92                                 <field name="sale_sequence_prefix" class="oe_inline" nolabel="1"
93                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
94                                 <field name="sale_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
95                             </group>
96                             <label for="sale_refund_sequence_next"/>
97                             <group>
98                                 <field name="sale_refund_sequence_prefix" class="oe_inline" nolabel="1"
99                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
100                                 <field name="sale_refund_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
101                             </group>
102                             <field name="module_account_voucher"/>
103                             <field name="module_account_followup"/>
104                             <field name="group_proforma_invoices"/>
105                         </group>
106
107                         <group string="Supplier Invoices">
108                              <label for="purchase_sequence_next"/>
109                             <group>
110                                 <field name="purchase_sequence_prefix" class="oe_inline" nolabel="1"
111                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
112                                 <field name="purchase_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
113                             </group>
114                             <label for="purchase_refund_sequence_next"/>
115                             <group>
116                                 <field name="purchase_refund_sequence_prefix" class="oe_inline" nolabel="1"
117                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
118                                 <field name="purchase_refund_sequence_next" class="oe_inline" nolabel="1"
119                                   attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
120                             </group>
121                             <field name="module_account_payment"/>
122                         </group>
123
124                         <group string="Electronic Payments">
125                             <field name="paypal_account" placeholder="sales@openerp.com"/>
126                         </group>
127
128                         <group string="Bank &amp; Cash">
129                             <label for="id" string="Configure Bank Accounts"/>
130                             <button name="%(action_bank_tree)d" string="Configure Bank Accounts" icon="gtk-go-forward" type="action"/>
131                             <field name="company_footer"/>
132                             <field name="module_account_check_writing"/>
133                         </group>
134
135                         <group name="analytic_accounting" invisible="1" string="Analytic Accounting"/>
136                     </group>
137                 </form>
138             </field>
139         </record>
140
141         <record id="action_account_config" model="ir.actions.act_window">
142             <field name="name">Configure Accounting</field>
143             <field name="type">ir.actions.act_window</field>
144             <field name="res_model">account.config.settings</field>
145             <field name="view_mode">form</field>
146             <field name="target">inline</field>
147         </record>
148
149         <menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
150             sequence="14" action="action_account_config"/>
151
152     </data>
153 </openerp>