Commit 2d85bcac authored by Romain Courteaud's avatar Romain Courteaud

slapos_*: add new trade condition versions

The new versions do not include any price informations.
It is needed to create new Trade Condition which inherite from those versions.

Update preference to use those latest trade conditions.
parent 8f453911
......@@ -135,7 +135,7 @@
</tuple>
<state>
<tuple>
<float>2524608000.0</float>
<float>1647302400.0</float>
<string>UTC</string>
</tuple>
</state>
......@@ -158,7 +158,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>SlapOS Aggregated Subscription Trade Condition (after 2021)</string> </value>
<value> <string>SlapOS Aggregated Subscription Trade Condition (before 2022)</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -294,7 +294,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>998.58068.48763.8738</string> </value>
<value> <string>998.58069.32325.41352</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -312,7 +312,7 @@
</tuple>
<state>
<tuple>
<float>1647338249.48</float>
<float>1647348428.84</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Trade Model Line" 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>categories</string> </key>
<value>
<tuple>
<string>resource/service_module/slapos_tax</string>
<string>base_application/base_amount/invoicing/taxable</string>
<string>trade_phase/slapos/tax</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>VAT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reservation_tax_cny</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple>
<string>price_currency</string>
</tuple>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple>
<string>price_currency/currency_module/CNY</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Line</string> </value>
</item>
<item>
<key> <string>price</string> </key>
<value> <float>0.01</float> </value>
</item>
<item>
<key> <string>quantity</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>target_delivery</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>VAT (CNY)</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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/>
</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>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1647348359.78</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="Message" module="Products.ERP5Type.Message"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
<item>
<key> <string>domain</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>mapping</string> </key>
<value>
<dictionary>
<item>
<key> <string>source_item</string> </key>
<value> <string>/erp5/sale_trade_condition_module/slapos_aggregated_subscription_trade_condition</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>message</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Trade Model Line" 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>categories</string> </key>
<value>
<tuple>
<string>resource/service_module/slapos_tax</string>
<string>base_application/base_amount/invoicing/taxable</string>
<string>trade_phase/slapos/tax</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>VAT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reservation_tax_eur</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple>
<string>price_currency</string>
</tuple>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple>
<string>price_currency/currency_module/EUR</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Line</string> </value>
</item>
<item>
<key> <string>price</string> </key>
<value> <float>0.2</float> </value>
</item>
<item>
<key> <string>quantity</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>target_delivery</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>VAT (EURO)</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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/>
</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>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1647348359.79</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="Message" module="Products.ERP5Type.Message"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
<item>
<key> <string>domain</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>mapping</string> </key>
<value>
<dictionary>
<item>
<key> <string>source_item</string> </key>
<value> <string>/erp5/sale_trade_condition_module/slapos_aggregated_subscription_trade_condition</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>message</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -135,7 +135,7 @@
</tuple>
<state>
<tuple>
<float>2524608000.0</float>
<float>1647302400.0</float>
<string>UTC</string>
</tuple>
</state>
......@@ -152,7 +152,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>SlapOS Aggregated Trade Condition (after 2018)</string> </value>
<value> <string>SlapOS Aggregated Trade Condition (before 2022)</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -288,7 +288,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>998.58067.20441.49783</string> </value>
<value> <string>998.58067.43445.61166</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -306,7 +306,7 @@
</tuple>
<state>
<tuple>
<float>1647338139.67</float>
<float>1647349016.53</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Trade Model Line" 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>categories</string> </key>
<value>
<tuple>
<string>resource/service_module/slapos_tax</string>
<string>base_application/base_amount/invoicing/taxable</string>
<string>trade_phase/slapos/tax</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>VAT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reservation_tax_cny</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple>
<string>price_currency</string>
<string>resource</string>
</tuple>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple>
<string>price_currency/currency_module/CNY</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Line</string> </value>
</item>
<item>
<key> <string>price</string> </key>
<value> <float>0.01</float> </value>
</item>
<item>
<key> <string>quantity</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>target_delivery</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>VAT (CNY)</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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/>
</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>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1647349013.24</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="Message" module="Products.ERP5Type.Message"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
<item>
<key> <string>domain</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>mapping</string> </key>
<value>
<dictionary>
<item>
<key> <string>source_item</string> </key>
<value> <string>/erp5/sale_trade_condition_module/slapos_aggregated_trade_condition</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>message</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Trade Model Line" 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>categories</string> </key>
<value>
<tuple>
<string>resource/service_module/slapos_tax</string>
<string>base_application/base_amount/invoicing/taxable</string>
<string>trade_phase/slapos/tax</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>VAT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reservation_tax_eur</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple>
<string>price_currency</string>
</tuple>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple>
<string>price_currency/currency_module/EUR</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Line</string> </value>
</item>
<item>
<key> <string>price</string> </key>
<value> <float>0.2</float> </value>
</item>
<item>
<key> <string>quantity</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>target_delivery</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>VAT (EURO)</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</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/>
</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>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1647349013.24</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="Message" module="Products.ERP5Type.Message"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
<item>
<key> <string>domain</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>mapping</string> </key>
<value>
<dictionary>
<item>
<key> <string>source_item</string> </key>
<value> <string>/erp5/sale_trade_condition_module/slapos_aggregated_trade_condition</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>message</string> </key>
<value> <string>Object copied from ${source_item}</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -17,6 +17,8 @@ from DateTime import DateTime
from erp5.component.module.DateUtils import addToDate#, getClosestDate
from zExceptions import Unauthorized
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL = 'sale_trade_condition_module/slapos_aggregated_trade_condition_v3'
class Simulator:
def __init__(self, outfile, method, to_return=None):
self.outfile = outfile
......@@ -959,18 +961,18 @@ class TestSlapOSConfirmedDeliveryMixin:
def test_typical(self):
self._test('confirmed', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition', True)
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL, True)
def test_bad_specialise(self):
self._test('confirmed', 'solved', None, False)
def test_bad_simulation_state(self):
self._test('started', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition', False)
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL, False)
def test_bad_causality_state(self):
self._test('confirmed', 'calculating',
'sale_trade_condition_module/slapos_aggregated_trade_condition', False)
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL, False)
@withAbort
def _test_script(self, simulation_state, causality_state, specialise,
......@@ -998,7 +1000,7 @@ class TestSlapOSConfirmedDeliveryMixin:
def test_script_typical(self):
self._test_script('confirmed', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
self.destination_state)
def test_script_bad_specialise(self):
......@@ -1006,17 +1008,17 @@ class TestSlapOSConfirmedDeliveryMixin:
def test_script_bad_simulation_state(self):
self._test_script('started', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
'started')
def test_script_bad_causality_state(self):
self._test_script('confirmed', 'building',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
'confirmed')
def test_script_bad_consistency(self):
self._test_script('confirmed', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
'confirmed', True)
class TestSlapOSStartConfirmedAggregatedSalePackingListAlarm(
......@@ -1028,19 +1030,19 @@ class TestSlapOSStartConfirmedAggregatedSalePackingListAlarm(
def test_previous_month(self):
self._test('confirmed', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
True, delivery_date=DateTime("2012/03/22"),
accounting_date=DateTime('2012/04/28'))
def test_next_month(self):
self._test('confirmed', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
False, delivery_date=DateTime("2012/05/22"),
accounting_date=DateTime('2012/04/28'))
def test_same_month_early(self):
self._test('confirmed', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
False, delivery_date=DateTime("2012/04/22"),
accounting_date=DateTime('2012/04/23'))
......@@ -1048,7 +1050,7 @@ class TestSlapOSStartConfirmedAggregatedSalePackingListAlarm(
delivery = self.portal.sale_packing_list_module.newContent(
portal_type="Sale Packing List",
start_date=DateTime("2012/04/22"),
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition',
specialise=AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
source=self.expected_slapos_organisation,
source_section=self.expected_slapos_organisation,
destination=self.expected_slapos_organisation,
......@@ -1108,18 +1110,18 @@ class TestSlapOSDeliverStartedAggregatedSalePackingListAlarm(
def test_typical(self):
self._test('started', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition', True)
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL, True)
def test_bad_specialise(self):
self._test('started', 'solved', None, False)
def test_bad_simulation_state(self):
self._test('confirmed', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition', False)
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL, False)
def test_bad_causality_state(self):
self._test('started', 'calculating',
'sale_trade_condition_module/slapos_aggregated_trade_condition', False)
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL, False)
@withAbort
def _test_script(self, simulation_state, causality_state, specialise,
......@@ -1147,7 +1149,7 @@ class TestSlapOSDeliverStartedAggregatedSalePackingListAlarm(
def test_script_typical(self):
self._test_script('started', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
self.destination_state)
def test_script_bad_specialise(self):
......@@ -1155,17 +1157,17 @@ class TestSlapOSDeliverStartedAggregatedSalePackingListAlarm(
def test_script_bad_simulation_state(self):
self._test_script('confirmed', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
'confirmed')
def test_script_bad_causality_state(self):
self._test_script('started', 'building',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
'started')
def test_script_bad_consistency(self):
self._test_script('started', 'solved',
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
'started', True)
class TestSlapOSStopConfirmedAggregatedSaleInvoiceTransactionAlarm(
......
......@@ -11,6 +11,8 @@ from unittest import skip
import transaction
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL = 'sale_trade_condition_module/slapos_aggregated_trade_condition_v3'
class TestHostingSubscription(TestSlapOSConstraintMixin):
# use decrator in order to avoid fixing consistency of new object
......@@ -159,7 +161,7 @@ class TestSaleInvoiceTransaction(TestSlapOSConstraintMixin):
self.assertTrue(message in self.getMessageList(invoice))
invoice.setSpecialise('sale_trade_condition_module/slapos_aggregated_trade_condition')
invoice.setSpecialise(AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL)
self.assertFalse(message in self.getMessageList(invoice))
@withAbort
......@@ -184,7 +186,7 @@ class TestSaleInvoiceTransaction(TestSlapOSConstraintMixin):
invoice = self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction',
price_currency='currency_module/EUR',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition')
specialise=AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL)
invoice.newContent(portal_type='Invoice Line', quantity=1., price=1.,
base_contribution='base_amount/invoicing/taxable')
......@@ -213,7 +215,7 @@ class TestSaleInvoiceTransaction(TestSlapOSConstraintMixin):
self.assertFalse(message in self.getMessageList(invoice))
self.portal.portal_workflow._jumpToStateFor(invoice, 'confirmed')
self.assertFalse(message in self.getMessageList(invoice))
invoice.setSpecialise('sale_trade_condition_module/slapos_aggregated_trade_condition')
invoice.setSpecialise(AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL)
self.assertTrue(message in self.getMessageList(invoice))
invoice_line.setQuantity(1.)
self.assertFalse(message in self.getMessageList(invoice))
......
......@@ -11,6 +11,8 @@ from erp5.component.module.DateUtils import addToDate
from erp5.component.document.SimulationMovement import SimulationMovement
import transaction
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL = 'sale_trade_condition_module/slapos_aggregated_trade_condition_v3'
def getSimulationStatePlanned(self, *args, **kwargs):
return 'planned'
......@@ -69,7 +71,7 @@ class TestDefaultInvoiceTransactionRule(SlapOSTestCaseMixin):
trade_phase='slapos/invoicing',
quantity_unit='unit/piece',
specialise=
'sale_trade_condition_module/slapos_aggregated_trade_condition',
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
causality_list=['business_process_module/slapos_aggregated_business_process/invoice_path', 'business_process_module/slapos_aggregated_business_process/invoice'],
delivery_value=self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction').newContent(
......@@ -197,7 +199,7 @@ class TestDefaultInvoiceRule(SlapOSTestCaseMixin):
use='trade/sale',
trade_phase='slapos/invoicing',
quantity_unit='unit/piece',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition',
specialise=AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
causality_list=['business_process_module/slapos_aggregated_business_process/invoice_path',
'business_process_module/slapos_aggregated_business_process/invoice'])
......@@ -274,7 +276,7 @@ class TestDefaultInvoicingRule(SlapOSTestCaseMixin):
use='trade/sale',
trade_phase='slapos/delivery',
quantity_unit='unit/piece',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition',
specialise=AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
causality_list=['business_process_module/slapos_aggregated_business_process/delivery_path', 'business_process_module/slapos_aggregated_business_process/deliver'])
self.assertEqual('planned',
......@@ -388,7 +390,7 @@ class TestDefaultPaymentRule(SlapOSTestCaseMixin):
use='trade/sale',
trade_phase='slapos/accounting',
quantity_unit='unit/piece',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition',
specialise=AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
causality_list=['business_process_module/slapos_aggregated_business_process/account'],
delivery_value=self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction').newContent(
......@@ -706,7 +708,7 @@ class TestDefaultTradeModelRule(SlapOSTestCaseMixin):
use='trade/sale',
trade_phase='slapos/invoicing',
quantity_unit='unit/piece',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition',
specialise=AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL,
causality_list=['business_process_module/slapos_aggregated_business_process/invoice_path', 'business_process_module/slapos_aggregated_business_process/invoice'],
delivery_value=self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction').newContent(
......@@ -778,7 +780,7 @@ class TestDefaultTradeModelRule(SlapOSTestCaseMixin):
.original_getSimulationState
class TestDefaultDeliveryRule(SlapOSTestCaseMixin):
trade_condition = 'sale_trade_condition_module/slapos_aggregated_trade_condition'
trade_condition = AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL
def test(self):
def newArrow():
return self.portal.organisation_module.newContent(
......
currency_module/CNY
currency_module/EUR
sale_trade_condition_module/couscous_trade_condition
sale_trade_condition_module/slapos_aggregated_trade_condition_v3
sale_trade_condition_module/slapos_aggregated_trade_condition_v3/**
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition/**
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition/**
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition_v3
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition_v3/**
sale_trade_condition_module/slapos_aggregated_trade_condition
sale_trade_condition_module/slapos_aggregated_trade_condition/**
sale_trade_condition_module/slapos_legacy_aggregated_trade_condition
......
......@@ -78,8 +78,12 @@ sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition/**
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition/**
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition_v3
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition_v3/**
sale_trade_condition_module/slapos_aggregated_trade_condition
sale_trade_condition_module/slapos_aggregated_trade_condition/**
sale_trade_condition_module/slapos_aggregated_trade_condition_v3
sale_trade_condition_module/slapos_aggregated_trade_condition_v3/**
sale_trade_condition_module/slapos_consumption_trade_condition
sale_trade_condition_module/slapos_legacy_aggregated_subscription_trade_condition
sale_trade_condition_module/slapos_legacy_aggregated_subscription_trade_condition/**
......
......@@ -87,11 +87,11 @@
</item>
<item>
<key> <string>preferred_aggregated_sale_trade_condition</string> </key>
<value> <string>sale_trade_condition_module/slapos_aggregated_trade_condition</string> </value>
<value> <string>sale_trade_condition_module/slapos_aggregated_trade_condition_v3</string> </value>
</item>
<item>
<key> <string>preferred_aggregated_subscription_sale_trade_condition</string> </key>
<value> <string>sale_trade_condition_module/slapos_aggregated_subscription_trade_condition</string> </value>
<value> <string>sale_trade_condition_module/slapos_aggregated_subscription_trade_condition_v3</string> </value>
</item>
<item>
<key> <string>preferred_authentication_failure_block_duration</string> </key>
......
......@@ -602,7 +602,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
destination_reference=new_destination_reference,
destination_section=destination_section,
payment_mode=payment_mode,
specialise="sale_trade_condition_module/slapos_aggregated_trade_condition",
specialise="sale_trade_condition_module/slapos_aggregated_trade_condition_v3",
created_by_builder=1 # to prevent init script to create lines
)
self.portal.portal_workflow._jumpToStateFor(invoice, 'stopped')
......@@ -698,9 +698,9 @@ return %s""" % (script_name, fake_return ))
preferred_aggregated_consumption_sale_trade_condition=\
'sale_trade_condition_module/slapos_aggregated_consumption_trade_condition',
preferred_aggregated_sale_trade_condition=\
'sale_trade_condition_module/slapos_aggregated_trade_condition',
'sale_trade_condition_module/slapos_aggregated_trade_condition_v3',
preferred_aggregated_subscription_sale_trade_condition=\
'sale_trade_condition_module/slapos_aggregated_subscription_trade_condition',
'sale_trade_condition_module/slapos_aggregated_subscription_trade_condition_v3',
preferred_default_pre_payment_template=\
'accounting_module/slapos_pre_payment_template',
preferred_instance_delivery_template=\
......
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Assignor</principal>
</local_role_group_id>
<local_role_group_id id='shadow'>
<principal id='R-SHADOW-PERSON'>Auditor</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='G-COMPANY'>
<item>Assignor</item>
</role>
<role id='R-SHADOW-PERSON'>
<item>Auditor</item>
</role>
</local_roles>
<local_role_group_ids>
<local_role_group_id id='group'>
<principal id='G-COMPANY'>Assignor</principal>
</local_role_group_id>
<local_role_group_id id='shadow'>
<principal id='R-SHADOW-PERSON'>Auditor</principal>
</local_role_group_id>
</local_role_group_ids>
</local_roles_item>
\ No newline at end of file
......@@ -72,8 +72,9 @@ sale_trade_condition_module
sale_trade_condition_module/payzen_sale_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition_v3
sale_trade_condition_module/slapos_aggregated_trade_condition
sale_trade_condition_module/slapos_aggregated_trade_condition
sale_trade_condition_module/slapos_aggregated_trade_condition_v3
sale_trade_condition_module/slapos_consumption_trade_condition
sale_trade_condition_module/slapos_manual_accounting_trade_condition
sale_trade_condition_module/slapos_reservation_refund_trade_condition
......
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