[FIX] account: fixed line_ids nto mandatory in vals when creating a new statement
bzr revid: qdp-launchpad@tinyerp.com-20100914181352-mspg1snv87jss1ek
This commit is contained in:
parent
3d9c59ff01
commit
b602119abd
|
@ -31,10 +31,11 @@ class account_bank_statement(osv.osv):
|
||||||
|
|
||||||
def create(self, cr, uid, vals, context=None):
|
def create(self, cr, uid, vals, context=None):
|
||||||
seq = 0
|
seq = 0
|
||||||
for line in vals['line_ids']:
|
if 'line_ids' in vals:
|
||||||
seq += 1
|
for line in vals['line_ids']:
|
||||||
line[2]['sequence'] = seq
|
seq += 1
|
||||||
vals[seq - 1] = line
|
line[2]['sequence'] = seq
|
||||||
|
vals[seq - 1] = line
|
||||||
return super(account_bank_statement, self).create(cr, uid, vals, context=context)
|
return super(account_bank_statement, self).create(cr, uid, vals, context=context)
|
||||||
|
|
||||||
def write(self, cr, uid, ids, vals, context=None):
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
|
|
Loading…
Reference in New Issue