From 029a43a586905e64f452a4bcef776e283d1aa88a Mon Sep 17 00:00:00 2001
From: Guillaume Michon <guillaume@nexedi.com>
Date: Fri, 30 Jul 2004 13:06:03 +0000
Subject: [PATCH] Corrected the acquisition value copying in accessor

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

diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py
index ae459f7c6b..4b66cb04ca 100755
--- a/product/ERP5Type/Base.py
+++ b/product/ERP5Type/Base.py
@@ -229,10 +229,10 @@ class Base( CopyContainer, PortalContent, Base18, ActiveObject, ERP5PropertyMana
         value = method() # We should add depends here XXXXXX
                          # There is also a strong risk here of infinite loop
       if copy_value:
-        if not hasattr(self, storage_id):
+        if not getattr(self, storage_id, None):
           # Copy the value if it does not already exist as an attribute of self
           # Like in the case of orders / invoices
-          setattr(self, value)
+          setattr(self, storage_id, value)
       if is_list_type:
         # We must provide the first element of the acquired list
         if value is None:
-- 
2.30.9