Commit 4c8bc987 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: erp5_pdm: Migrate Documents and Unit Test from filesystem.

parent d32a1124
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Variation import Variation from erp5.component.document.Variation import Variation
from erp5.component.document.Image import Image from erp5.component.document.Image import Image
class VariationImage(Image, Variation): class VariationImage(Image, Variation):
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>AssortedResource</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.AssortedResource</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.AssortedResource</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>Measure</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.Measure</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.Measure</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>QuantityUnitConversionDefinition</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.QuantityUnitConversionDefinition</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.QuantityUnitConversionDefinition</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>QuantityUnitConversionGroup</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.QuantityUnitConversionGroup</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.QuantityUnitConversionGroup</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>ResourceMeasuresConsistencyConstraint</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.ResourceMeasuresConsistencyConstraint</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.ResourceMeasuresConsistencyConstraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>Transformation</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.Transformation</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.Transformation</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.AmountGeneratorLine import AmountGeneratorLine from Products.ERP5.Document.AmountGeneratorLine import AmountGeneratorLine
class TransformedResource(AmountGeneratorLine): class TransformedResource(AmountGeneratorLine):
""" """
TransformedResource defines which resource is being transformed TransformedResource defines which resource is being transformed
in order to produce a product define in the parent Transformation in order to produce a product define in the parent Transformation
document. document.
...@@ -47,119 +47,119 @@ class TransformedResource(AmountGeneratorLine): ...@@ -47,119 +47,119 @@ class TransformedResource(AmountGeneratorLine):
is no longer usable. It is time to reimplement it. This is is no longer usable. It is time to reimplement it. This is
completely unrelated to MatrixBox reimplementation unlike completely unrelated to MatrixBox reimplementation unlike
what is stated in some comments. what is stated in some comments.
"""
meta_type = 'ERP5 Transformed Resource'
portal_type = 'Transformed Resource'
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = (PropertySheet.TransformedResource, )
### Mapped Value Definition
# Provide default mapped value properties and categories if
# not defined
def getMappedValuePropertyList(self):
result = self._baseGetMappedValuePropertyList()
if not result:
# Since MappedValue does not inherit Amount, and type class of
# Transformation {Operation,Transformed Resource} Cell
# was changed to TransformedResource as a workaround,
# we also need to check if 'self' has a quantity.
# Otherwise, generated amounts could have 0 quantity
# (overridden by cells that only define variation).
result = ['quantity']
# Take into account variation_property_list for each variation
# for which hasProperty is true...
# FIXME: Why the resource and not the model line itself ? Or both ??
resource = self.getDefaultResourceValue()
if resource is not None:
result += resource.getVariationPropertyList()
result = filter(self.hasProperty, result)
return result
def getMappedValueBaseCategoryList(self, *args, **kw):
result = list(self._baseGetMappedValueBaseCategoryList())
if not result:
if not self.hasCellContent(base_id='variation'):
result = list(self.getVariationRangeBaseCategoryList()) # The current resource variation
if 'trade_phase' not in result:
result.append('trade_phase')
if 'industrial_phase' not in result:
result.append('industrial_phase')
return result
def getCellAggregateKey(self):
"""Define a key in order to aggregate amounts at cell level"""
return None
@classmethod
def getBaseAmountQuantity(cls, delivery_amount, base_application, rounding, *args, **kw):
value = delivery_amount.getGeneratedAmountQuantity(base_application)
if base_application == 'base_amount/produced_quantity':
value += delivery_amount.getConvertedQuantity()
return value
security.declareProtected(Permissions.AccessContentsInformation,
'getBaseApplication')
def getBaseApplication(self):
"""
""" """
return self.getBaseApplicationList()[0]
meta_type = 'ERP5 Transformed Resource' security.declareProtected(Permissions.AccessContentsInformation,
portal_type = 'Transformed Resource' 'getBaseApplicationList')
def getBaseApplicationList(self):
# Declarative security """
security = ClassSecurityInfo() """
security.declareObjectProtected(Permissions.AccessContentsInformation) # It is OK to try to acquire
return self._categoryGetBaseApplicationList() \
# Declarative properties or ['base_amount/produced_quantity']
property_sheets = (PropertySheet.TransformedResource, )
### Variation matrix definition
### Mapped Value Definition # XXX-JPS Some explanation needed
# Provide default mapped value properties and categories if security.declareProtected(Permissions.AccessContentsInformation,
# not defined 'updateVariationCategoryList')
def getMappedValuePropertyList(self): def updateVariationCategoryList(self):
result = self._baseGetMappedValuePropertyList() """
if not result:
# Since MappedValue does not inherit Amount, and type class of
# Transformation {Operation,Transformed Resource} Cell
# was changed to TransformedResource as a workaround,
# we also need to check if 'self' has a quantity.
# Otherwise, generated amounts could have 0 quantity
# (overridden by cells that only define variation).
result = ['quantity']
# Take into account variation_property_list for each variation
# for which hasProperty is true...
# FIXME: Why the resource and not the model line itself ? Or both ??
resource = self.getDefaultResourceValue()
if resource is not None:
result += resource.getVariationPropertyList()
result = filter(self.hasProperty, result)
return result
def getMappedValueBaseCategoryList(self):
result = list(self._baseGetMappedValueBaseCategoryList())
if not result:
if not self.hasCellContent(base_id='variation'):
result = list(self.getVariationRangeBaseCategoryList()) # The current resource variation
if 'trade_phase' not in result:
result.append('trade_phase')
if 'industrial_phase' not in result:
result.append('industrial_phase')
return result
def getCellAggregateKey(self):
"""Define a key in order to aggregate amounts at cell level"""
return None
@classmethod
def getBaseAmountQuantity(cls, delivery_amount, base_application, rounding):
value = delivery_amount.getGeneratedAmountQuantity(base_application)
if base_application == 'base_amount/produced_quantity':
value += delivery_amount.getConvertedQuantity()
return value
security.declareProtected(Permissions.AccessContentsInformation,
'getBaseApplication')
def getBaseApplication(self):
"""
"""
return self.getBaseApplicationList()[0]
security.declareProtected(Permissions.AccessContentsInformation,
'getBaseApplicationList')
def getBaseApplicationList(self):
"""
"""
# It is OK to try to acquire
return self._categoryGetBaseApplicationList() \
or ['base_amount/produced_quantity']
### Variation matrix definition
# XXX-JPS Some explanation needed
security.declareProtected(Permissions.AccessContentsInformation,
'updateVariationCategoryList')
def updateVariationCategoryList(self):
"""
Check if variation category list of the resource changed and Check if variation category list of the resource changed and
update transformed resource by doing a set cell range update transformed resource by doing a set cell range
""" """
self.setQVariationBaseCategoryList(self.getQVariationBaseCategoryList()) self.setQVariationBaseCategoryList(self.getQVariationBaseCategoryList())
self.setVVariationBaseCategoryList(self.getVVariationBaseCategoryList()) self.setVVariationBaseCategoryList(self.getVVariationBaseCategoryList())
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
'_setQVariationBaseCategoryList') '_setQVariationBaseCategoryList')
def _setQVariationBaseCategoryList(self, value): def _setQVariationBaseCategoryList(self, value):
""" """
Defines the possible base categories which Quantity value (Q) Defines the possible base categories which Quantity value (Q)
variate on variate on
""" """
self._baseSetQVariationBaseCategoryList(value) self._baseSetQVariationBaseCategoryList(value)
self._updateCellRange('quantity') self._updateCellRange('quantity')
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
'_setVVariationBaseCategoryList') '_setVVariationBaseCategoryList')
def _setVVariationBaseCategoryList(self, value): def _setVVariationBaseCategoryList(self, value):
""" """
Defines the possible base categories which Variation value (V) Defines the possible base categories which Variation value (V)
variate on variate on
""" """
self._baseSetVVariationBaseCategoryList(value) self._baseSetVVariationBaseCategoryList(value)
# XXX calling updatecellRange is better # XXX calling updatecellRange is better
self._updateCellRange('variation') self._updateCellRange('variation')
# XXX-JPS This should be handled by interaction workflow or interactor # XXX-JPS This should be handled by interaction workflow or interactor
# XXX-JPS SO many cases are not handled well... # XXX-JPS SO many cases are not handled well...
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
'setVVariationBaseCategoryList') 'setVVariationBaseCategoryList')
def setVVariationBaseCategoryList(self, value): def setVVariationBaseCategoryList(self, value):
""" """
Defines the possible base categories which Variation value (V) Defines the possible base categories which Variation value (V)
variate on and reindex the object variate on and reindex the object
""" """
self._setVVariationBaseCategoryList(value) self._setVVariationBaseCategoryList(value)
self.reindexObject() self.reindexObject()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TransformedResource</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.TransformedResource</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.TransformedResource</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -35,24 +35,23 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -35,24 +35,23 @@ from Products.ERP5Type.XMLObject import XMLObject
#class Variation(XMLObject, Variation): #class Variation(XMLObject, Variation):
class Variation(XMLObject): class Variation(XMLObject):
""" """
A Variation A Variation
""" """
meta_type = 'ERP5 Variation'
portal_type = 'Variation'
add_permission = Permissions.AddPortalContent
meta_type = 'ERP5 Variation' # Declarative security
portal_type = 'Variation' security = ClassSecurityInfo()
add_permission = Permissions.AddPortalContent security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative security # Declarative properties
security = ClassSecurityInfo() property_sheets = ( PropertySheet.Base
security.declareObjectProtected(Permissions.AccessContentsInformation) , PropertySheet.CategoryCore
, PropertySheet.DublinCore
# Declarative properties , PropertySheet.Price
property_sheets = ( PropertySheet.Base , PropertySheet.Variation
, PropertySheet.CategoryCore , PropertySheet.VariationRange
, PropertySheet.DublinCore , PropertySheet.Reference
, PropertySheet.Price )
, PropertySheet.Variation \ No newline at end of file
, PropertySheet.VariationRange
, PropertySheet.Reference
)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>Variation</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.Variation</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.Variation</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testPDM</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.tests.testPDM</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testPDM</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
document.erp5.Consumption document.erp5.AssortedResource
\ No newline at end of file document.erp5.Consumption
document.erp5.Measure
document.erp5.QuantityUnitConversionDefinition
document.erp5.QuantityUnitConversionGroup
document.erp5.ResourceMeasuresConsistencyConstraint
document.erp5.Transformation
document.erp5.TransformedResource
document.erp5.Variation
\ No newline at end of file
test.erp5.testPDM
\ No newline at end of file
erp5_full_text_mroonga_catalog
\ No newline at end of file
...@@ -45,9 +45,9 @@ implements_tuple_list = [ ...@@ -45,9 +45,9 @@ implements_tuple_list = [
(('erp5.component.document.TradeModelLine','TradeModelLine'), 'IAmountGenerator'), (('erp5.component.document.TradeModelLine','TradeModelLine'), 'IAmountGenerator'),
(('erp5.component.document.TradeModelLine','TradeModelLine'), 'IVariated'), (('erp5.component.document.TradeModelLine','TradeModelLine'), 'IVariated'),
(('erp5.component.document.TradeModelPath','TradeModelPath'), 'IArrowBase'), (('erp5.component.document.TradeModelPath','TradeModelPath'), 'IArrowBase'),
(('Products.ERP5.Document.Transformation','Transformation'), 'IAmountGenerator'), (('erp5.component.document.Transformation','Transformation'), 'IAmountGenerator'),
(('Products.ERP5.Document.Transformation','Transformation'), 'IVariated'), (('erp5.component.document.Transformation','Transformation'), 'IVariated'),
(('Products.ERP5.Document.TransformedResource','TransformedResource'), 'IVariated'), (('erp5.component.document.TransformedResource','TransformedResource'), 'IVariated'),
#IDocument #IDocument
(('Products.ERP5.Document.Document', 'Document'), 'IDocument'), (('Products.ERP5.Document.Document', 'Document'), 'IDocument'),
(('erp5.component.document.Image', 'Image'), 'IDocument'), (('erp5.component.document.Image', 'Image'), 'IDocument'),
......
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