|
@ -12,7 +12,7 @@ def get_new_values(model, record, on_change_result): |
|
|
for fieldname, value in vals.iteritems(): |
|
|
for fieldname, value in vals.iteritems(): |
|
|
if fieldname not in record: |
|
|
if fieldname not in record: |
|
|
column = model._fields[fieldname] |
|
|
column = model._fields[fieldname] |
|
|
if column.type == 'many2one': |
|
|
|
|
|
|
|
|
if value and column.type == 'many2one': |
|
|
value = value[0] # many2one are tuple (id, name) |
|
|
value = value[0] # many2one are tuple (id, name) |
|
|
new_values[fieldname] = value |
|
|
new_values[fieldname] = value |
|
|
return new_values |
|
|
return new_values |
|
|