Commit a80bd298 authored by Jérome Perrin's avatar Jérome Perrin

erp5_core: move back ContributionPredicate to file system

This partially reverts 96bbfad2 (ZODB Components: More Documents to migrate
from Products.ERP5.Document., 2020-06-29) because of test failures:

    ======================================================================
    ERROR: test_GET_on_document (testWebDavSupport.TestWebDavSupport)
    Get data from document in webdav
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "Products/ERP5/tests/testWebDavSupport.py", line 214, in test_GET_on_document
        document = document_module[filename]
      File "OFS/ObjectManager.py", line 783, in __getitem__
        raise KeyError, key
    KeyError: 'P-DMS-Presentation.3.Pages-001-en.odp'
parent 6f2372aa
Pipeline #10252 failed with stage
in 0 seconds
......@@ -73,14 +73,14 @@ class ContributionPredicate(Predicate, XMLObject):
if getattr(aq_base(self), '_identity_criterion', None) is None:
self._identity_criterion = {}
self._range_criterion = {}
for property_, value in self._identity_criterion.iteritems():
result = result and (context.getProperty(property_) in value)
for property_, (min_, max_) in self._range_criterion.iteritems():
value = context.getProperty(property_)
if min_ is not None:
result = result and (value >= min_)
if max_ is not None:
result = result and (value < max_)
for property, value in self._identity_criterion.iteritems():
result = result and (context.getProperty(property) in value)
for property, (min, max) in self._range_criterion.iteritems():
value = context.getProperty(property)
if min is not None:
result = result and (value >= min)
if max is not None:
result = result and (value < max)
multimembership_criterion_base_category_list = \
self.getMultimembershipCriterionBaseCategoryList()
membership_criterion_base_category_list = \
......
<?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>ContributionPredicate</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.ContributionPredicate</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.ContributionPredicate</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>
......@@ -3,7 +3,6 @@ document.erp5.AmountGeneratorLine
document.erp5.AppliedRule
document.erp5.BaseDomain
document.erp5.BusinessProcess
document.erp5.ContributionPredicate
document.erp5.Delivery
document.erp5.DeliveryCell
document.erp5.DeliveryLine
......
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