[FIX] default_xxx in context was passed to relational fields,corrected.
lp bug: https://launchpad.net/bugs/408550 fixed bzr revid: jvo@tinyerp.com-20090804104650-a8k3tu8g72jdriok
This commit is contained in:
parent
420c19ef78
commit
d416be1bf5
|
@ -2427,7 +2427,7 @@ class orm(orm_template):
|
|||
# call the 'set' method of fields which are not classic_write
|
||||
upd_todo.sort(lambda x, y: self._columns[x].priority-self._columns[y].priority)
|
||||
|
||||
# default element in context must be remove when call a one2many or many2many
|
||||
# default element in context must be removed when call a one2many or many2many
|
||||
rel_context = context.copy()
|
||||
for c in context.items():
|
||||
if c[0].startswith('default_'):
|
||||
|
@ -2580,6 +2580,7 @@ class orm(orm_template):
|
|||
#End
|
||||
|
||||
for field in vals:
|
||||
if field in self._columns:
|
||||
if self._columns[field]._classic_write:
|
||||
upd0 = upd0 + ',"' + field + '"'
|
||||
upd1 = upd1 + ',' + self._columns[field]._symbol_set[0]
|
||||
|
@ -2635,7 +2636,7 @@ class orm(orm_template):
|
|||
cr.execute('update '+self._table+' set parent_right=parent_right+2 where parent_right>%s', (pleft,))
|
||||
cr.execute('update '+self._table+' set parent_left=%s,parent_right=%s where id=%s', (pleft+1,pleft+2,id_new))
|
||||
|
||||
# default element in context must be remove when call a one2many or many2many
|
||||
# default element in context must be removed when call a one2many or many2many
|
||||
rel_context = context.copy()
|
||||
for c in context.items():
|
||||
if c[0].startswith('default_'):
|
||||
|
|
Loading…
Reference in New Issue