[MERGE] lp:openobject-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">
19                     <header>
20                         <button string="Apply" type="object" name="execute" class="oe_highlight"/>
21                     </header>
22                     <group col="4">
23                         <field name="has_default_company" invisible="1" />
24                         <field name="has_chart_of_accounts" invisible="1"/>
25                         <field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"
26                             attrs="{'invisible': [('has_default_company', '=', True)]}"/>
27                         <field name="expects_chart_of_accounts"/>
28                     </group>
29
30                     <group string="Select a Chart of Accounts to Install" col="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
31                         <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
32                         <button string="Install More Chart Templates" icon="gtk-go-forward"
33                             name="%(open_account_charts_modules)d" type="action"/>
34                         <newline/>
35                         <field name="code_digits" groups="account.group_account_user"/>
36                         <newline/>
37                         <field name="complete_tax_set" invisible="1"/>
38                         <field name="sale_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
39                             domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
40                         <field name="purchase_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
41                             domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
42                         <field name="sale_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
43                         <field name="purchase_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}"/>
44                     </group>
45
46                     <field name="has_fiscal_year" invisible="1"/>
47                     <group string="No Fiscal Year Defined for this Company" col="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
48                         <field name="date_start" on_change="onchange_start_date(date_start)"/>
49                         <field name="date_stop"/>
50                         <field name="period" colspan="4"/>
51                     </group>
52
53                     <field name="complete_tax_set" invisible="1"/>
54                     <group string="Accounting Configuration">
55                         <group>
56                             <field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
57                             <field name="module_account_accountant"/>
58                             <field name="module_account_asset"/>
59                         </group>
60                         <group>
61                             <field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
62                             <field name="currency_id"/>
63                             <field name="module_account_budget"/>
64                             <field name="decimal_precision"/>
65                         </group>
66                     </group>
67
68                     <field name="sale_journal_id" invisible="1"/>
69                     <field name="sale_refund_journal_id" invisible="1"/>
70                     <field name="purchase_journal_id" invisible="1"/>
71                     <field name="purchase_refund_journal_id" invisible="1"/>
72                     <group>
73                         <group string="Customer Invoices">
74                             <label string="Invoice Sequence" for="sale_sequence_prefix"/>
75                             <div>
76                                 <field name="sale_sequence_prefix" class="oe_inline"/>
77                                 <field name="sale_sequence_next" class="oe_inline" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
78                             </div>
79
80                             <label string="Credit Note Sequence" for="sale_refund_sequence_prefix"/>
81                             <div>
82                                 <field name="sale_refund_sequence_prefix" class="oe_inline"/>
83                                 <field name="sale_refund_sequence_next" class="oe_inline" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
84                             </div>
85                             <field name="module_account_invoice_layout"/>
86                             <field name="module_account_voucher"/>
87                             <field name="module_account_followup"/>
88                             <field name="group_proforma_invoices"/>
89                         </group>
90                         <group string="Supplier Invoices">
91                             <label string="Supplier Invoice Sequence" for="purchase_sequence_prefix"/>
92                             <div>
93                                 <field name="purchase_sequence_prefix" class="oe_inline"/>
94                                 <field name="purchase_sequence_next" class="oe_inline" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
95                             </div>
96                             <label string="Supplier Credit Note Sequence" for="purchase_refund_sequence_prefix"/>
97                             <div>
98                                 <field name="purchase_refund_sequence_prefix" class="oe_inline"/>
99                                 <field name="purchase_refund_sequence_next" class="oe_inline"
100                                   attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
101                             </div>
102                             <field name="module_account_payment"/>
103                         </group>
104                         <group string="Electronic Payments">
105                             <field name="paypal_account"/>
106                         </group>
107                         <group string="Bank &amp; Cash">
108                             <label string="Configure Bank Accounts :"/>
109                             <button name="%(action_bank_tree)d" string="Configure Bank Accounts" icon="gtk-go-forward" type="action"/>
110                             <field name="company_footer"/>
111                             <field name="module_account_check_writing"/>
112                         </group>
113                         <group name="analytic_accounting" invisible="1" string="Analytic Accounting"/>
114                     </group>
115                 </form>
116             </field>
117         </record>
118
119         <record id="action_account_config" model="ir.actions.act_window">
120             <field name="name">Configure Accounting</field>
121             <field name="type">ir.actions.act_window</field>
122             <field name="res_model">account.config.settings</field>
123             <field name="view_mode">form</field>
124             <field name="target">inline</field>
125         </record>
126
127         <menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
128             sequence="14" action="action_account_config"/>
129
130     </data>
131 </openerp>