[IMP]:improved config wizard for account

bzr revid: apa@tinyerp.com-20120723111511-v0sc4y146mhqainm
This commit is contained in:
Amit Patel (OpenERP) 2012-07-23 16:45:11 +05:30
parent 594a4f01e0
commit a0c19a8b3c
3 changed files with 233 additions and 94 deletions

View File

@ -25,96 +25,220 @@
<field name="has_chart_of_accounts" invisible="1"/>
<field name="complete_tax_set" invisible="1"/>
<field name="has_fiscal_year" invisible="1"/>
<separator string="Chart of Accounts"/>
<group groups="base.group_multi_company">
<field name="company_id" string="Select Company" widget="selection"
on_change="onchange_company_id(company_id)"
attrs="{'invisible': [('has_default_company', '=', True)]}"/>
<field name="expects_chart_of_accounts"/>
</group>
<group string="Select a Chart of Accounts to Install"
attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
<group>
<field name="chart_template_id" widget="selection" domain="[('visible','=', True)]"
on_change="onchange_chart_template_id(chart_template_id)"/>
<field name="code_digits" groups="account.group_account_user"/>
<field name="sale_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<field name="purchase_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
<field name="sale_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
<field name="purchase_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}"/>
</group>
<button string="Install More Chart Templates" icon="gtk-go-forward"
name="%(open_account_charts_modules)d" type="action"/>
</group>
<group string="No Fiscal Year Defined for This Company"
attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
<label for="date_start" string="Date Range"/>
<label for="id" string="Chart of Accounts"/>
<div>
<field name="date_start" on_change="onchange_start_date(date_start)" class="oe_inline"/> -
<field name="date_stop" class="oe_inline"/>
<div attrs="{'invisible': [('has_default_company', '=', True)]}">
<label for="company_id" string="Select Company"/>
<field name="company_id"
widget="selection"
on_change="onchange_company_id(company_id)"
class="oe_inline"/>
</div>
<div>
<field name="expects_chart_of_accounts" class="oe_inline"/>
<label for="expects_chart_of_accounts"/>
</div>
</div>
<field name="period"/>
</group>
<group attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
<label for="id" string="Select Chart"/>
<div>
<div>
<field name="chart_template_id"
widget="selection"
domain="[('visible','=', True)]"
on_change="onchange_chart_template_id(chart_template_id)"
class="oe_inline"/>
<button string="Install More Chart Templates"
icon="gtk-go-forward"
name="%(open_account_charts_modules)d"
type="action"
class="oe_link"/>
</div>
<div groups="account.group_account_user">
<label for="code_digits"/>
<field name="code_digits" class="oe_inline"/>
</div>
<div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}">
<label for="sale_tax"/>
<field name="sale_tax"
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"
class="oe_inline"/>
</div>
<div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}">
<label for="purchase_tax"/>
<field name="purchase_tax"
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"
class="oe_inline"/>
</div>
<div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}">
<label for="sale_tax_rate"/>
<field name="sale_tax_rate" on_change="onchange_tax_rate(sale_tax_rate)"/>
</div>
<div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}">
<label for="purchase_tax_rate"/>
<field name="purchase_tax_rate" />
</div>
</div>
</group>
<separator string="No Fiscal Year Defined for This Company" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}"/>
<group attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
<label for="id" string="Fiscal Year"/>
<div>
<div>
<label for="date_start" string="Date Range"/>
<field name="date_start"
on_change="onchange_start_date(date_start)"
class="oe_inline"/> -
<field name="date_stop" class="oe_inline"/>
</div>
<div>
<label for="period"/>
<field name="period" class="oe_inline"/>
</div>
</div>
</group>
<separator string="Accounting Configuration"/>
<group>
<group name="account_config">
<separator string="Accounting Configuration" colspan="2"/>
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"
attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="module_account_accountant"/>
<field name="currency_id"/>
<field name="decimal_precision"/>
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"
attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="tax_calculation_rounding_method"/>
<field name="module_account_asset"/>
<field name="module_account_budget"/>
<separator string="Customer Invoices" colspan="2"/>
<label for="sale_sequence_next"/>
<group>
<field name="sale_sequence_prefix" class="oe_inline" nolabel="1"
<label for="id" string="Configuration"/>
<div name="account_config">
<div attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
<field name="default_sale_tax"
domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"
class="oe_inline"/>
<label for="default_sale_tax"/>
</div>
<div>
<field name="module_account_accountant" class="oe_inline"/>
<label for="module_account_accountant"/>
</div>
<div>
<label for="currency_id"/>
<field name="currency_id" class="oe_inline"/>
</div>
<div>
<label for="decimal_precision"/>
<field name="decimal_precision" class="oe_inline"/>
</div>
<div attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
<label for="default_purchase_tax"/>
<field name="default_purchase_tax"
domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"
class="oe_inline"/>
</div>
<div>
<label for="tax_calculation_rounding_method"/>
<field name="tax_calculation_rounding_method" class="oe_inline"/>
</div>
<div>
<field name="module_account_asset" class="oe_inline"/>
<label for="module_account_asset"/>
</div>
<div>
<field name="module_account_budget" class="oe_inline"/>
<label for="module_account_budget"/>
</div>
</div>
</group>
<separator string="Invoices"/>
<group>
<label for="id" string="Customer Settings"/>
<div>
<div>
<label for="sale_sequence_next"/>
<field name="sale_sequence_prefix"
class="oe_inline"
help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
<field name="sale_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
</group>
<label for="sale_refund_sequence_next"/>
<group>
<field name="sale_refund_sequence_prefix" class="oe_inline" nolabel="1"
<field name="sale_sequence_next"
class="oe_inline"
attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
</div>
<div>
<label for="sale_refund_sequence_next"/>
<field name="sale_refund_sequence_prefix"
class="oe_inline"
help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
<field name="sale_refund_sequence_next" nolabel="1" class="oe_inline" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
</group>
<field name="module_account_voucher"/>
<field name="module_account_followup"/>
<field name="group_proforma_invoices"/>
<separator name="analytic_accounting" invisible="1" string="Analytic Accounting"/>
</group>
<group name="other_cofing">
<separator string="Supplier Invoices" colspan="2"/>
<label for="purchase_sequence_next"/>
<group>
<field name="purchase_sequence_prefix" class="oe_inline" nolabel="1"
<field name="sale_refund_sequence_next"
class="oe_inline"
attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
</div>
<div>
<field name="module_account_voucher" class="oe_inline"/>
<label for="module_account_voucher"/>
</div>
<div>
<field name="module_account_followup" class="oe_inline"/>
<label for="module_account_followup"/>
</div>
<div>
<field name="group_proforma_invoices" class="oe_inline"/>
<label for="group_proforma_invoices"/>
</div>
</div>
<label for="id" string="Supplier Settings"/>
<div name="other_cofing">
<div>
<label for="purchase_sequence_next"/>
<field name="purchase_sequence_prefix"
class="oe_inline"
help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
<field name="purchase_sequence_next" nolabel="1" class="oe_inline" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
</group>
<label for="purchase_refund_sequence_next"/>
<group>
<field name="purchase_refund_sequence_prefix" class="oe_inline" nolabel="1"
<field name="purchase_sequence_next"
class="oe_inline"
attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
</div>
<div>
<label for="purchase_refund_sequence_next"/>
<field name="purchase_refund_sequence_prefix"
class="oe_inline"
help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
<field name="purchase_refund_sequence_next" class="oe_inline"
attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}" nolabel="1"/>
</group>
<field name="module_account_payment"/>
<separator string="Electronic Payments" colspan="2"/>
<field name="paypal_account" placeholder="sales@openerp.com"/>
<separator string="Bank &amp; Cash" colspan="2"/>
<label for="id" string="Configure Bank Accounts"/>
<button name="%(action_bank_tree)d" string="Configure Bank Accounts" icon="gtk-go-forward" type="action"/>
<field name="company_footer"/>
<field name="module_account_check_writing"/>
</group>
<field name="purchase_refund_sequence_next"
class="oe_inline"
attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
</div>
<div>
<field name="module_account_payment" class="oe_inline"/>
<label for="module_account_payment"/>
</div>
</div>
</group>
<separator string="Electronic Payments"/>
<group>
<label for="id" string="Payment Settings"/>
<div>
<div>
<label for="paypal_account"/>
<field name="paypal_account" placeholder="sales@openerp.com" class="oe_inline"/>
</div>
</div>
</group>
<separator string="Bank &amp; Cash"/>
<group>
<label for="id" string="Configuration"/>
<div>
<div>
<label string="Configure Bank Accounts"/>
<button name="%(action_bank_tree)d"
string="Configure"
icon="gtk-go-forward"
type="action"
class="oe_inline oe_link"/>
</div>
<div>
<label for="company_footer"/>
<field name="company_footer" class="oe_inline"/>
</div>
<div>
<field name="module_account_check_writing" class="oe_inline"/>
<label for="module_account_check_writing"/>
</div>
</div>
</group>
<separator name="analytic_account" string="Analytic Accounting" invisible="1"/>
<group name="analytic_account" invisible="1">
<label for="id" string="Settings"/>
<div name="analytic_account"/>
</group>
<field name="sale_journal_id" invisible="1"/>
<field name="sale_refund_journal_id" invisible="1"/>

