Commit 4ebfb7ba authored by Yoshinori Okuji's avatar Yoshinori Okuji

Remove obsolete things.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3074 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 57e15aa2
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com> # Yoshinori Okuji <yo@nexedi.com>
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential # programmers who take the whole responsability of assessing all potential
...@@ -60,7 +60,6 @@ class VariatedProperty(XMLObject, XMLMatrix, Variated): ...@@ -60,7 +60,6 @@ class VariatedProperty(XMLObject, XMLMatrix, Variated):
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.SimpleItem , PropertySheet.SimpleItem
, PropertySheet.VariatedProperty
, PropertySheet.VariationRange , PropertySheet.VariationRange
, PropertySheet.MappedValue , PropertySheet.MappedValue
) )
...@@ -68,21 +67,6 @@ class VariatedProperty(XMLObject, XMLMatrix, Variated): ...@@ -68,21 +67,6 @@ class VariatedProperty(XMLObject, XMLMatrix, Variated):
# Declarative interfaces # Declarative interfaces
__implements__ = ( Interface.Variated, ) __implements__ = ( Interface.Variated, )
# Local property sheet
_properties = (
{ 'id' : 'variation_base_category',
'storage_id' : 'variation_base_category_list',
'description' : "",
'type' : 'tokens',
'acquisition_portal_type' : Expression('python: portal.getPortalResourceTypeList()'),
'acquisition_copy_value' : 0,
'acquisition_mask_value' : 0,
'acquisition_sync_value' : 0,
'acquisition_accessor_id' : 'getVariationBaseCategoryList',
'acquisition_depends' : None,
'mode' : 'w' },
)
# Factory Type Information # Factory Type Information
factory_type_information = \ factory_type_information = \
{ 'id' : portal_type { 'id' : portal_type
...@@ -127,41 +111,9 @@ A VariatedProperty.""" ...@@ -127,41 +111,9 @@ A VariatedProperty."""
security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' ) security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' )
def newCellContent(self, id,**kw): def newCellContent(self, id, **kw):
""" """
This method can be overriden This method can be overriden
""" """
self.invokeFactory(type_name="Set Mapped Value",id=id) self.invokeFactory(type_name="Set Mapped Value", id=id)
return self.get(id) return self.get(id)
security.declarePrivate('_checkConsistency')
def _checkConsistency(self, fixit=0):
"""
Check the constitency of transformation elements
"""
error_list = XMLMatrix._checkConsistency(self, fixit=fixit)
# First quantity
# We build an attribute equality and look at all cells
constraint = Constraint.AttributeEquality(
domain_base_category_list = ('coloris', 'taille',),
predicate_operator = 'SUPERSET_OF',
mapped_value_property_list = ['code_ean13'] )
for k in self.getCellKeys(base_id = 'cell'):
LOG("VariatedProperty: ",0,"_check: k: %s" % str(k))
kw={}
kw['base_id'] = 'cell'
c = self.getCell(*k, **kw)
if c is not None:
LOG("VariatedProperty: ",0,"_check: c: %s" % str(c))
predicate_value = []
for p in k:
if p is not None: predicate_value += [p]
constraint.edit(predicate_value_list = predicate_value)
if fixit:
error_list += constraint.fixConsistency(c)
else:
error_list += constraint.checkConsistency(c)
return error_list
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment