diff --git a/addons/account/__init__.py b/addons/account/__init__.py index 4bb0a3eb3c9..9cbc57bbdc9 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 @@ -20,6 +20,7 @@ ############################################################################## import account +import installer import project import partner import invoice diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index bb73c2527c0..d6465027059 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 @@ -58,6 +58,7 @@ 'process/supplier_invoice_process.xml', 'sequence_view.xml', 'company_view.xml', + 'account_installer.xml', ], 'demo_xml': [ 'account_demo.xml', diff --git a/addons/account/account.py b/addons/account/account.py index dae61439df3..a95e6107a68 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 @@ -1608,8 +1608,8 @@ class account_model_line(osv.osv): } _order = 'sequence' _sql_constraints = [ - ('credit_debit1', 'CHECK (credit*debit=0)', 'Wrong credit or debit value in model !'), - ('credit_debit2', 'CHECK (credit+debit>=0)', 'Wrong credit or debit value in model !'), + ('credit_debit1', 'CHECK (credit*debit=0)', 'Wrong credit or debit value in model (Credit Or Debit Must Be "0")!'), + ('credit_debit2', 'CHECK (credit+debit>=0)', 'Wrong credit or debit value in model (Credit + Debit Must Be greater "0")!'), ] account_model_line() @@ -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_installer.xml b/addons/account/account_installer.xml new file mode 100644 index 00000000000..4a1a1274e9f --- /dev/null +++ b/addons/account/account_installer.xml @@ -0,0 +1,63 @@ + + + + account.installer.view + account.installer + form + + + +
+ Accounting Modules Installation +
+ + + + + + + + + + Install Modules + +
+
+
+ + + Accounting Modules Installation + ir.actions.act_window + account.installer + + form + form + new + + + + + 1 + +
+
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 9b12f68c81e..caeb642101a 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 @@ - -