From d544859812d0dca839bcd10fa61036da7a284765 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Mon, 31 May 2010 13:59:01 +0000
Subject: [PATCH] do not propagate the id as the title in case of missing the
 title property, that was originally implemented in r28901.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35788 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Legacy/Document/Rule.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Legacy/Document/Rule.py b/product/ERP5Legacy/Document/Rule.py
index 3708a2d7c0..d080d63abb 100644
--- a/product/ERP5Legacy/Document/Rule.py
+++ b/product/ERP5Legacy/Document/Rule.py
@@ -591,7 +591,12 @@ class Rule(Predicate, XMLObject):
 
     default_property_list = self.getExpandablePropertyList()
     for prop in default_property_list:
-      property_dict[prop] = movement.getProperty(prop)
+      # getProprety('title') returns the ID if title is not set, but we
+      # don't want to propagate such a value in simulation movements.
+      if prop in ('title',) and not movement.hasProperty(prop):
+        property_dict[prop] = None
+      else:
+        property_dict[prop] = movement.getProperty(prop)
 
     # rule specific
     property_dict.update(**self._getExpandablePropertyUpdateDict(applied_rule,
-- 
2.30.9