summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay (Open ERP) <jvo@tinyerp.com>2010-02-04 17:46:56 +0530
committerJay (Open ERP) <jvo@tinyerp.com>2010-02-04 17:46:56 +0530
commite81c40c7e7de4684fdfc2e2dfd9546750faa095b (patch)
treeeb8ecc250df59e01ace7edbe89a9d4ea1b31ffe4
parent17bf6ec27ff58a5ee9ffeb3e54038431abce03f8 (diff)
[FIX] default_FIELD from context should not overwrite modified FIELD value while creating record
lp bug: https://launchpad.net/bugs/516964 fixed bzr revid: jvo@tinyerp.com-20100204121656-pzh1opx6kbrywscg
-rw-r--r--bin/osv/orm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/osv/orm.py b/bin/osv/orm.py
index f7246b93678..d1ea04f01d8 100644
--- a/bin/osv/orm.py
+++ b/bin/osv/orm.py
@@ -2140,7 +2140,7 @@ class orm(orm_template):
field_value = field_value2
value[field] = field_value
for key in context or {}:
- if key.startswith('default_'):
+ if key.startswith('default_') and (key[8:] in fields_list):
value[key[8:]] = context[key]
return value