diff --git a/addons/account/installer.py b/addons/account/installer.py index a6376694175..ee279701eef 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -469,7 +469,7 @@ class account_installer(osv.osv_memory): def execute(self, cr, uid, ids, context=None): if context is None: context = {} - res_obj = self.pool.get('account.fiscalyear') + fy_obj = self.pool.get('account.fiscalyear') data_pool = self.pool.get('ir.model.data') obj_acc = self.pool.get('account.account') super(account_installer, self).execute(cr, uid, ids, context=context) @@ -531,7 +531,7 @@ class account_installer(osv.osv_memory): 'company_id': company_id.id, 'sign': 1, 'parent_id':pur_tax_parent_id - } + } new_tax_code = self.pool.get('account.tax.code').create(cr, uid, vals_tax_code) purchase_tax = obj_tax.create(cr, uid, {'name':'TAX%s%%'%(p_tax*100), @@ -566,11 +566,11 @@ class account_installer(osv.osv_memory): 'date_stop': res['date_stop'], 'company_id': res['company_id'] } - period_id = res_obj.create(cr, uid, vals, context=context) + fy_id = fy_obj.create(cr, uid, vals, context=context) if res['period'] == 'month': - res_obj.create_period(cr, uid, [period_id]) + fy_obj.create_period(cr, uid, [fy_id]) elif res['period'] == '3months': - res_obj.create_period3(cr, uid, [period_id]) + fy_obj.create_period3(cr, uid, [fy_id]) # #fially inactive the demo chart of accounts # data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')])