[MERGE/IMP] lp:~openerp-commiter/openobject-addons/trunk-crm-sale-stock-imp-pat and...
[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_on_dirty"/>
21                         <button string="Cancel" type="object" name="cancel"/>
22                     </header>
23                     <sheet>
24                     <field name="has_default_company" invisible="1" />
25                     <field name="has_chart_of_accounts" invisible="1"/>
26                     <field name="complete_tax_set" invisible="1"/>
27                     <field name="has_fiscal_year" invisible="1"/>
28
29                     <group groups="base.group_multi_company">
30                         <field name="company_id" string="Select Company" widget="selection"
31                             on_change="onchange_company_id(company_id)"
32                             attrs="{'invisible': [('has_default_company', '=', True)]}"/>
33                         <field name="expects_chart_of_accounts"/>
34                     </group>
35
36                     <div class="oe_form_button_save_dirty">
37                     <group string="Select a Chart of Accounts to Install"
38                         attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
39                         <group>
40                             <field name="chart_template_id" widget="selection" domain="[('visible','=', True)]"
41                                 on_change="onchange_chart_template_id(chart_template_id)"/>
42                             <field name="code_digits" groups="account.group_account_user"/>
43                             <field name="sale_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
44                                 domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
45                             <field name="purchase_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
46                                 domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
47                             <field name="sale_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
48                             <field name="purchase_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}"/>
49                         </group>
50                         <button string="Install More Chart Templates" icon="gtk-go-forward"
51                             name="%(open_account_charts_modules)d" type="action"/>
52                     </group>
53                     </div>
54
55                     <div class="oe_form_button_save_dirty">
56                     <group string="No Fiscal Year Defined for This Company"
57                         attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
58                         <label for="date_start" string="Date Range"/>
59                         <div>
60                             <field name="date_start" on_change="onchange_start_date(date_start)" class="oe_inline"/> -
61                             <field name="date_stop" class="oe_inline"/>
62                         </div>
63                         <field name="period"/>
64                     </group>
65                     </div>
66
67                     <group string="Accounting Configuration">
68                         <group>
69                             <field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"
70                                 attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
71                             <field name="module_account_accountant"/>
72                             <field name="currency_id"/>
73                             <field name="decimal_precision"/>
74                         </group>
75                         <group>
76                             <field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"
77                                 attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
78                             <field name="module_account_asset"/>
79                             <field name="module_account_budget"/>
80                         </group>
81                     </group>
82
83                     <field name="sale_journal_id" invisible="1"/>
84                     <field name="sale_refund_journal_id" invisible="1"/>
85                     <field name="purchase_journal_id" invisible="1"/>
86                     <field name="purchase_refund_journal_id" invisible="1"/>
87                     <group>
88                         <group string="Customer Invoices">
89                             <label for="sale_sequence_next"/>
90                             <group>
91                                 <field name="sale_sequence_prefix" class="oe_inline" nolabel="1"
92                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
93                                 <field name="sale_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
94                             </group>
95                             <label for="sale_refund_sequence_next"/>
96                             <group>
97                                 <field name="sale_refund_sequence_prefix" class="oe_inline" nolabel="1"
98                                     help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
99                                 <field name="sale_refund_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
100                             </group>
101                             <field name="module_account_invoice_layout"/>
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                     </sheet>
138                 </form>
139             </field>
140         </record>
141
142         <record id="action_account_config" model="ir.actions.act_window">
143             <field name="name">Configure Accounting</field>
144             <field name="type">ir.actions.act_window</field>
145             <field name="res_model">account.config.settings</field>
146             <field name="view_mode">form</field>
147             <field name="target">inline</field>
148         </record>
149
150         <menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
151             sequence="14" action="action_account_config"/>
152
153     </data>
154 </openerp>