[FIX] fields.related (m2o poiting to M2M/O2M should be skipped during write.

lp bug: https://launchpad.net/bugs/386273 fixed

bzr revid: stephane@tinyerp.com-20090616142906-53zqcxwu2umcavv4
This commit is contained in:
Stephane Wirtel 2009-06-16 16:29:06 +02:00
parent 846db679fc
commit 5931140af4
1 changed files with 3 additions and 2 deletions

View File

@ -686,8 +686,9 @@ class related(function):
t_data = False
break
if field_detail['type'] in ('one2many', 'many2many'):
t_id=t_data.id
t_data = t_data[self.arg[i]][0]
if self._type != "many2one":
t_id=t_data.id
t_data = t_data[self.arg[i]][0]
else:
t_id=t_data['id']
t_data = t_data[self.arg[i]]