From 86aaa35bada1a2db366cdf210603ace93342eff9 Mon Sep 17 00:00:00 2001
From: Yoshinori Okuji <yo@nexedi.com>
Date: Fri, 27 Mar 2009 11:48:00 +0000
Subject: [PATCH] Use edit rather than generating a new context for mapped
 value, otherwise properties must be pre-defined in Supply Cell, as unknown
 properties are ignored by getProperty. This is not quite convenient when the
 user extends other types of paths (e.g. Sale Supply Line). Using edit makes
 all unknown properties local properties, thus getProperty works.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26182 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Tool/DomainTool.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Tool/DomainTool.py b/product/ERP5/Tool/DomainTool.py
index d4967f0e99..f6d6ed3a00 100644
--- a/product/ERP5/Tool/DomainTool.py
+++ b/product/ERP5/Tool/DomainTool.py
@@ -255,7 +255,7 @@ class DomainTool(BaseTool):
                 if value is not None:
                   mapped_value_property_dict[mapped_value_property] = value
         # Update mapped value
-        mapped_value = mapped_value.asContext(**mapped_value_property_dict)
+        mapped_value.edit(**mapped_value_property_dict)
       return mapped_value
 
     # XXX FIXME method should not be public 
@@ -312,7 +312,7 @@ class DomainTool(BaseTool):
         if explanation_only:
           return explanation_dict
         # Update mapped value
-        mapped_value = mapped_value.asContext(**mapped_value_property_dict)
+        mapped_value.edit(**mapped_value_property_dict)
       return mapped_value
 
 
-- 
2.30.9