[IMP] Account: Installation of account chart and extra modules configuration separated

bzr revid: mra@mra-laptop-20100813035527-smo1d4ug86n3fawd
This commit is contained in:
MRA(OpenERP), PAP(OpenERP) 2010-08-13 09:25:27 +05:30 committed by Mustufa Rangwala
parent 9d37527287
commit 9c19076d09
2 changed files with 88 additions and 38 deletions

View File

@ -1,14 +1,14 @@
<openerp>
<data>
<record id="view_account_installer" model="ir.ui.view">
<field name="name">account.installer.view</field>
<record id="view_account_configuration_installer" model="ir.ui.view">
<field name="name">account.installer.form</field>
<field name="model">account.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Accounting Modules Installation</attribute>
<attribute name="string">Accounting System Configuration</attribute>
</form>
<separator string="title" position="attributes">
@ -54,37 +54,79 @@
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
<field name="purchase_tax" colspan="2" />
</group>
<group colspan="4" groups="base.group_extended">
<separator col="4" colspan="4" string="Install Extra Account Module"/>
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
<field name="account_asset"/>
<field name="account_voucher"/>
<field name="account_voucher_payment"/>
</group>
</group>
</group>
</data>
</field>
</record>
<record id="action_account_installer" model="ir.actions.act_window">
<field name="name">Accounting Modules Installation</field>
<record id="view_account_modules_installer" model="ir.ui.view">
<field name="name">account.installer.modules.form</field>
<field name="model">account.installer.modules</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Extra Accounting Modules Installation</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string"
>Install Extra Accounting Modules In Your Accounting System</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">From this screen, you can install extra accounting modules in your accounting system. Select the modules to directly install them. If you do not think you need any of these right now, you can easily install them later.</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>23</attribute>
<attribute name='string'></attribute>
</xpath>
<group colspan="8">
<group colspan="4" height="450" width="600">
<group colspan="4">
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
</group>
</group>
</group>
</data>
</field>
</record>
<record id="action_account_configuration_installer" model="ir.actions.act_window">
<field name="name">Accounting Chart Configuration</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer</field>
<field name="view_id" ref="view_account_installer"/>
<field name="view_id" ref="view_account_configuration_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<record id="action_account_installer" model="ir.actions.act_window">
<field name="name">Accounting Modules Installation</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer.modules</field>
<field name="view_id" ref="view_account_modules_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_configuration_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_configuration_installer"/>
<field name="sequence">3</field>
<field name="restart">onskip</field>
</record>
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<field name="sequence">5</field>
<field name="restart">always</field>
</record>
<record id="account_ir_actions_todo_tree" model="ir.ui.view">
<field name="model">ir.actions.todo</field>
<field name="name">account_installer_action_replace</field>
@ -92,7 +134,7 @@
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
<field name="arch" type="xml">
<xpath expr="//button[@string='Launch']" position="replace">
<button name="%(action_account_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
<button name="%(action_account_configuration_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
</xpath>
</field>
</record>

View File

@ -55,25 +55,6 @@ class account_installer(osv.osv_memory):
help="Installs localized accounting charts to match as closely as "
"possible the accounting needs of your company based on your "
"country."),
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_asset':fields.boolean('Assets Management',
help="Enables asset management in the accounting application, "
"including asset categories and usage periods."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
help="Extension Account Voucher module includes allows to link payment / receipt "
"entries with voucher, also automatically reconcile during the payment and receipt entries."),
'date_start': fields.date('Start Date', required=True),
'date_stop': fields.date('End Date', required=True),
'period':fields.selection([('month','Monthly'), ('3months','3 Monthly')],
@ -302,7 +283,7 @@ class account_installer(osv.osv_memory):
data_id = mod_obj.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_journal_view')])
data = mod_obj.browse(cr, uid, data_id[0])
view_id = data.res_id
seq_id = obj_sequence.search(cr,uid,[('name','=','Account Journal')])[0]
if seq_journal:
@ -518,3 +499,30 @@ class account_bank_accounts_wizard(osv.osv_memory):
}
account_bank_accounts_wizard()
class account_installer_modules(osv.osv_memory):
_name = 'account.installer.modules'
_inherit = 'res.config.installer'
_columns = {
# Accounting
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
help="Extension Account Voucher module includes allows to link payment / receipt "
"entries with voucher, also automatically reconcile during the payment and receipt entries."),
}
account_installer_modules()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: