[Erp5-report] r33299 kazuhiko - in /erp5/trunk: bt5/erp5_base/ActionTemplateItem/portal_typ...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 3 06:24:32 CET 2010


Author: kazuhiko
Date: Wed Mar  3 06:24:32 2010
New Revision: 33299

URL: http://svn.erp5.org?rev=33299&view=rev
Log:
rename from Property Mapping to Mapped Property.

Added:
    erp5/trunk/bt5/erp5_base/ActionTemplateItem/portal_types/Mirror%20Category%20Movement%20Group/
      - copied from r33066, erp5/trunk/bt5/erp5_base/ActionTemplateItem/portal_types/Property%20Movement%20Group/
    erp5/trunk/bt5/erp5_base/ActionTemplateItem/portal_types/Mirror%20Movement%20Group/
      - copied from r33066, erp5/trunk/bt5/erp5_base/ActionTemplateItem/portal_types/Property%20Movement%20Group/
    erp5/trunk/bt5/erp5_base/ActionTemplateItem/portal_types/Mirror%20Property%20Movement%20Group/
      - copied from r33066, erp5/trunk/bt5/erp5_base/ActionTemplateItem/portal_types/Property%20Movement%20Group/
    erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Category%20Movement%20Group.xml
      - copied, changed from r33066, erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml
    erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Movement%20Group.xml
      - copied, changed from r33066, erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml
    erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Property%20Movement%20Group.xml
      - copied, changed from r33066, erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml
    erp5/trunk/products/ERP5/Document/MappedProperty.py
      - copied, changed from r33298, erp5/trunk/products/ERP5/Document/PropertyMapping.py
    erp5/trunk/products/ERP5/PropertySheet/MappedProperty.py
      - copied, changed from r33298, erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py
Removed:
    erp5/trunk/products/ERP5/Document/PropertyMapping.py
    erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py

Copied: erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Category%20Movement%20Group.xml (from r33066, erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml)
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%2520Category%2520Movement%2520Group.xml?p2=erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%2520Category%2520Movement%2520Group.xml&p1=erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%2520Movement%2520Group.xml&r1=33066&r2=33299&rev=33299&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Category%20Movement%20Group.xml [utf8] Wed Mar  3 06:24:32 2010
@@ -19,7 +19,7 @@
         </item>
         <item>
             <key> <string>content_meta_type</string> </key>
-            <value> <string>ERP5 Property Movement Group</string> </value>
+            <value> <string>ERP5 Mirror Category Movement Group</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>
@@ -29,7 +29,7 @@
         </item>
         <item>
             <key> <string>factory</string> </key>
-            <value> <string>addPropertyMovementGroup</string> </value>
+            <value> <string>addMirrorCategoryMovementGroup</string> </value>
         </item>
         <item>
             <key> <string>filter_content_types</string> </key>
@@ -45,7 +45,7 @@
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>Property Movement Group</string> </value>
+            <value> <string>Mirror Category Movement Group</string> </value>
         </item>
         <item>
             <key> <string>init_script</string> </key>

Copied: erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Movement%20Group.xml (from r33066, erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml)
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%2520Movement%2520Group.xml?p2=erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%2520Movement%2520Group.xml&p1=erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%2520Movement%2520Group.xml&r1=33066&r2=33299&rev=33299&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Movement%20Group.xml [utf8] Wed Mar  3 06:24:32 2010
@@ -19,7 +19,7 @@
         </item>
         <item>
             <key> <string>content_meta_type</string> </key>
-            <value> <string>ERP5 Property Movement Group</string> </value>
+            <value> <string>ERP5 Mirror Movement Group</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>
@@ -29,7 +29,7 @@
         </item>
         <item>
             <key> <string>factory</string> </key>
-            <value> <string>addPropertyMovementGroup</string> </value>
+            <value> <string>addMirrorMovementGroup</string> </value>
         </item>
         <item>
             <key> <string>filter_content_types</string> </key>
@@ -45,7 +45,7 @@
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>Property Movement Group</string> </value>
+            <value> <string>Mirror Movement Group</string> </value>
         </item>
         <item>
             <key> <string>init_script</string> </key>

Copied: erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Property%20Movement%20Group.xml (from r33066, erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml)
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%2520Property%2520Movement%2520Group.xml?p2=erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%2520Property%2520Movement%2520Group.xml&p1=erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%2520Movement%2520Group.xml&r1=33066&r2=33299&rev=33299&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Property%20Movement%20Group.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/PortalTypeTemplateItem/portal_types/Mirror%20Property%20Movement%20Group.xml [utf8] Wed Mar  3 06:24:32 2010
@@ -19,7 +19,7 @@
         </item>
         <item>
             <key> <string>content_meta_type</string> </key>
-            <value> <string>ERP5 Property Movement Group</string> </value>
+            <value> <string>ERP5 Mirror Property Movement Group</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>
@@ -29,7 +29,7 @@
         </item>
         <item>
             <key> <string>factory</string> </key>
-            <value> <string>addPropertyMovementGroup</string> </value>
+            <value> <string>addMirrorPropertyMovementGroup</string> </value>
         </item>
         <item>
             <key> <string>filter_content_types</string> </key>
@@ -45,7 +45,7 @@
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>Property Movement Group</string> </value>
+            <value> <string>Mirror Property Movement Group</string> </value>
         </item>
         <item>
             <key> <string>init_script</string> </key>

