diff --git a/addons/account/installer.py b/addons/account/installer.py index 70fcab91cb1..78eb8cf16e0 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -568,6 +568,7 @@ class account_installer(osv.osv_memory): def execute(self, cr, uid, ids, context=None): if context is None: context = {} + super(account_installer, self).execute(cr, uid, ids, context=context) fy_obj = self.pool.get('account.fiscalyear') mod_obj = self.pool.get('ir.model.data') obj_acc = self.pool.get('account.account') @@ -576,7 +577,6 @@ class account_installer(osv.osv_memory): obj_tax = self.pool.get('account.tax') obj_product = self.pool.get('product.product') ir_values = self.pool.get('ir.values') - super(account_installer, self).execute(cr, uid, ids, context=context) record = self.browse(cr, uid, ids, context=context)[0] company_id = record.company_id for res in self.read(cr, uid, ids, context=context): diff --git a/addons/account_sequence/account_sequence_installer.py b/addons/account_sequence/account_sequence_installer.py index d27d0aa9f32..7b0a6e7446d 100644 --- a/addons/account_sequence/account_sequence_installer.py +++ b/addons/account_sequence/account_sequence_installer.py @@ -45,8 +45,6 @@ class account_sequence_installer(osv.osv_memory): def execute(self, cr, uid, ids, context=None): if context is None: context = {} - jou_obj = self.pool.get('account.journal') - obj_sequence = self.pool.get('ir.sequence') record = self.browse(cr, uid, ids, context=context)[0] j_ids = [] if record.company_id: @@ -66,9 +64,11 @@ class account_sequence_installer(osv.osv_memory): 'padding' : record.padding, 'company_id': company_id, } - + + obj_sequence = self.pool.get('ir.sequence') ir_seq = obj_sequence.create(cr, uid, vals, context) res = super(account_sequence_installer, self).execute(cr, uid, ids, context=context) + jou_obj = self.pool.get('account.journal') journal_ids = jou_obj.search(cr, uid, search_criteria, context=context) for journal in jou_obj.browse(cr, uid, journal_ids, context=context): if not journal.internal_sequence_id: