summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@openerp.com>2013-11-24 12:52:35 +0100
committerChristophe Simonis <chs@openerp.com>2013-11-24 12:52:35 +0100
commit84fd6ea4f1fbd9b8b70e8dd01989286f4a8ed4e6 (patch)
treeac14d532947d18ea57e750241df41c864f6bd0cd
parentfb44c859e2cbdc93471f9c5bc9f5f0992d2b280c (diff)
[FIX] yaml import: for record tags, do not shadow values explicitly set in yaml.
bzr revid: chs@openerp.com-20131124115235-13sc11q51v95hxfr
-rw-r--r--openerp/tools/yaml_import.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openerp/tools/yaml_import.py b/openerp/tools/yaml_import.py
index aba9db25f13..a418cb9f841 100644
--- a/openerp/tools/yaml_import.py
+++ b/openerp/tools/yaml_import.py
@@ -448,9 +448,9 @@ class YamlInterpreter(object):
result = getattr(model, match.group(1))(self.cr, SUPERUSER_ID, [], *args)
for key, val in (result or {}).get('value', {}).items():
assert key in fg, "The returning field '%s' from your on_change call '%s' does not exist either on the object '%s', either in the view '%s' used for the creation" % (key, match.group(1), model._name, view_info['name'])
- record_dict[key] = process_val(key, val)
- #if (key in fields) and record_dict[key] == process_val(key, val):
- # print '*** You can remove these lines:', key, val
+ if key not in fields:
+ # do not shadow values explicitly set in yaml.
+ record_dict[key] = process_val(key, val)
else:
nodes = list(el) + nodes
else: