[FIX] account installers: get objects after call to super()
bzr revid: chs@openerp.com-20110120160722-4xev4or5vewiefm1
This commit is contained in:
parent
c1a6deb968
commit
54a71a4e84
|
@ -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):
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue