Commit c64d4287 authored by Sebastien Robin's avatar Sebastien Robin

on movement collections, use list of properties defined in rules

Until now, we had in movement collections all possible properties
found by _propertyMap for every movement. Now movement collections
use list of properties defined in rules.

This change was breaking some tests because not enough properties
were expanded, so in the same time it is required to add more
properties to progagate on several rules
parent aaec3bd6
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>causality_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>causality_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality divergence tester</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>trade_phase_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>trade_phase</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>trade_phase divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>causality_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>causality_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality divergence tester</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -6,6 +6,30 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>causality_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>trade_phase_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>trade_phase</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>trade_phase divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>causality_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>trade_phase_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>trade_phase</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>trade_phase divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>trade_phase_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>trade_phase</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>trade_phase divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Divergence Tester</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>causality_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality divergence tester</string> </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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Float Divergence Tester" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_range_min</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>int</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_range_max</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>int</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>divergence_provider</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>price_tester</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Float Divergence Tester</string> </value>
</item>
<item>
<key> <string>quantity_range_max</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>quantity_range_min</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>price</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>price divergence tester</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
14
\ No newline at end of file
21
\ No newline at end of file
......@@ -701,9 +701,17 @@ class BusinessProcess(Path, XMLObject):
movement._edit(**kw)
business_link = self.getBusinessLinkValueList(trade_phase=trade_phase,
context=movement)
movement._setCausalityList([trade_model_path.getRelativeUrl()]
+ [x.getRelativeUrl() for x in business_link]
+ movement.getCausalityList())
# we have to exclude trade model path and business link in causality list
# because original amount might come from another generatedAmountList
# calculation
causality_list = [trade_model_path.getRelativeUrl()] \
+ [x.getRelativeUrl() for x in business_link]
excluded_portal_type_set = set(self.getPortalTradeModelPathTypeList()
+ self.getPortalBusinessLinkTypeList())
for causality_value in movement.getCausalityValueList():
if not(causality_value.getPortalType() in excluded_portal_type_set):
causality_list.append(causality_value.getRelativeUrl())
movement._setCausalityList(causality_list)
result.append(movement)
if not explanation.getSpecialiseValue().getSameTotalQuantity():
......@@ -756,7 +764,7 @@ class BusinessProcess(Path, XMLObject):
property_dict = _getPropertyAndCategoryList(amount)
else:
property_dict = {}
for tester in rule._getUpdatingTesterList(exclude_quantity=False):
for tester in rule._getUpdatingTesterList():
property_dict.update(tester.getUpdatablePropertyDict(
amount, None))
......
......@@ -34,7 +34,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.mixin.solver import SolverMixin
from Products.ERP5.mixin.configurable import ConfigurableMixin
from Products.ERP5.MovementCollectionDiff import _getPropertyAndCategoryList
from Products.ERP5.MovementCollectionDiff import _getPropertyDict
class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
"""Target solver that split the prevision based on quantity.
......@@ -91,7 +91,9 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
split_index += 1
new_id = "%s_split_%s" % (simulation_movement.getId(), split_index)
# Copy at same level
kw = _getPropertyAndCategoryList(simulation_movement)
rule = applied_rule.getSpecialiseValue()
kw = _getPropertyDict(simulation_movement,
property_id_set=rule.getUpdatablePropertyIdSet())
kw.update({'portal_type':simulation_movement.getPortalType(),
'id':new_id,
'delivery':None,
......@@ -111,7 +113,6 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
# XXX we need to call expand on both simulation_movement and new_movement here?
# simulation_movement.expand(activate_kw=activate_kw)
# new_movement.expand(activate_kw=activate_kw)
# Finish solving
if self.getPortalObject().portal_workflow.isTransitionPossible(
self, 'succeed'):
......
......@@ -41,11 +41,12 @@ class MovementCollectionDiff(object):
# Declarative interfaces
zope.interface.implements(interfaces.IMovementCollectionDiff,)
def __init__(self):
def __init__(self, property_id_set=None):
self._deletable_movement_list = []
self._new_movement_list = []
self._updatable_movement_list = []
self._property_dict_dict = {}
self._property_id_set = property_id_set
def getDeletableMovementList(self):
"""
......@@ -88,11 +89,13 @@ class MovementCollectionDiff(object):
"""
property_dict = self._property_dict_dict.get(movement)
if property_dict is None:
property_dict = _getPropertyList(movement)
property_dict.update(_getCategoryList(movement, acquire=False))
return property_dict
else:
return property_dict
if self._property_id_set is not None:
property_dict = _getPropertyDict(movement,
property_id_set=self._property_id_set)
else:
property_dict = _getPropertyList(movement)
property_dict.update(_getCategoryList(movement, acquire=False))
return property_dict
def addUpdatableMovement(self, movement, property_dict):
"""
......@@ -113,6 +116,13 @@ def _getPropertyAndCategoryList(document):
property_dict.update(_getCategoryList(document))
return property_dict
def _getPropertyDict(document, property_id_set=None):
assert property_id_set is not None
property_dict = {}
for property_id in property_id_set:
property_dict[property_id] = document.getProperty(property_id)
return property_dict
def _getPropertyList(document, acquire=True):
property_map = document.getPropertyMap()
bad_property_list = ['id', 'uid', 'categories_list', 'last_id',]
......
......@@ -40,7 +40,8 @@ class IMovementCollectionUpdater(Interface):
obtained from an IMovementCollection, thus generating
an IMovementCollectionDiff.
"""
def getMovementCollectionDiff(context, rounding=False, movement_generator=None):
def getMovementCollectionDiff(context, rounding=False, movement_generator=None,
property_id_set=None):
"""
Return a IMovementCollectionDiff by comparing movements
the list of movements of context and the list of movements
......@@ -52,9 +53,15 @@ class IMovementCollectionUpdater(Interface):
movement_generator -- an optional IMovementGenerator
(if not specified, a context implicit
IMovementGenerator will be used)
property_id_set -- an optional list of properties that we
care on movements. This allows to improve
performance by not looking at properties
we don't care
"""
def updateMovementCollection(context, rounding=False, movement_generator=None):
def updateMovementCollection(context, rounding=False, movement_generator=None,
property_id_set=None):
"""
Invoke getMovementCollectionDiff and update context with
the resulting IMovementCollectionDiff.
......@@ -65,4 +72,9 @@ class IMovementCollectionUpdater(Interface):
movement_generator -- an optional IMovementGenerator
(if not specified, a context implicit
IMovementGenerator will be used)
property_id_set -- an optional list of properties that we
care on movements. This allows to improve
performance by not looking at properties
we don't care
"""
......@@ -51,7 +51,8 @@ class MovementCollectionUpdaterMixin:
# Implementation of IMovementCollectionUpdater
def getMovementCollectionDiff(self, context, rounding=False,
movement_generator=None):
movement_generator=None,
property_id_set=None):
"""
Return a IMovementCollectionDiff by comparing movements
the list of movements of context and the list of movements
......@@ -63,6 +64,8 @@ class MovementCollectionUpdaterMixin:
movement_generator -- an optional IMovementGenerator
(if not specified, a context implicit
IMovementGenerator will be used)
property_id_set -- a set listing properties we are looking in movements
"""
# We suppose here that we have an IMovementCollection in hand
decision_movement_list = context.getMovementList()
......@@ -138,7 +141,8 @@ class MovementCollectionUpdaterMixin:
prevision_to_decision_map.append((prevision_movement, map_list))
# Third, time to create the diff
movement_collection_diff = MovementCollectionDiff()
movement_collection_diff = MovementCollectionDiff(
property_id_set=property_id_set)
for (prevision_movement, decision_movement_list) in prevision_to_decision_map:
self._extendMovementCollectionDiff(movement_collection_diff, prevision_movement,
decision_movement_list)
......@@ -146,7 +150,8 @@ class MovementCollectionUpdaterMixin:
return movement_collection_diff
def updateMovementCollection(self, context, rounding=False,
movement_generator=None):
movement_generator=None,
property_id_set=None):
"""
Invoke getMovementCollectionDiff and update context with
the resulting IMovementCollectionDiff.
......@@ -157,9 +162,12 @@ class MovementCollectionUpdaterMixin:
movement_generator -- an optional IMovementGenerator
(if not specified, a context implicit
IMovementGenerator will be used)
property_id_set -- a set listing properties we are looking in movements
"""
movement_diff = self.getMovementCollectionDiff(context,
rounding=rounding, movement_generator=movement_generator)
rounding=rounding, movement_generator=movement_generator,
property_id_set=property_id_set)
# Apply Diff
for movement in movement_diff.getDeletableMovementList():
......
......@@ -31,6 +31,7 @@ from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, interfaces
from Products.ERP5Type.Cache import caching_instance_method
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.MovementCollectionDiff import _getPropertyAndCategoryList
......@@ -192,6 +193,15 @@ class RuleMixin(Predicate):
return False
return super(RuleMixin, self).test(*args, **kw)
@caching_instance_method(id="Rule.getUpdatablePropertyIdSet",
cache_factory='erp5_content_long',
cache_id_generator=lambda method_id, document: document.getUid())
def getUpdatablePropertyIdSet(self):
property_id_set = set()
[property_id_set.update(x.getTestedPropertyList()) for x in \
self._getUpdatingTesterList()]
return property_id_set
def expand(self, applied_rule, **kw):
"""
Expand this applied rule to create new documents inside the
......@@ -205,7 +215,9 @@ class RuleMixin(Predicate):
# Update movements
# NOTE-JPS: it is OK to make rounding a standard parameter of rules
# although rounding in simulation is not recommended at all
self.updateMovementCollection(applied_rule, movement_generator=self._getMovementGenerator(applied_rule))
self.updateMovementCollection(applied_rule,
movement_generator=self._getMovementGenerator(applied_rule),
property_id_set=self.getUpdatablePropertyIdSet())
# And forward expand
for movement in applied_rule.getMovementList():
movement.expand(**kw)
......@@ -298,7 +310,7 @@ class RuleMixin(Predicate):
return filter(lambda x:x.isMatchingProvider(), self.objectValues(
portal_type=self.getPortalDivergenceTesterTypeList()))
def _getUpdatingTesterList(self, exclude_quantity=True):
def _getUpdatingTesterList(self, exclude_quantity=False):
"""
Return the applicable divergence testers which must be used to
update movements. (ie. not all divergence testers of the Rule)
......@@ -384,7 +396,7 @@ class RuleMixin(Predicate):
# ie. what comes in must either go out or has been lost
divergence_tester_list = self._getDivergenceTesterList()
profit_tester_list = divergence_tester_list
updating_tester_list = self._getUpdatingTesterList()
updating_tester_list = self._getUpdatingTesterList(exclude_quantity=True)
profit_updating_tester_list = updating_tester_list
quantity_tester_list = self._getQuantityTesterList()
compensated_quantity = 0.0
......
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