[FIX] account_sequence: fixed the previous change of field name internal_sequence_id
bzr revid: qdp-launchpad@tinyerp.com-20101126103844-1wnwbu00nk0pji1d
This commit is contained in:
parent
93c0f3f02f
commit
18a03628af
|
@ -33,11 +33,11 @@ class account_move(osv.osv):
|
|||
obj_sequence = self.pool.get('ir.sequence')
|
||||
res = super(account_move, self).post(cr, uid, ids, context=context)
|
||||
seq_no = False
|
||||
for line in self.browse(cr, uid, ids):
|
||||
if line.journal_id.internal_sequence:
|
||||
seq_no = obj_sequence.get_id(cr, uid, line.journal_id.internal_sequence.id, context=context)
|
||||
for move in self.browse(cr, uid, ids, context):
|
||||
if move.journal_id.internal_sequence_id:
|
||||
seq_no = obj_sequence.get_id(cr, uid, move.journal_id.internal_sequence_id.id, context=context)
|
||||
if seq_no:
|
||||
self.write(cr, uid, [line.id], {'internal_sequence_number': seq_no})
|
||||
self.write(cr, uid, [move.id], {'internal_sequence_number': seq_no})
|
||||
return res
|
||||
|
||||
account_move()
|
||||
|
|
Loading…
Reference in New Issue