[FIX] Avoid to duplicate a field.related
lp bug: https://launchpad.net/bugs/544087 fixed bzr revid: stephane@openerp.com-20100331165916-auxhjr19vaaxn139
This commit is contained in:
+4
-1
@@ -756,11 +756,14 @@ class related(function):
|
||||
if self._type != "many2one":
|
||||
t_id = t_data.id
|
||||
t_data = t_data[self.arg[i]][0]
|
||||
else:
|
||||
t_data = False
|
||||
break
|
||||
else:
|
||||
t_id = t_data['id']
|
||||
t_data = t_data[self.arg[i]]
|
||||
|
||||
if t_id:
|
||||
if t_id and t_data:
|
||||
obj.pool.get(field_detail['object']).write(cr,uid,[t_id],{args[-1]:values}, context=context)
|
||||
|
||||
def _fnct_read(self, obj, cr, uid, ids, field_name, args, context=None):
|
||||
|
||||
+2
-1
@@ -3098,7 +3098,8 @@ class orm(orm_template):
|
||||
upd1 = upd1 + ',' + self._columns[field]._symbol_set[0]
|
||||
upd2.append(self._columns[field]._symbol_set[1](vals[field]))
|
||||
else:
|
||||
upd_todo.append(field)
|
||||
if not isinstance(self._columns[field], fields.related):
|
||||
upd_todo.append(field)
|
||||
if field in self._columns \
|
||||
and hasattr(self._columns[field], 'selection') \
|
||||
and vals[field]:
|
||||
|
||||
Reference in New Issue
Block a user