View File

@ -81,14 +81,22 @@
<field name="inherit_id" ref="account.view_account_config_settings"/>
<field name="priority" eval="18"/>
<field name="arch" type="xml">
<separator name="analytic_accounting" position="attributes">
<separator name="analytic_account" position="attributes">
<attribute name="invisible">0</attribute>
<attribute name="colspan">2</attribute>
</separator>
<separator name="analytic_accounting" position="after">
<field name="group_analytic_account_for_purchases"/>
<field name="module_purchase_analytic_plans" on_change="onchange_purchase_analytic_plans(module_purchase_analytic_plans)"/>
</separator>
<group name="analytic_account" position="attributes">
<attribute name="invisible">0</attribute>
</group>
<div name="analytic_account" position="inside">
<div>
<field name="group_analytic_account_for_purchases" class="oe_inline"/>
<label for="group_analytic_account_for_purchases"/>
</div>
<div>
<field name="module_purchase_analytic_plans" on_change="onchange_purchase_analytic_plans(module_purchase_analytic_plans)" class="oe_inline"/>
<label for="module_purchase_analytic_plans"/>
</div>
</div>
</field>
</record>

View File

@ -137,16 +137,23 @@
<field name="inherit_id" ref="account.view_account_config_settings"/>
<field name="priority" eval="16"/>
<field name="arch" type="xml">
<separator name="analytic_accounting" position="attributes">
<separator name="analytic_account" position="attributes">
<attribute name="invisible">0</attribute>
<attribute name="colspan">2</attribute>
</separator>
<separator name="analytic_accounting" position="after">
<field name="group_analytic_account_for_sales"/>
<field name="module_sale_analytic_plans" on_change="onchange_sale_analytic_plans(module_sale_analytic_plans)"/>
</separator>
<group name="analytic_account" position="attributes">
<attribute name="invisible">0</attribute>
</group>
<div name="analytic_account" position="inside">
<div>
<field name="group_analytic_account_for_sales" class="oe_inline"/>
<label for="group_analytic_account_for_sales"/>
</div>
<div>
<field name="module_sale_analytic_plans" on_change="onchange_sale_analytic_plans(module_sale_analytic_plans)" class="oe_inline"/>
<label for="module_sale_analytic_plans"/>
</div>
</div>
</field>
</record>
</data>
</openerp>