Copied: erp5/trunk/products/ERP5/Document/MappedProperty.py (from r33298, erp5/trunk/products/ERP5/Document/PropertyMapping.py)
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/MappedProperty.py?p2=erp5/trunk/products/ERP5/Document/MappedProperty.py&p1=erp5/trunk/products/ERP5/Document/PropertyMapping.py&r1=33298&r2=33299&rev=33299&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PropertyMapping.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/MappedProperty.py [utf8] Wed Mar  3 06:24:32 2010
@@ -29,18 +29,14 @@
 from Products.ERP5Type import Permissions, PropertySheet
 from Products.ERP5Type.XMLObject import XMLObject
 
-class PropertyMapping(XMLObject):
+class MappedProperty(XMLObject):
   """
-  Property Mapping object describes how properties or categories are
+  Mapped Property object describes how properties or categories are
   mapped, eg. use source as destination, use destination as source, use
   quantity as -quantity, etc.
-
-  TODO:
-  - make sure naming is consistent with MappedValue document class
-    and rename if needed (XXX-JPS)
   """
-  meta_type = 'ERP5 Property Mapping'
-  portal_type = 'Property Mapping'
+  meta_type = 'ERP5 Mapped Property'
+  portal_type = 'Mapped Property'
   add_permission = Permissions.AddPortalContent
 
   # Declarative security
@@ -51,11 +47,11 @@
   property_sheets = (PropertySheet.Base,
                      PropertySheet.SimpleItem,
                      PropertySheet.CategoryCore,
-                     PropertySheet.PropertyMapping)
+                     PropertySheet.MappedProperty)
 
   security.declareProtected(Permissions.AccessContentsInformation,
-                            'getMappedValue')
-  def getMappedValue(self, document, property):
+                            'getMappedProperty')
+  def getMappedProperty(self, document, property):
     if property.endswith('_list'):
       property = property[:-5]
       getProperty = document.getPropertyList

Removed: erp5/trunk/products/ERP5/Document/PropertyMapping.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PropertyMapping.py?rev=33298&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/Document/PropertyMapping.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/PropertyMapping.py (removed)
@@ -1,70 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsibility of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# guarantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-##############################################################################
-
-from AccessControl import ClassSecurityInfo
-from Products.ERP5Type import Permissions, PropertySheet
-from Products.ERP5Type.XMLObject import XMLObject
-
-class PropertyMapping(XMLObject):
-  """
-  Property Mapping object describes how properties or categories are
-  mapped, eg. use source as destination, use destination as source, use
-  quantity as -quantity, etc.
-
-  TODO:
-  - make sure naming is consistent with MappedValue document class
-    and rename if needed (XXX-JPS)
-  """
-  meta_type = 'ERP5 Property Mapping'
-  portal_type = 'Property Mapping'
-  add_permission = Permissions.AddPortalContent
-
-  # Declarative security
-  security = ClassSecurityInfo()
-  security.declareObjectProtected(Permissions.AccessContentsInformation)
-
-  # Declarative properties
-  property_sheets = (PropertySheet.Base,
-                     PropertySheet.SimpleItem,
-                     PropertySheet.CategoryCore,
-                     PropertySheet.PropertyMapping)
-
-  security.declareProtected(Permissions.AccessContentsInformation,
-                            'getMappedValue')
-  def getMappedValue(self, document, property):
-    if property.endswith('_list'):
-      property = property[:-5]
-      getProperty = document.getPropertyList
-    else:
-      getProperty = document.getProperty
-    mapping_dict = dict([[x.strip() for x in x.split('|')] \
-                         for x in self.getMappingPropertyList()])
-    mapped_property = mapping_dict.get(property, property)
-    if mapped_property.startswith('-'):
-      return -1 * getProperty(mapped_property[1:])
-    else:
-      return getProperty(mapped_property)

Copied: erp5/trunk/products/ERP5/PropertySheet/MappedProperty.py (from r33298, erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py)
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/MappedProperty.py?p2=erp5/trunk/products/ERP5/PropertySheet/MappedProperty.py&p1=erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py&r1=33298&r2=33299&rev=33299&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py [utf8] (original)
+++ erp5/trunk/products/ERP5/PropertySheet/MappedProperty.py [utf8] Wed Mar  3 06:24:32 2010
@@ -25,9 +25,9 @@
 #
 ##############################################################################
 
-class PropertyMapping:
+class MappedProperty:
   """
-  Property sheet for Property Mapping class and subclass instances
+  Property sheet for Mapped Property class and subclass instances
   """
   _properties = (
     {'id'          : 'mapping_property',

Removed: erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py?rev=33298&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py [utf8] (original)
+++ erp5/trunk/products/ERP5/PropertySheet/PropertyMapping.py (removed)
@@ -1,39 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsibility of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# guarantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-##############################################################################
-
-class PropertyMapping:
-  """
-  Property sheet for Property Mapping class and subclass instances
-  """
-  _properties = (
-    {'id'          : 'mapping_property',
-     'description' : 'List of mapping of properties or categories',
-     'type'        : 'lines',
-     'default'     : [],
-     'multivalued' : 1,
-     'mode'        : 'w' },
-  )




More information about the Erp5-report mailing list