diff --git a/addons/account/__init__.py b/addons/account/__init__.py index ed12abbefeb..f1100ca4942 100644 --- a/addons/account/__init__.py +++ b/addons/account/__init__.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2004-2010 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index bb73c2527c0..359d6d3a4c9 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2004-2010 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/addons/account/account.py b/addons/account/account.py index dae61439df3..31ad948360e 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2004-2010 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -1716,21 +1716,28 @@ account_subscription_line() class account_config_wizard(osv.osv_memory): _name = 'account.config.wizard' + _inherit = 'res.config' def _get_charts(self, cr, uid, context): module_obj=self.pool.get('ir.module.module') - ids=module_obj.search(cr, uid, [('category_id', '=', 'Account Charts'), ('state', '<>', 'installed')]) + ids=module_obj.search(cr, uid, [('category_id', '=', 'Account Charts'), + ('state', '<>', 'installed')]) res=[(m.id, m.shortdesc) for m in module_obj.browse(cr, uid, ids)] res.append((-1, 'None')) res.sort(key=lambda x: x[1]) return res _columns = { - 'name':fields.char('Name', required=True, size=64, help="Name of the fiscal year as displayed on screens."), - 'code':fields.char('Code', required=True, size=64, help="Name of the fiscal year as displayed in reports."), + 'name':fields.char( + 'Name', required=True, size=64, + help="Name of the fiscal year as displayed on screens."), + 'code':fields.char( + 'Code', required=True, size=64, + help="Name of the fiscal year as displayed in reports."), 'date1': fields.date('Start Date', required=True), 'date2': fields.date('End Date', required=True), - 'period':fields.selection([('month','Month'),('3months','3 Months')], 'Periods', required=True), + 'period':fields.selection([('month','Month'), ('3months','3 Months')], + 'Periods', required=True), 'charts' : fields.selection(_get_charts, 'Charts of Account',required=True) } _defaults = { @@ -1740,15 +1747,6 @@ class account_config_wizard(osv.osv_memory): 'date2': lambda *a: time.strftime('%Y-12-31'), 'period':lambda *a:'month', } - def action_cancel(self,cr,uid,ids,conect=None): - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target':'new', - } - def install_account_chart(self, cr, uid, ids, context=None): for res in self.read(cr,uid,ids): chart_id = res['charts'] @@ -1758,7 +1756,7 @@ class account_config_wizard(osv.osv_memory): cr.commit() db, pool = pooler.restart_pool(cr.dbname, update_module=True) - def action_create(self, cr, uid,ids, context=None): + def execute(self, cr, uid, ids, context=None): for res in self.read(cr,uid,ids): if 'date1' in res and 'date2' in res: res_obj = self.pool.get('account.fiscalyear') @@ -1777,16 +1775,6 @@ class account_config_wizard(osv.osv_memory): elif res['period']=='3months': res_obj.create_period3(cr,uid,[new_id]) self.install_account_chart(cr,uid,ids) - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target':'new', - } - - - account_config_wizard() @@ -2125,6 +2113,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): * generates all accounting properties and assigns them correctly """ _name='wizard.multi.charts.accounts' + _inherit = 'res.config' _columns = { 'company_id':fields.many2one('res.company','Company',required=True), @@ -2145,7 +2134,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'code_digits': lambda *a:6, } - def action_create(self, cr, uid, ids, context=None): + def execute(self, cr, uid, ids, context=None): obj_multi = self.browse(cr,uid,ids[0]) obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') @@ -2408,24 +2397,6 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'position_id' : new_fp, } obj_ac_fp.create(cr, uid, vals_acc) - - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target':'new', - } - def action_cancel(self,cr,uid,ids,conect=None): - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target':'new', - } - - wizard_multi_charts_accounts() class account_bank_accounts_wizard(osv.osv_memory): diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 06871fa9342..40af2ba7ed2 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2004-2010 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 096f33b2496..c78d1c289fb 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2004-2010 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index bb40d78a1d0..4afb7e7837c 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# Copyright (C) 2004-2010 Tiny SPRL (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index c3df794dc1b..8bfa2882afd 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1447,8 +1447,13 @@ Account Configure wizard account.config.wizard form + -
+ + + Account Configure + + @@ -1457,13 +1462,9 @@ - -