Commit 112a2c74 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting:

* add SlapOSLedgerConstraint
* add SlapOSLedgerConstraint on all * Transaction
  XXX FOrces tests to fail as much as possible if ledger is not configured.
  Add test to ensure constraint is configured
* hardcode automated ledger category for the newly created sale packing list
* propagate ledger in the simulation tree
* build ledger category from delivery builders
* aggregate ledger from order builder
* ensure ledger category is allowed on the portal type when using the constraint
* requires ledger on Hosting Subscription, Open Sale Order and Sale Packing List
* hardcode ledger value on Open Sale Order and Hosting Subscription
* open order must propagate the ledger value
* automated ledger path
* add ledger to the accounting template
* source_administration is not used anymore on Compute Node
* source_administration is not used anymore on Compute Node
* add source_project constraint on all portal type requiring a ledger
* set the source_project on the open sale order
* propagate source_project in the simulation/builder
* remove source_project constraint from the ledger property sheet
* add SlapOSVirtualMasterSourceProjectConstraint on all accounting portal types
* use Software Product instead of the service slapos_instance_subscription
* build movement using Software Product
* consider Software Product as a Service
* use Software Product
* search the trade condition with searchPredicateList
* ensure trade condition is found
* disable open order alarm
* disable open order creation
* add slapos_virtual_master_subscription service
* allow using open order for different kind of item
* add constraint to check if open order has a sale trade condition
* reactivate open order alarm
* check if Sale Trade Condition has a business process
* ensure open order line has a resource, price, quantity
* new constraints for open order / sale trade condition
* only automate invoice with automated ledger
* only automate packing list with automated ledger
* only automate packing list with automated ledger
* only automate packing list with automated ledger
* add new business process to go from order to invoice
  This may be temporary.
  Name is bad on purpose for now.
* not sure if it is a good idea to hardcode the business process list...
* do not crash if open order line is not linked to an instance
* force total_quantity to be > 0 instead of checking quantity property
* XXX support Open Order Cell
* XXX constraint must also support Cell
* create Open Order Cell
* first version to fetch trade conditions and prices
* select the correct software release/type on open order
* get price from sale supply
* do not create the open order if the software product can not be found
* set price on the open order
  it requires to create a temp sale order, where sale supply is automatically applied
* SlapOSVirtualMasterSourceProjectConstraint on Sale Supply
* InstanceTree_getSoftwareProduct also return release and type variations
* wip sale supply test
* configure Sale Supply predicate
* test Supply Line matching and getPrice
* allow Supply Line to define price even if resource has variations
  Force quantity unit to match (no convertion for now)
* order Supply Predicate matching
* Supply Cell before Line
* stop hardcoding default quantity unit
* add comment if price not found
* quantity is defined on cell
* do not create Hosting Subscript before the price is found
* slapos_accounting: link Hosting Subscription to project
* Cloud Contract is not global for ERP5 Site, but per Virtual MAster
* project needed on assignment/compute node
* export module business application
* revert zero_emission_ratio service deletion
  I do not remember why I dropped it
* set source/destination_project and ledger on created payment
* drop slapos orga and accounting template
parent c54efeaa
<module>
<category_list>
<category>business_application/slapos</category>
</category_list>
<id>cloud_contract_module</id>
<permission_list>
<permission type='tuple'>
......
<module>
<category_list>
<category>business_application/slapos</category>
</category_list>
<id>consumption_document_module</id>
<permission_list>
<permission type='tuple'>
......
......@@ -2,7 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Bank Account" module="erp5.portal_type"/>
<global name="Business Process" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
......@@ -52,6 +52,40 @@
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>slapos_ultimate_business_process</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
......@@ -60,30 +94,56 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>bank_account</string> </value>
<value> <string>slapos_ultimate_business_process</string> </value>
</item>
<item>
<key> <string>overdraft_facility</string> </key>
<value> <int>0</int> </value>
<key> <string>portal_type</string> </key>
<value> <string>Business Process</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Bank Account</string> </value>
<key> <string>referential_date</string> </key>
<value> <string>start_date</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Bank Account</string> </value>
<value> <string>SlapOS Ultimate Business Process</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>2</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -96,13 +156,13 @@
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -111,7 +171,7 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
......@@ -128,11 +188,13 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
......@@ -140,7 +202,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
<value> <string>1003.7171.45777.61764</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -151,115 +213,76 @@
<value>
<object>
<klass>
<global id="3.1" name="_reconstructor" module="copy_reg"/>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<global id="3.2" name="DateTime" module="DateTime.DateTime"/>
<global id="3.3" name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1323955584.3</float>
<string>GMT+1</string>
<float>1663772501.89</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<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>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>915.7046.26557.65314</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="3.1"/> </klass>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<reference id="3.2"/>
<reference id="3.3"/>
<none/>
</tuple>
<state>
<tuple>
<float>1323955587.0</float>
<string>GMT+1</string>
<float>1663772506.58</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>915.7046.33658.4556</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="3.1"/> </klass>
<tuple>
<reference id="3.2"/>
<reference id="3.3"/>
<none/>
</tuple>
<state>
<tuple>
<float>1324044483.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
......@@ -268,143 +291,4 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global id="4.1" name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global id="4.2" name="DateTime" module="DateTime.DateTime"/>
<global id="4.3" name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1323955584.3</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate_action</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<reference id="4.2"/>
<reference id="4.3"/>
<none/>
</tuple>
<state>
<tuple>
<float>1323955590.79</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass> <reference id="4.1"/> </klass>
<tuple>
<reference id="4.2"/>
<reference id="4.3"/>
<none/>
</tuple>
<state>
<tuple>
<float>1323955590.79</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -2,7 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Sale Invoice Transaction" module="erp5.portal_type"/>
<global name="Business Link" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
......@@ -14,6 +14,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
......@@ -26,18 +27,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
......@@ -50,6 +40,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
......@@ -63,74 +54,116 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<key> <string>_local_properties</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>modification_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>creation_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>source_section/organisation_module/slapos</string>
<string>price_currency/currency_module/EUR</string>
<string>resource/currency_module/EUR</string>
<string>payment_mode/payzen</string>
<string>specialise/sale_trade_condition_module/slapos_aggregated_trade_condition</string>
<string>trade_phase/slapos/accounting</string>
<string>predecessor/trade_state/invoiced</string>
<string>successor/trade_state/accounted</string>
<string>delivery_builder/portal_deliveries/slapos_sale_invoice_transaction_builder</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<key> <string>completed_state</string> </key>
<value>
<none/>
<tuple>
<string>delivered</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_destination_reference</string> </key>
<key> <string>creation_date</string> </key>
<value>
<none/>
<object>
<klass>
<global id="1.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value>
<none/>
</value>
<key> <string>deliverable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<key> <string>frozen_state</string> </key>
<value>
<none/>
<tuple>
<string>delivered</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>template_contract_sale_invoice_transaction</string> </value>
<value> <string>account</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>6</int> </value>
</item>
<item>
<key> <string>language</string> </key>
......@@ -139,24 +172,16 @@
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Sale Invoice Transaction</string> </value>
</item>
<item>
<key> <string>start_date</string> </key>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="_reconstructor" module="copy_reg"/>
</klass>
<klass> <reference id="1.1"/> </klass>
<tuple>
<global id="1.2" name="DateTime" module="DateTime.DateTime"/>
<global id="1.3" name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<tuple>
<float>1325372400.0</float>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
......@@ -164,47 +189,50 @@
</value>
</item>
<item>
<key> <string>stop_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<reference id="1.2"/>
<reference id="1.3"/>
<none/>
</tuple>
<state>
<tuple>
<float>1326582000.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
<key> <string>portal_type</string> </key>
<value> <string>Business Link</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>account</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<none/>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<none/>
<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="Trade Model Path" 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>modification_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>creation_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</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>categories</string> </key>
<value>
<tuple>
<string>trade_phase/slapos/accounting</string>
<string>source/account_module/sales</string>
<string>destination/account_module/purchase</string>
<string>trade_date/trade_phase/slapos/invoicing</string>
</tuple>
</value>
</item>
<item>
<key> <string>creation_date</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-ACCOUNTING-CREDIT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>This business path is just a template thus disabled by using \'python:False\' in Predicate.\n
For real use, it is required to set an appropriate source (= account) category in Profile.</string> </value>
</item>
<item>
<key> <string>efficiency</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>account_credit_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple>
<string>resource_use</string>
</tuple>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple>
<string>resource_use/use/trade/sale</string>
</tuple>
</value>
</item>
<item>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Accounting Credit</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="Trade Model Path" 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>modification_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>creation_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</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>categories</string> </key>
<value>
<tuple>
<string>trade_phase/slapos/accounting</string>
<string>source/account_module/receivable</string>
<string>destination/account_module/payable</string>
<string>trade_date/trade_phase/slapos/invoicing</string>
</tuple>
</value>
</item>
<item>
<key> <string>creation_date</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-ACCOUNTING-DEBIT</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>This business path is just a template thus disabled by using \'python:False\' in Predicate.\n
For real use, it is required to set an appropriate source (= account) category in Profile.</string> </value>
</item>
<item>
<key> <string>efficiency</string> </key>
<value> <float>-1.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>account_debit_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>6</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple>
<string>resource_use</string>
</tuple>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple>
<string>resource_use/use/trade/sale</string>
</tuple>
</value>
</item>
<item>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Accounting Debit</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="Trade Model Path" 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>trade_phase/slapos/accounting</string>
<string>trade_date/trade_phase/slapos/invoicing</string>
<string>destination/account_module/refundable_vat</string>
<string>source/account_module/coll_vat</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>accounting_tax1</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>efficiency</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>accounting_tax1</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>7</int> </value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple>
<string>resource_use</string>
</tuple>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple>
<string>resource_use/use/trade/tax</string>
</tuple>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>accounting_tax1</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="Trade Model Path" 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>trade_phase/slapos/accounting</string>
<string>trade_date/trade_phase/slapos/invoicing</string>
<string>source/account_module/receivable</string>
<string>destination/account_module/payable</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>accounting_tax2</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>efficiency</string> </key>
<value> <float>-1.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>accounting_tax2</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>8</int> </value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple>
<string>resource_use</string>
</tuple>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple>
<string>resource_use/use/trade/tax</string>
</tuple>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>accounting_tax2</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="Business Link" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<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>modification_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>creation_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</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>categories</string> </key>
<value>
<tuple>
<string>trade_phase/slapos/delivery</string>
<string>successor/trade_state/delivered</string>
<string>delivery_builder/portal_deliveries/slapos_sale_packing_list_builder</string>
<string>order_builder/portal_orders/slapos_aggregated_delivery_builder</string>
<string>predecessor/trade_state/ordered</string>
</tuple>
</value>
</item>
<item>
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>delivered</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>creation_date</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>deliverable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>frozen_state</string> </key>
<value>
<tuple>
<string>delivered</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>deliver</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>lead_time</string> </key>
<value> <float>10.0</float> </value>
</item>
<item>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Business Link</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>deliver</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="Trade Model Path" 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>modification_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>creation_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>wait_time</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>lead_time</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</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>categories</string> </key>
<value>
<tuple>
<string>trade_phase/slapos/delivery</string>
<string>end_of/day</string>
</tuple>
</value>
</item>
<item>
<key> <string>creation_date</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-DELIVERY</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>delivery_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>lead_time</string> </key>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>payment_additional_term</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>payment_term</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Delivery</string> </value>
</item>
<item>
<key> <string>wait_time</string> </key>
<value> <float>3.0</float> </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="Business Link" 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>trade_phase/slapos/discount</string>
<string>predecessor/trade_state/invoiced</string>
<string>successor/trade_state/accounted</string>
<string>delivery_builder/portal_deliveries/slapos_sale_invoice_transaction_trade_model_builder</string>
</tuple>
</value>
</item>
<item>
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
<string>delivered</string>
<string>started</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>discount</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>frozen_state</string> </key>
<value>
<tuple>
<string>delivered</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>discount</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Business Link</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>discount</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="Business Link" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<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>modification_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>creation_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</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>categories</string> </key>
<value>
<tuple>
<string>trade_phase/slapos/invoicing</string>
<string>predecessor/trade_state/delivered</string>
<string>successor/trade_state/invoiced</string>
<string>delivery_builder/portal_deliveries/slapos_sale_invoice_builder</string>
</tuple>
</value>
</item>
<item>
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
<string>delivered</string>
<string>started</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>creation_date</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>deliverable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>frozen_state</string> </key>
<value>
<tuple>
<string>delivered</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>invoice</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Business Link</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>invoice</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="Trade Model Path" 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>modification_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>creation_date</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>date</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>categories</string> </key>
<value>
<tuple>
<string>trade_phase/slapos/invoicing</string>
</tuple>
</value>
</item>
<item>
<key> <string>creation_date</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>TMP-INVOICE</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>invoice_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>modification_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1324249200.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Invoicing</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="Business Link" 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>trade_phase/slapos/order</string>
<string>successor/trade_state/ordered</string>
</tuple>
</value>
</item>
<item>
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>order</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Business Link</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>order</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>
......@@ -2,25 +2,33 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Invoice Line" module="erp5.portal_type"/>
<global name="Trade Model Path" 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>use/trade/sale</string>
<string>resource/service_module/slapos_account_validation</string>
<string>quantity_unit/unit/piece</string>
<string>base_contribution/base_amount/invoicing/discounted</string>
<string>base_contribution/base_amount/invoicing/taxable</string>
<string>trade_phase/slapos/order</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>1</string> </value>
<value> <string>TMP-ORDER</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -30,13 +38,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string>order_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -49,16 +51,16 @@
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Invoice Line</string> </value>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>price</string> </key>
<value> <float>1.67224080268</float> </value>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>quantity</string> </key>
<value> <float>1.0</float> </value>
<key> <string>title</string> </key>
<value> <string>Order</string> </value>
</item>
</dictionary>
</pickle>
......@@ -72,14 +74,7 @@
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>movement</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
<dictionary/>
</value>
</item>
</dictionary>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Business Link" 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>predecessor/trade_state/invoiced</string>
<string>successor/trade_state/accounted</string>
<string>trade_phase/slapos/tax</string>
<string>delivery_builder/portal_deliveries/slapos_sale_invoice_transaction_trade_model_builder</string>
</tuple>
</value>
</item>
<item>
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
<string>delivered</string>
<string>started</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>tax</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>frozen_state</string> </key>
<value>
<tuple>
<string>delivered</string>
<string>stopped</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tax</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Business Link</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>tax</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="Trade Model Path" 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>trade_phase/slapos/discount</string>
<string>trade_phase/slapos/tax</string>
<string>trade_date/trade_phase/slapos/invoicing</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>applied_trade_model_path</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>trade_model_path</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>payment_end_of_month</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Trade Model Path</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Applied Trade Model Path</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>
......@@ -10,6 +10,10 @@
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_requestUpdateInstanceTreeOpenSaleOrder</string> </value>
</item>
<item>
<key> <string>automatic_solve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
......
......@@ -10,6 +10,10 @@
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_requestUpdateOpenSaleOrderPeriod</string> </value>
</item>
<item>
<key> <string>automatic_solve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
......
......@@ -42,9 +42,12 @@
<string>destination</string>
<string>source_section</string>
<string>destination_section</string>
<string>source_project</string>
<string>destination_project</string>
<string>price_currency</string>
<string>source_decision</string>
<string>destination_decision</string>
<string>ledger</string>
</tuple>
</value>
</item>
......
......@@ -41,7 +41,10 @@
<string>destination</string>
<string>source_section</string>
<string>destination_section</string>
<string>source_project</string>
<string>destination_project</string>
<string>price_currency</string>
<string>ledger</string>
</tuple>
</value>
</item>
......
......@@ -41,10 +41,13 @@
<string>destination</string>
<string>source_section</string>
<string>destination_section</string>
<string>source_project</string>
<string>destination_project</string>
<string>source_decision</string>
<string>destination_decision</string>
<string>price_currency</string>
<string>specialise</string>
<string>ledger</string>
</tuple>
</value>
</item>
......
......@@ -44,6 +44,7 @@
<string>source_section</string>
<string>specialise</string>
<string>causality</string>
<string>ledger</string>
</tuple>
</value>
</item>
......
<?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>id</string> </key>
<value> <string>ledger_tester</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</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> <string>ledger</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ledger 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>id</string> </key>
<value> <string>ledger_tester</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</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> <string>ledger</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ledger 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>id</string> </key>
<value> <string>ledger_tester</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</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> <string>ledger</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ledger 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>_Copy_or_Move_Permission</string> </key>
<value>
<list>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
<string>Authenticated</string>
<string>Owner</string>
</list>
</value>
</item>
<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>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ledger_tester</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>matching_provider</string> </key>
<value> <int>0</int> </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> <string>ledger</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ledger 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>id</string> </key>
<value> <string>ledger_tester</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</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> <string>ledger</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ledger 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>id</string> </key>
<value> <string>ledger_tester</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</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> <string>ledger</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ledger 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="Service" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>aggregated_portal_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>base_contribution/base_amount/invoicing/discounted</string>
<string>base_contribution/base_amount/invoicing/taxable</string>
<string>use/trade/sale</string>
<string>product_line/cloud</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IVIRTUALMASTER</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>slapos_virtual_master_subscription</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Service</string> </value>
</item>
<item>
<key> <string>required_aggregated_portal_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Virtual Master Subscription</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<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>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1003.5660.28098.24610</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>1663681720.22</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<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>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></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>1663681733.54</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<property_sheet_list>
<portal_type id="Accounting Transaction">
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Amortisation Transaction">
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Balance Transaction">
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Cloud Contract">
<item>SlapOSCloudContractAccounting</item>
</portal_type>
......@@ -10,22 +22,48 @@
</portal_type>
<portal_type id="Hosting Subscription">
<item>SlapOSAccountingHostingSubscriptionConstraint</item>
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterConstraint</item>
</portal_type>
<portal_type id="Internal Invoice Transaction">
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Open Sale Order">
<item>SlapOSAccountingOpenSaleOrderConstraint</item>
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Open Sale Order Line">
<item>SlapOSAccountingOpenSaleOrderLineConstraint</item>
</portal_type>
<portal_type id="Payment Transaction">
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Purchase Invoice Transaction">
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Sale Invoice Transaction">
<item>SlapOSAccountingSaleInvoiceTransactionConstraint</item>
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Sale Packing List">
<item>SlapOSAccountingSalePackingListConstraint</item>
<item>SlapOSLedgerConstraint</item>
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Sale Packing List Line">
<item>SlapOSAccountingSalePackingListLineConstraint</item>
</portal_type>
<portal_type id="Sale Supply">
<item>SlapOSVirtualMasterSourceProjectConstraint</item>
</portal_type>
<portal_type id="Sale Trade Condition">
<item>SlapOSAccountingSaleTradeConditionConstraint</item>
</portal_type>
<portal_type id="Slave Instance">
<item>InstanceAccountingSynchronisation</item>
</portal_type>
......
......@@ -22,13 +22,13 @@
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>aggregate</string>
<string>destination</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Instance Tree\',)</string> </value>
<value> <string>python: (\'Organisation\', \'Person\')</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -38,7 +38,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>aggregate_instance_tree_existence_constraint</string> </value>
<value> <string>destination_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
......
......@@ -22,13 +22,13 @@
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>aggregate</string>
<string>destination_decision</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Hosting Subscription\',)</string> </value>
<value> <string>python: (\'Organisation\', \'Person\')</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -38,7 +38,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>aggregate_hosting_subscription_existence_constraint</string> </value>
<value> <string>destination_decision_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Arity Constraint" 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>constraint_base_category</string> </key>
<value>
<tuple>
<string>destination_section</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Organisation\', \'Person\')</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>destination_section_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </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 Arity Constraint" 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>constraint_base_category</string> </key>
<value>
<tuple>
<string>price_currency</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Currency\',)</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>price_currency_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>message_arity_not_in_range</string> </key>
<value> <string>Exactly one Currency shall be selected</string> </value>
</item>
<item>
<key> <string>message_arity_too_small</string> </key>
<value> <string>Exactly one Currency shall be selected</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_not_in_range</string> </key>
<value> <string>Exactly one Currency shall be selected</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_too_small</string> </key>
<value> <string>Exactly one Currency shall be selected</string> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </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="String Attribute Match Constraint" 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>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</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>constraint_property</string> </key>
<value>
<tuple>
<string>reference</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reference_not_empty_constraint</string> </value>
</item>
<item>
<key> <string>message_attribute_match</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>String Attribute Match Constraint</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 Arity Constraint" 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>constraint_base_category</string> </key>
<value>
<tuple>
<string>source</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Organisation\', \'Person\')</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>source_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </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 Arity Constraint" 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>constraint_base_category</string> </key>
<value>
<tuple>
<string>source_section</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Organisation\', \'Person\')</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>source_section_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </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 Arity Constraint" 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>constraint_base_category</string> </key>
<value>
<tuple>
<string>specialise</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Sale Trade Condition\', )</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>specialise_arity_constraint_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </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="TALES Constraint" 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>expression</string> </key>
<value> <string>python: len([x for x in here.getSpecialiseValueList() if (x is not None) and (x.getValidationState() == \'validated\')]) == 1</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>specialise_validation_state_constraint</string> </value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>Sale Trade Condition must be validated</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>TALES Constraint</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="Property Existence Constraint" 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>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</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>constraint_property</string> </key>
<value>
<tuple>
<string>start_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>start_date_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Property start_date must be defined</string> </value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Property start_date must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Existence Constraint</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>
......@@ -2,7 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Existence Constraint" module="erp5.portal_type"/>
<global name="TALES Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
......@@ -18,28 +18,31 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>price</string>
<string>quantity</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>expression</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: 0 < context.getTotalQuantity()
]]></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_existence_constraint</string> </value>
<value> <string>quantity_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>No quantity defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Existence Constraint</string> </value>
<value> <string>TALES Constraint</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Arity Constraint" 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>constraint_base_category</string> </key>
<value>
<tuple>
<string>resource</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: context.getPortalServiceTypeList()</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>resource_arity_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </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="TALES Constraint" 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>expression</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: 0 < context.getTotalQuantity()
]]></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>No quantity defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>TALES Constraint</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>
......@@ -2,56 +2,10 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Organisation" module="erp5.portal_type"/>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
......@@ -70,16 +24,6 @@
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>price_currency/currency_module/EUR</string>
<string>group/company</string>
<string>role/admin</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
......@@ -88,15 +32,11 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>slapos</string> </value>
<value> <string>SlapOSAccountingSaleTradeConditionConstraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Organisation</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>SlapOS</string> </value>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="String Attribute Match Constraint" 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>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</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>constraint_property</string> </key>
<value>
<tuple>
<string>reference</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reference_not_empty_constraint</string> </value>
</item>
<item>
<key> <string>message_attribute_match</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>String Attribute Match Constraint</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="TALES Constraint" 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>expression</string> </key>
<value> <string>python: len([x for x in here.getSpecialiseValueList() if (x is not None) and (x.getValidationState() == \'validated\')]) == 1</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>specialise_validation_state_constraint</string> </value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>Sale Trade Condition / Business Process must be validated</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>TALES Constraint</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="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Require a portal type to have a ledger configured to prevent conflict between the automated and manual document handling.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SlapOSLedgerConstraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Arity Constraint" 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>constraint_base_category</string> </key>
<value>
<tuple>
<string>ledger</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Category\',)</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Require to configure one ledger.\n
\n
XXX maybe minimum value should be zero?\n
Let\'s try first like this to detect all issues in tests</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ledger_arity_constraint_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </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 Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ledger_category</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
trade_condition_uid_list = []
root_trade_condition_uid_list = [
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()).getUid(),
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid()]
trade_condition_uid_list.extend(root_trade_condition_uid_list)
trade_condition_uid_list.extend([
i.uid for i in portal.ERP5Site_searchRelatedInheritedSpecialiseList(
specialise_uid=root_trade_condition_uid_list,
validation_state="validated")])
portal.portal_catalog.searchAndActivate(
portal_type='Sale Packing List',
simulation_state='started',
causality_state='solved',
specialise_uid=trade_condition_uid_list,
ledger__uid=portal.portal_categories.ledger.automated.getUid(),
method_id='Delivery_deliverStartedAggregatedSalePackingList',
activate_kw={'tag': tag},
)
......
......@@ -2,7 +2,6 @@ portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate(
method_id='InstanceTree_requestUpdateOpenSaleOrder',
method_kw=dict(specialise="sale_trade_condition_module/default_subscription_trade_condition", ),
portal_type="Instance Tree",
causality_state="diverged",
activate_kw={'tag': tag, 'priority': 2},
......
......@@ -17,17 +17,11 @@ accounting_date = params.get('accounting_date', DateTime().earliestTime())
portal = context.getPortalObject()
trade_condition_uid_list = [portal.restrictedTraverse(portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid()]
trade_condition_uid_list.extend([
i.uid for i in portal.ERP5Site_searchRelatedInheritedSpecialiseList(
specialise_uid=trade_condition_uid_list,
validation_state="validated")])
portal.portal_catalog.searchAndActivate(
portal_type='Sale Packing List',
simulation_state='confirmed',
causality_state='solved',
specialise_uid=trade_condition_uid_list,
ledger__uid=portal.portal_categories.ledger.automated.getUid(),
method_id='Delivery_startConfirmedAggregatedSalePackingList',
activate_kw={'tag': tag},
**{'delivery.start_date': Query(range="max",
......
......@@ -4,24 +4,11 @@ if params is None:
from DateTime import DateTime
portal = context.getPortalObject()
trade_condition_uid_list = []
root_trade_condition_value = portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition())
root_trade_condition_uid = root_trade_condition_value.getUid()
trade_condition_uid_list.append(root_trade_condition_uid)
trade_condition_uid_list.extend([
i.uid for i in portal.ERP5Site_searchRelatedInheritedSpecialiseList(
portal_type=root_trade_condition_value.getPortalType(),
specialise_uid=root_trade_condition_uid,
validation_state="validated")])
portal.portal_catalog.searchAndActivate(
portal_type='Sale Packing List',
simulation_state='confirmed',
causality_state='solved',
specialise__uid=trade_condition_uid_list,
ledger__uid=portal.portal_categories.ledger.automated.getUid(),
method_id='Delivery_startConfirmedAggregatedSalePackingList',
activate_kw={'tag': tag},
)
......
from DateTime import DateTime
portal = context.getPortalObject()
trade_condition_uid_list = []
# search for user specific trade conditions
root_trade_condition_uid_list = [
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()).getUid(),
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid()]
trade_condition_uid_list.extend(root_trade_condition_uid_list)
trade_condition_uid_list.extend([
i.uid for i in portal.ERP5Site_searchRelatedInheritedSpecialiseList(
portal_type="Sale Trade Condition",
specialise_uid=root_trade_condition_uid_list,
validation_state="validated")])
portal.portal_catalog.searchAndActivate(
portal_type='Sale Invoice Transaction',
simulation_state='confirmed',
causality_state='solved',
specialise__uid=trade_condition_uid_list,
ledger__uid=portal.portal_categories.ledger.automated.getUid(),
method_id='Delivery_stopConfirmedAggregatedSaleInvoiceTransaction',
activate_kw={'tag': tag}
)
......
......@@ -2,6 +2,7 @@ root_trade_condition_reference_list = [
"slapos_aggregated_trade_condition",
"slapos_aggregated_subscription_trade_condition",
# Valid trade condition for payments
"slapos_manual_accounting_trade_condition"
"slapos_manual_accounting_trade_condition",
"slapos_ultimate_trade_condition",
]
return context.Base_useSaleTradeConditionReference(root_trade_condition_reference_list)
......@@ -4,30 +4,10 @@ if context.getPortalType() != 'Sale Packing List':
raise TypeError('Incorrect delivery.')
isTransitionPossible = portal.portal_workflow.isTransitionPossible
if context.getSimulationState() == 'started' \
and context.getLedger() == 'automated'\
and len(context.checkConsistency()) == 0 \
and context.getCausalityState() == 'solved':
if context.getSpecialise() not in [
portal.portal_preferences.getPreferredAggregatedSaleTradeCondition(),
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()]:
trade_condition_uid_list = []
# search for user specific trade conditions
root_trade_condition_uid_list = [
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()).getUid(),
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid()]
trade_condition_uid_list.extend(root_trade_condition_uid_list)
trade_condition_uid_list.extend([
i.uid for i in portal.ERP5Site_searchRelatedInheritedSpecialiseList(
specialise_uid=root_trade_condition_uid_list,
validation_state="validated")])
if context.getSpecialiseUid() not in trade_condition_uid_list:
return
comment = 'Delivered by alarm as all actions in started state are ready.'
if isTransitionPossible(context, 'stop'):
context.stop(comment=comment)
......
......@@ -7,30 +7,10 @@ if context.getPortalType() != 'Sale Packing List':
isTransitionPossible = portal.portal_workflow.isTransitionPossible
if context.getSimulationState() == 'confirmed' \
and context.getLedger() == 'automated'\
and len(context.checkConsistency()) == 0 \
and context.getCausalityState() == 'solved':
if context.getSpecialise() not in [
portal.portal_preferences.getPreferredAggregatedSaleTradeCondition(),
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()]:
trade_condition_uid_list = []
# search for user specific trade conditions
root_trade_condition_uid_list = [
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()).getUid(),
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid()]
trade_condition_uid_list.extend(root_trade_condition_uid_list)
trade_condition_uid_list.extend([
i.uid for i in portal.ERP5Site_searchRelatedInheritedSpecialiseList(
specialise_uid=root_trade_condition_uid_list,
validation_state="validated")])
if context.getSpecialiseUid() not in trade_condition_uid_list:
return
comment = 'Start by alarm as all actions in confirmed state are ready.'
date = context.getStartDate()
if date is None:
......
......@@ -3,32 +3,11 @@ if context.getPortalType() != 'Sale Invoice Transaction':
raise TypeError('Incorrect delivery.')
isTransitionPossible = portal.portal_workflow.isTransitionPossible
if context.getSimulationState() == 'confirmed'\
and context.getLedger() == 'automated'\
and len(context.checkConsistency()) == 0\
and context.getCausalityState() == 'solved'\
and len(context.objectValues(portal_type="Sale Invoice Transaction Line")):
if context.getSpecialise() not in [
portal.portal_preferences.getPreferredAggregatedSaleTradeCondition(),
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()]:
trade_condition_uid_list = []
# search for user specific trade conditions
root_trade_condition_uid_list = [
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSubscriptionSaleTradeCondition()).getUid(),
portal.restrictedTraverse(
portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid()]
trade_condition_uid_list.extend(root_trade_condition_uid_list)
trade_condition_uid_list.extend([
i.uid for i in portal.ERP5Site_searchRelatedInheritedSpecialiseList(
portal_type="Sale Trade Condition",
specialise_uid=root_trade_condition_uid_list,
validation_state="validated")])
if context.getSpecialiseUid() not in trade_condition_uid_list:
return
comment = 'Stopped by alarm as all actions in confirmed state are ready.'
if isTransitionPossible(context, 'start'):
context.start(comment=comment)
......
......@@ -31,11 +31,15 @@ current_payment = portal.accounting_module.newContent(
portal_type="Payment Transaction",
causality=current_invoice.getRelativeUrl(),
source_section=current_invoice.getSourceSection(),
source_project=current_invoice.getSourceProject(),
destination_section=current_invoice.getDestinationSection(),
destination_project=current_invoice.getDestinationProject(),
resource=current_invoice.getResource(),
price_currency=current_invoice.getResource(),
specialise=current_invoice.getSpecialise(),
destination_section=current_invoice.getDestinationSection(),
payment_mode=current_invoice.getPaymentMode(),
ledger=current_invoice.getLedger(),
start_date=current_invoice.getStartDate(),
stop_date=current_invoice.getStopDate(),
source_payment='%s/bank_account' % current_invoice.getSourceSection(), # the other place defnied: business process
......
......@@ -18,23 +18,121 @@ def storeWorkflowComment(document, comment):
portal.portal_workflow.doActionFor(document, 'edit_action', comment=comment)
def newOpenOrder():
new_open_sale_order = portal.open_sale_order_module.newContent(portal_type="Open Sale Order")
new_open_sale_order.edit(
def newOpenOrder(start_date, service,
software_release, software_type,
hosting_subscription, instance_tree,
activate_kw,
price=None, temp_order=False):
if temp_order:
order_portal_type = 'Sale Order'
line_portal_type = 'Sale Order Line'
cell_portal_type = 'Sale Order Cell'
base_id = 'movement'
module = portal.sale_order_module
aggregate_value_list = []
else:
order_portal_type = 'Open Sale Order'
line_portal_type = 'Open Sale Order Line'
cell_portal_type = 'Open Sale Order Cell'
base_id = 'path'
module = portal.open_sale_order_module
aggregate_value_list = [
hosting_subscription,
instance_tree
]
open_sale_order = module.newContent(
portal_type=order_portal_type,
temp_object=temp_order,
specialise=specialise,
effective_date=DateTime(),
start_date=start_date,
# Ensure stop date value is higher than start date
# it will be updated by OpenSaleOrder_updatePeriod
stop_date=start_date + 1,
activate_kw=activate_kw,
destination=person.getRelativeUrl(),
destination_decision=person.getRelativeUrl(),
title="%s SlapOS Subscription" % person.getTitle()
destination_value=person,
destination_section_value=person,
destination_decision_value=person,
title="%s SlapOS Subscription" % person.getTitle(),
ledger_value=portal.portal_categories.ledger.automated,
destination_project_value=instance_tree.getFollowUpValue(),
)
new_open_sale_order.order(activate_kw=activate_kw)
new_open_sale_order.validate(activate_kw=activate_kw)
return new_open_sale_order
resource_vcl = [
'software_release/%s' % software_release.getRelativeUrl(),
'software_type/%s' % software_type.getRelativeUrl()
]
resource_vcl.sort()
assert len(resource_vcl) == 2, service
# Add lines
open_order_line = open_sale_order.newContent(
portal_type=line_portal_type,
temp_object=temp_order,
resource_value=service,
variation_category_list=resource_vcl,
quantity_unit=service.getQuantityUnit(),
base_contribution_list=service.getBaseContributionList(),
use=service.getUse(),
# stop_date=calculateOpenOrderLineStopDate(open_sale_order_line,
# instance_tree, start_date_delta=start_date_delta),
activate_kw=activate_kw
)
"""
subscription_request = instance_tree.getAggregateRelatedValue(portal_type="Subscription Request")
# Define the start date of the period, this can variates with the time.
# start_date_delta = 0
if subscription_request is not None:
# Quantity is double because the first invoice has to
# charge for 2 months
edit_kw['quantity'] = subscription_request.getQuantity()
"""
cell_key = list(open_order_line.getCellKeyList(base_id=base_id))[0]
open_order_cell = open_order_line.newCell(
base_id=base_id,
portal_type=cell_portal_type,
temp_object=temp_order,
*cell_key
)
open_order_cell.edit(
mapped_value_property_list=['price','quantity'],
quantity=1,
predicate_category_list=cell_key,
variation_category_list=cell_key,
aggregate_value_list=aggregate_value_list,
activate_kw=activate_kw
)
open_sale_order.SaleOrder_applySaleTradeCondition(batch_mode=1, force=1)
# Check compatibility with previous template
if specialise is not None:
assert open_sale_order.getSpecialise() == specialise
if price is None:
price = open_order_cell.getPrice()
open_order_cell.edit(
price=price
)
storeWorkflowComment(open_order_line, "Created for %s" % instance_tree.getRelativeUrl())
# instance_tree.converge(comment="Last open order: %s" % open_sale_order_line.getRelativeUrl())
open_order_explanation = "Added %s." % str(open_order_line.getId())
storeWorkflowComment(open_sale_order, open_order_explanation)
if not temp_order:
open_sale_order.order(activate_kw=activate_kw)
open_sale_order.validate(activate_kw=activate_kw)
return open_sale_order, open_order_line, open_order_cell
if instance_tree.getCausalityState() == 'diverged':
open_order = None
open_sale_order = None
person = instance_tree.getDestinationSectionValue(portal_type="Person")
# Template document does not have person relation
if person is not None:
......@@ -63,102 +161,59 @@ if instance_tree.getCausalityState() == 'diverged':
# Let's create the open order
if is_open_order_creation_needed:
open_sale_order = newOpenOrder()
open_order_explanation = ""
# Add lines
open_order_line = open_sale_order.newContent(portal_type="Open Sale Order Line")
# Search for matching resource
service, software_release, software_type = instance_tree.InstanceTree_getSoftwareProduct()
if (service is None) or (service.getUse() != 'trade/sale'):
# XXX Add comment on instance tree
return
#raise NotImplementedError('No Software Product defined for %s' % instance_tree.getRelativeUrl())
#assert instance_tree.getPortalType() in service.getRequiredAggregatedPortalTypeList()
# Sale Supply price do not match Open Order
# Create a temp Sale Order to calculate the real price
_, _, order_cell = newOpenOrder(
DateTime(), service,
software_release, software_type,
None, instance_tree,
activate_kw,
temp_order=True
)
if order_cell.getPrice() is None:
# No price found, do not create anything for now
storeWorkflowComment(instance_tree, "No price found")
return
hosting_subscription = portal.hosting_subscription_module.newContent(
portal_type="Hosting Subscription",
title=instance_tree.getTitle()
title=instance_tree.getTitle(),
follow_up_value=instance_tree.getFollowUpValue(),
ledger_value=portal.portal_categories.ledger.automated,
)
hosting_subscription.validate()
start_date = hosting_subscription.HostingSubscription_calculateSubscriptionStartDate()
# Search for matching resource
service_list = portal.portal_catalog(
# XXX Hardcoded as temporary
id='slapos_instance_subscription',
portal_type='Service',
validation_state='validated',
use__relative_url='use/trade/sale'
open_sale_order, open_order_line, open_order_cell = newOpenOrder(
start_date, service,
software_release, software_type,
hosting_subscription, instance_tree,
activate_kw,
price=order_cell.getPrice()
)
service = [x for x in service_list if instance_tree.getPortalType() in x.getRequiredAggregatedPortalTypeList()][0].getObject()
edit_kw = {
'quantity': 1,
'resource_value': service,
'quantity_unit': service.getQuantityUnit(),
'base_contribution_list': service.getBaseContributionList(),
'use': service.getUse()
}
subscription_request = instance_tree.getAggregateRelatedValue(portal_type="Subscription Request")
# Define the start date of the period, this can variates with the time.
# start_date_delta = 0
if subscription_request is not None:
# Quantity is double because the first invoice has to
# charge for 2 months
edit_kw['quantity'] = subscription_request.getQuantity()
open_order_line.edit(
activate_kw=activate_kw,
title=instance_tree.getTitle(),
start_date=start_date,
# Ensure stop date value is higher than start date
# it will be updated by OpenSaleOrder_updatePeriod
stop_date=start_date + 1,
# stop_date=calculateOpenOrderLineStopDate(open_sale_order_line,
# instance_tree, start_date_delta=start_date_delta),
aggregate_value_list=[hosting_subscription, instance_tree],
**edit_kw
)
predicate_list = []
inherited_trade_condition = open_sale_order.getSpecialiseValue()
while inherited_trade_condition is not None:
predicate_list.extend([
x for x in inherited_trade_condition.contentValues(portal_type='Sale Supply Line')
if x.getResource() == service.getRelativeUrl()
])
inherited_trade_condition = inherited_trade_condition.getSpecialiseValue(portal_type=inherited_trade_condition.getPortalType())
price = service.getPrice(
context=open_order_line,
predicate_list=predicate_list,
default=None,
)
if price is None:
raise NotImplementedError('Price must be defined')
open_order_line.edit(
price=price
)
storeWorkflowComment(open_order_line, "Created for %s" % instance_tree.getRelativeUrl())
# instance_tree.converge(comment="Last open order: %s" % open_sale_order_line.getRelativeUrl())
open_order_explanation = "Added %s." % str(open_order_line.getId())
storeWorkflowComment(open_sale_order, open_order_explanation)
open_order = open_order_line.getParentValue()
open_order.SaleOrder_applySaleTradeCondition(batch_mode=1, force=1)
# Check compatibility with previous template
assert open_order.getSpecialise() == specialise
if open_order_line is not None:
open_order = open_order_line.getParentValue()
assert open_order_line.getResource() == 'service_module/slapos_instance_subscription'
assert open_order_line.getQuantityUnit() == 'unit/piece'
assert open_order_line.getResource().startswith('software_product')
assert open_order_line.getQuantityUnit() == 'time/month', open_order_line.getQuantityUnit()
assert open_order_line.getBaseContribution() == 'base_amount/invoicing/discounted'
assert open_order_line.getBaseContributionList()[1] == 'base_amount/invoicing/taxable'
assert open_order_line.getUse() == 'trade/sale'
#assert open_order_line.getPrice() == 1, open_order_line.getPrice()
#assert open_order_line.getQuantity() == 1
assert open_order_cell.getQuantity() == 1
open_order.OpenSaleOrder_updatePeriod()
open_sale_order.OpenSaleOrder_updatePeriod()
# Person_storeOpenSaleOrderJournal should fix all divergent Instance Tree in one run
assert instance_tree.getCausalityState() == 'solved'
return open_order
return open_sale_order
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>specialise, REQUEST=None</string> </value>
<value> <string>specialise=None, REQUEST=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
def sort_key_method(e):
"""
Priority order of Sale Supply is :
having both group and source_function
having group only
having source_function only
others
"""
parent = e.getParentValue()
if parent.getPortalType().endswith('Line'):
parent = parent.getParentValue()
minus = 0.5
else:
minus = 0
return 0 - 1 * int(parent.hasDestination()) - minus
def filter_method(currency, destination_project, group):
def filter_by_source_function_and_group(l):
ret = []
for i in l:
parent = i.getParentValue()
if parent.getPortalType().endswith('Line'):
parent = parent.getParentValue()
# Price should be set in Sale Supply only.
if parent.getPortalType() != 'Sale Supply' and parent.getParentValue().getPortalType() != 'Sale Supply':
continue
date = context.getStartDate()
# Check if effective
if parent.hasStartDateRangeMin() and date < parent.getStartDateRangeMin():
continue
# Check if not expired
if parent.hasStartDateRangeMax() and date > parent.getStartDateRangeMax():
continue
# Sale Supply having a different destination_project should not be applied.
if parent.getDestinationProject() != destination_project:
continue
if parent.getPriceCurrency() != currency:
continue
# XXX Sale Supply having a different group should not be applied.
#if parent.getGroup() not in (None, group):
# continue
ret.append(i)
return ret
return filter_by_source_function_and_group
source = context.getSourceValue()
if source is None:
group = None
else:
group = source.getGroup()
kw['filter_method'] = filter_method(context.getPriceCurrency(), context.getDestinationProject(), group)
kw['sort_key_method'] = sort_key_method
resource = context.getResourceValue()
if resource is not None:
product_line = resource.getProductLine()
if product_line:
kw['categories'] = kw.get('categories', []) + ['product_line/%s' % product_line]
return resource.getPriceCalculationOperandDict(
default=default, context=context, **kw)
return default
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>default=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Movement_getPriceCalculationOperandDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -46,8 +46,15 @@ if open_sale_order.getValidationState() == 'validated':
person = open_sale_order.getDestinationDecisionValue(portal_type="Person")
if person is not None:
for open_order_line in open_sale_order.contentValues(
open_order_path_list = []
for line in open_sale_order.contentValues(
portal_type='Open Sale Order Line'):
if line.hasCellContent(base_id='path'):
open_order_path_list.extend(line.getCellValueList(base_id='path'))
else:
open_order_path_list.append(line)
for open_order_line in open_order_path_list:
current_start_date = open_order_line.getStartDate()
current_stop_date = open_order_line.getStopDate()
......@@ -58,31 +65,33 @@ if open_sale_order.getValidationState() == 'validated':
hosting_subscription = open_order_line.getAggregateValue(portal_type='Hosting Subscription')
instance_tree = open_order_line.getAggregateValue(portal_type='Instance Tree')
assert current_start_date == hosting_subscription.HostingSubscription_calculateSubscriptionStartDate()
subscription_request = instance_tree.getAggregateRelatedValue(portal_type="Subscription Request")
# Define the start date of the period, this can variates with the time.
next_stop_date_delta = 0
if subscription_request is not None:
next_stop_date_delta = 46
# First check if the instance tree has been correctly simulated (this script may run only once per year...)
stop_date = calculateOpenOrderLineStopDate(open_order_line, hosting_subscription, instance_tree,
start_date_delta=0, next_stop_date_delta=next_stop_date_delta)
if current_stop_date < stop_date:
# Bingo, new subscription to generate
open_order_line.edit(
stop_date=stop_date,
activate_kw=activate_kw)
storeWorkflowComment(open_order_line,
'Stop date updated to %s' % stop_date)
if instance_tree.getSlapState() == 'destroy_requested':
# Line should be deleted
assert instance_tree.getCausalityState() == 'diverged'
instance_tree.converge(comment="Last open order: %s" % open_order_line.getRelativeUrl())
open_sale_order.archive()
storeWorkflowComment(open_sale_order, "Instance Tree destroyed: %s" % instance_tree.getRelativeUrl())
elif (instance_tree.getCausalityState() == 'diverged'):
instance_tree.converge(comment="Nothing to do on open order.")
if instance_tree is not None:
subscription_request = instance_tree.getAggregateRelatedValue(portal_type="Subscription Request")
# Define the start date of the period, this can variates with the time.
next_stop_date_delta = 0
if subscription_request is not None:
next_stop_date_delta = 46
# First check if the instance tree has been correctly simulated (this script may run only once per year...)
stop_date = calculateOpenOrderLineStopDate(open_order_line, hosting_subscription, instance_tree,
start_date_delta=0, next_stop_date_delta=next_stop_date_delta)
if current_stop_date < stop_date:
# Bingo, new subscription to generate
open_order_line.edit(
stop_date=stop_date,
activate_kw=activate_kw)
#storeWorkflowComment(open_order_line,
# 'Stop date updated to %s' % stop_date)
if instance_tree.getSlapState() == 'destroy_requested':
# Line should be deleted
assert instance_tree.getCausalityState() == 'diverged'
instance_tree.converge(comment="Last open order: %s" % open_order_line.getRelativeUrl())
open_sale_order.archive()
storeWorkflowComment(open_sale_order, "Instance Tree destroyed: %s" % instance_tree.getRelativeUrl())
elif (instance_tree.getCausalityState() == 'diverged'):
instance_tree.converge(comment="Nothing to do on open order.")
......@@ -18,7 +18,7 @@ consumption_specialise_uid_list = [q.getUid() for q in portal.ERP5Site_searchRel
portal_type='Sale Trade Condition')]
aggregateable_service_uid_list = [service.getUid() for service in \
portal.portal_categories.base_amount.invoicing.getBaseContributionRelatedValueList(portal_type="Service")]
portal.portal_categories.base_amount.invoicing.getBaseContributionRelatedValueList(portal_type=portal.getPortalServiceTypeList())]
select_dict= {'default_aggregate_portal_type': None}
......@@ -67,8 +67,11 @@ for movement in movement_list:
source=movement.getSource(),
destination=movement.getDestination(),
source_section=movement.getSourceSection(),
source_project=movement.getSourceProject(),
destination_section=movement.getDestination(),
destination_decision=movement.getDestination(),
destination_project=movement.getDestinationProject(),
ledger=movement.getLedger(),
specialise=specialise,
price_currency=movement.getPriceCurrency(),
start_date=movement.getStartDate(),
......
......@@ -9,12 +9,16 @@ def newPackingList(movement, causality, message):
source=movement.getSource(),
destination=movement.getDestination(),
source_section=movement.getSourceSection(),
source_project=movement.getSourceProject(),
destination_section=movement.getDestination(),
destination_project=movement.getDestinationProject(),
destination_decision=movement.getDestination(),
specialise=movement.getSpecialise(),
price_currency=movement.getPriceCurrency(),
causality=causality,
start_date=movement.getStartDate())
start_date=movement.getStartDate(),
ledger=movement.getLedger(),
)
delivery.confirm(message)
return delivery
......
# This script searches for a trade condition matching the order
# and tries to complete some fields
order = context
Base_translateString = context.Base_translateString
trade_condition_portal_type = 'Sale Trade Condition'
trade_condition_list = order.getSpecialiseValueList(
portal_type=trade_condition_portal_type)
all_category_list = ('source_section', 'source', 'source_project',
'destination_section', 'destination', 'destination_project',
'currency')
tested_base_category_list = [ ]
for base_category in all_category_list:
if context.getProperty(base_category):
tested_base_category_list.append(base_category)
count = len(tested_base_category_list) + 1
# if no date is defined, use today's date to retrieve predicate that define start_date_range_min/max
if order.getStartDate() is None:
predicate_context = order.asContext(start_date=DateTime())
else:
predicate_context = order
def rank_method(trade_condition):
rank = 0
destination_project = trade_condition.getDestinationProject()
if destination_project:
if destination_project == context.getDestinationProject():
rank += 10
else:
rank -= 2
destination_section = trade_condition.getDestinationSection()
if destination_section:
if destination_section == context.getDestinationSection():
rank += 10
else:
rank -= 2
destination = trade_condition.getDestination()
if destination:
if destination == context.getDestination():
rank += 10
else:
rank -= 2
if trade_condition.getSourceProject():
rank += 1
if trade_condition.getSourceSection():
rank += 1
if trade_condition.getSource():
rank += 1
rank += len(trade_condition.getSpecialiseList())
return rank
def sort_method(a, b):
return -cmp(rank_method(a), rank_method(b))
def filter_method(trade_condition_list):
# Reject trade condition which has a non different value than the order
filtered_trade_condition_list = []
for trade_condition in trade_condition_list:
matching = True
for base_category in all_category_list:
if order.getProperty(base_category) and trade_condition.getProperty(base_category):
if trade_condition.getProperty(base_category) != order.getProperty(base_category):
#raise NotImplementedError('%s %s %s' % (base_category, trade_condition.getProperty(base_category), order.getProperty(base_category)))
matching = False
break
if matching:
filtered_trade_condition_list.append(trade_condition)
return filtered_trade_condition_list
while count > 0 and len(trade_condition_list) == 0:
count -= 1
count = 0
#raise NotImplementedError(order.getDestinationProjectUid())
trade_condition_list = context.portal_domains.searchPredicateList(
predicate_context, portal_type=trade_condition_portal_type,
validation_state='validated',
specialise__uid='%',
#source_project__uid=order.getSourceProjectUid(),
destination_project__uid=order.getDestinationProjectUid(),
tested_base_category_list=tested_base_category_list,#[:count],
filter_method=filter_method,
sort_method=sort_method)
#raise NotImplementedError('trade cl %s' % str([(x, rank_method(x), x.getValidationState()) for x in trade_condition_list]))
keep_items = {}
if len(trade_condition_list ) == 0 :
keep_items['portal_status_message'] = Base_translateString('No trade condition.')
keep_items['portal_status_level'] = 'error'
else :
# if more than one trade condition is found, simply apply the first one
trade_condition=trade_condition_list[0].getObject()
order.Order_applyTradeCondition(trade_condition, force=force)
# set date
if hasattr(order, 'getReceivedDate') and order.getReceivedDate() is None:
context.setReceivedDate(DateTime())
keep_items['portal_status_message'] = Base_translateString('Order updated.')
if not batch_mode:
return context.Base_redirect(form_id, keep_items=keep_items)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id=\'view\', batch_mode=0, force=1</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrder_applySaleTradeCondition</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>*args, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleSupplyCell_asPredicate</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
if (not context.hasBasePrice()) or (not context.getPriceCurrency()) or (not context.getResource()) or (not context.getQuantityUnit()):
# Meaningless path if no resource/price_currency/base_price/quantity_unit
return None
supply = context.getParentValue()
base_category_tuple = ['resource', 'price_currency', 'quantity_unit']
if context.getPortalType() == 'Sale Supply Cell':
base_category_tuple.extend(supply.getVariationRangeBaseCategoryList())
supply = supply.getParentValue()
if (supply.getPortalType() != 'Sale Supply') or (supply.getValidationState() != 'validated'):
# If this supply line is not in a validated Sale Supply, it does not apply.
return None
if context.getSourceSection():
base_category_tuple.append('source_section')
if context.getDestinationSection():
base_category_tuple.append('destination_section')
if context.getSource():
base_category_tuple.append('source')
if context.getDestination():
base_category_tuple.append('destination')
if context.getSourceProject():
base_category_tuple.append('source_project')
if context.getDestinationProject():
base_category_tuple.append('destination_project')
#backwards compatibility
mapped_value_property_list = context.getMappedValuePropertyList()
for mapped_property in ('priced_quantity', 'quantity_unit'):
if not mapped_property in mapped_value_property_list:
mapped_value_property_list.append(mapped_property)
context.setMappedValuePropertyList(mapped_value_property_list)
return context.generatePredicate(membership_criterion_base_category_list = base_category_tuple,
criterion_property_list = ('start_date',))
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>*args,**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleSupplyLine_asPredicate</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -35,7 +35,7 @@ else:
# informative.
if compute_node.getReference() == reference:
aggregate_value_list = [compute_node]
person = compute_node.getSourceAdministrationValue(portal_type="Person")
person_relative_url = None
project = compute_node_project
else:
project = None # For now, else we should calculate this too.
......@@ -71,6 +71,7 @@ else:
portal_type="Person")
except:
raise ValueError(instance.getRelativeUrl())
person_relative_url = person.getRelativeUrl()
aggregate_value_list = [partition, instance, subscription]
......@@ -79,21 +80,20 @@ else:
quantity=movement['quantity'],
aggregate_value_list=aggregate_value_list,
resource=movement['resource'],
person=person.getRelativeUrl(),
person=person_relative_url,
project=project
)
)
# Time to create the PL
person = compute_node.getSourceAdministrationValue(portal_type="Person")
delivery_template = portal.restrictedTraverse(
portal.portal_preferences.getPreferredInstanceDeliveryTemplate())
delivery = delivery_template.Base_createCloneDocument(batch_mode=1)
delivery.edit(
title=delivery_title,
destination=person.getRelativeUrl(),
destination_decision=person.getRelativeUrl(),
#destination=person.getRelativeUrl(),
#destination_decision=person.getRelativeUrl(),
start_date=context.getCreationDate(),
)
......
# XXX TODO cloud contract is not global to ERP5, but per virtual master
return True
portal = context.getPortalObject()
if not portal.portal_preferences.getPreferredCloudContractEnabled():
return True
......
......@@ -265,19 +265,29 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
return document
def createAllocatedComputeNode(self):
project = self.addProject()
# Create person
reference = 'test_%s' % self.generateNewId()
person = self.portal.person_module.newContent(portal_type='Person',
title=reference,
reference=reference)
person.newContent(portal_type='Assignment', role='member').open()
person.newContent(
portal_type='Assignment',
function='customer',
destination_project_value=project
).open()
# Create second person
reference = 'test_%s' % self.generateNewId()
second_person = self.portal.person_module.newContent(portal_type='Person',
title=reference,
reference=reference)
second_person.newContent(portal_type='Assignment', role='member').open()
second_person.newContent(
portal_type='Assignment',
function='customer',
destination_project_value=project
).open()
self.commit()
self.person = person
......@@ -293,14 +303,14 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
self.compute_node.edit(
title="Compute Node %s" % new_id,
reference="TESTCOMP-%s" % new_id,
source_administration_value=person
follow_up_value=project
)
self.compute_node.validate()
self.tic()
self._makeComplexComputeNode()
self._makeComplexComputeNode(project)
self.tic()
self.start_requested_software_instance.getSpecialiseValue().edit(
......
......@@ -6,12 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSConsumptionSkins</string> </value>
......@@ -55,28 +49,13 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -89,7 +68,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -98,7 +77,7 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
......
......@@ -22,7 +22,20 @@
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
def makeSaleInvoiceTransaction(self, person=None):
project = self.addProject()
if person is None:
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
invoice = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice.edit(destination_section_value=person,
destination_project_value=project,
ledger='automated',
payment_mode=self.payment_mode)
return person, invoice
def sumReceivable(self, payment_transaction):
quantity = .0
default_source_uid = self.portal.restrictedTraverse(
......@@ -44,11 +57,14 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
expected_set = [
'causality/%s' % invoice.getRelativeUrl(),
'destination_section/%s' % invoice.getDestinationSection(),
'destination_project/%s' % invoice.getDestinationProject(),
'price_currency/%s' % invoice.getPriceCurrency(),
'resource/%s' % invoice.getResource(),
'source_payment/organisation_module/slapos/bank_account',
'payment_mode/%s' % self.payment_mode,
'source_section/%s' % invoice.getSourceSection(),
#'source_project/%s' % invoice.getSourceProject(),
'ledger/%s' % invoice.getLedger(),
]
self.assertSameSet(expected_set, payment.getCategoryList())
self.assertEqual(invoice.getStartDate(), payment.getStartDate())
......@@ -87,12 +103,7 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
invoice.REQUEST.set(payment_tag, None)
def _test(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
invoice = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice.edit(destination_section=person.getRelativeUrl(),
payment_mode=self.payment_mode)
person, invoice = self.makeSaleInvoiceTransaction()
invoice.confirm()
invoice.stop()
self.tic()
......@@ -101,12 +112,7 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
self.assertPayment(payment, invoice)
def _test_twice(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
invoice = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice.edit(destination_section=person.getRelativeUrl(),
payment_mode=self.payment_mode)
person, invoice = self.makeSaleInvoiceTransaction()
invoice.confirm()
invoice.stop()
self.tic()
......@@ -120,12 +126,7 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
self.assertPayment(payment, invoice)
def _test_twice_transaction(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
invoice = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice.edit(destination_section=person.getRelativeUrl(),
payment_mode=self.payment_mode)
person, invoice = self.makeSaleInvoiceTransaction()
invoice.confirm()
invoice.stop()
self.tic()
......@@ -135,12 +136,7 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
self.assertPayment(payment, invoice)
def _test_twice_indexation(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
invoice = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice.edit(destination_section=person.getRelativeUrl(),
payment_mode=self.payment_mode)
person, invoice = self.makeSaleInvoiceTransaction()
invoice.confirm()
invoice.stop()
self.tic()
......@@ -155,15 +151,9 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
self.tic()
self.assertPayment(payment, invoice)
self.assertPayment(payment2, invoice)
def _test_cancelled_payment(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
invoice = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice.edit(destination_section=person.getRelativeUrl(),
payment_mode=self.payment_mode)
person, invoice = self.makeSaleInvoiceTransaction()
invoice.confirm()
invoice.stop()
self.tic()
......@@ -177,18 +167,10 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
self.assertPayment(payment, invoice)
def _test_two_invoices(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
invoice_1 = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice_1.edit(destination_section=person.getRelativeUrl(),
payment_mode=self.payment_mode)
person, invoice_1 = self.makeSaleInvoiceTransaction()
invoice_1.confirm()
invoice_1.stop()
invoice_2 = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice_2.edit(destination_section=person.getRelativeUrl(),
payment_mode=self.payment_mode)
_, invoice_2 = self.makeSaleInvoiceTransaction(person=person)
invoice_2.confirm()
invoice_2.stop()
self.tic()
......@@ -210,12 +192,7 @@ class TestSlapOSEntityCreatePaymentMixin(SlapOSTestCaseMixin):
self.assertPayment(payment_2, invoice_2)
def _test_two_lines(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
invoice = self.portal.accounting_module.template_sale_invoice_transaction\
.Base_createCloneDocument(batch_mode=1)
invoice.edit(destination_section=person.getRelativeUrl(),
payment_mode=self.payment_mode)
person, invoice = self.makeSaleInvoiceTransaction()
self.tic()
default_source_uid = self.portal.restrictedTraverse(
'account_module/receivable').getUid()
......
# Copyright (c) 2022 Nexedi SA and Contributors. All Rights Reserved.
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
from DateTime import DateTime
from Products.CMFCore.utils import getToolByName
class TestSlapOSSaleSupply(SlapOSTestCaseMixin):
def test_check(self):
# Create 2 projects
project_1 = self.portal.project_module.newContent(
portal_type="Project",
title="project_1"
)
project_2 = self.portal.project_module.newContent(
portal_type="Project",
title="project_2"
)
# Create 2 software product
# - one with 1 release and 1 type
# - one with 2 releases and 2 types
simple_product = self.portal.software_product_module.newContent(
portal_type="Software Product",
title="Simple Product",
)
simple_product.newContent(
portal_type="Software Product Type Variation",
title="software_type_a"
)
simple_product.newContent(
portal_type="Software Product Release Variation",
url_string="http://example.org/release_1"
)
complex_product = self.portal.software_product_module.newContent(
portal_type="Software Product",
title="Complex Product"
)
complex_product.newContent(
portal_type="Software Product Type Variation",
title="software_type_b"
)
complex_product.newContent(
portal_type="Software Product Type Variation",
title="software_type_c"
)
complex_product.newContent(
portal_type="Software Product Release Variation",
url_string="http://example.org/release_2"
)
complex_product.newContent(
portal_type="Software Product Release Variation",
url_string="http://example.org/release_3"
)
# create 2 users
person_1 = self.portal.person_module.newContent()
person_2 = self.portal.person_module.newContent()
# Create 2 sale supplies
# - one for everybody (no destination)
# - one for one specific user
now = DateTime()
wrong_currency_supply = self.portal.sale_supply_module.newContent(
title="Wrong currency Supply",
start_date_range_min=now,
destination_project_value=project_1,
price_currency="currency_module/CNY",
)
everybody_supply = self.portal.sale_supply_module.newContent(
title="Everybody Supply",
start_date_range_min=now,
destination_project_value=project_1,
price_currency="currency_module/EUR",
)
person_1_supply = self.portal.sale_supply_module.newContent(
title="Person 1 Supply",
start_date_range_min=now,
destination_project_value=project_1,
destination_value=person_1,
price_currency="currency_module/EUR"
)
# Create sale Line/Cell for all product combination
sale_supply_cell_list = []
sale_supply_line_list = []
base_id = 'path'
base_price = 0
for sale_supply in [wrong_currency_supply, everybody_supply, person_1_supply]:
base_price += 1
sale_supply_line = sale_supply.newContent(
title="without resource",
portal_type="Sale Supply Line",
base_price=base_price,
)
sale_supply_line_list.append(sale_supply_line)
for software_product in [simple_product, complex_product]:
sale_supply_line = sale_supply.newContent(
title="%s without price" % software_product.getTitle(),
portal_type="Sale Supply Line",
resource_value=software_product,
quantity_unit=software_product.getQuantityUnit(),
)
sale_supply_line_list.append(sale_supply_line)
base_price += 1
sale_supply_line = sale_supply.newContent(
title="%s without variation" % software_product.getTitle(),
portal_type="Sale Supply Line",
resource_value=software_product,
base_price=base_price,
quantity_unit=software_product.getQuantityUnit(),
)
sale_supply_line_list.append(sale_supply_line)
sale_supply_line = sale_supply.newContent(
title="%s with variation" % software_product.getTitle(),
portal_type="Sale Supply Line",
resource_value=software_product,
quantity_unit=software_product.getQuantityUnit(),
)
sale_supply_line_list.append(sale_supply_line)
base_price += 1
sale_supply_line.edit(
base_price=base_price,
p_variation_base_category_list=sale_supply_line.getVariationRangeBaseCategoryList()
)
sale_supply_line.setCellRange(
base_id=base_id,
*sale_supply_line.SupplyLine_asCellRange(base_id=base_id)
)
for cell_key in list(sale_supply_line.getCellKeyList(base_id=base_id)):
sale_supply_cell = sale_supply_line.newCell(
base_id=base_id,
portal_type='Sale Supply Cell',
*cell_key
)
base_price += 1
sale_supply_cell.edit(
mapped_value_property_list=['base_price'],
base_price=base_price,
predicate_category_list=cell_key,
variation_category_list=cell_key
)
sale_supply_cell_list.append(sale_supply_cell)
sale_supply.validate()
self.tic()
# Create movements
# one for everybody
# one for one specific user
# check if predicates match
i = 0
domain_tool = getToolByName(self.portal, 'portal_domains')
for software_product in [simple_product, complex_product]:
for software_type in software_product.contentValues(portal_type="Software Product Type Variation"):
for software_release in software_product.contentValues(portal_type="Software Product Release Variation"):
for project in [project_1, project_2, None]:
for destination in [person_1, person_2, None]:
for start_date in [now, now-1, None]:
tmp_context = self.portal.portal_trash.newContent(
portal_type='Movement',
temp_object=1,
resource_value=software_product,
quantity_unit=software_product.getQuantityUnit(),
software_type_value=software_type,
software_release_value=software_release,
start_date=start_date,
destination_project_value=project,
destination_value=destination,
price_currency="currency_module/EUR"
)
# Check Sale Supply Cell predicate configuration
for sale_supply_line in sale_supply_line_list:
expected_test_result = (
(sale_supply_line.hasBasePrice()) and
(sale_supply_line.getPriceCurrency() == "currency_module/EUR") and
(software_product.getRelativeUrl() == sale_supply_line.getResource()) and
(project == sale_supply_line.getParentValue().getDestinationProjectValue()) and
((sale_supply_line.getParentValue().getDestinationValue() is None) or
(destination == sale_supply_line.getParentValue().getDestinationValue())) and
(start_date == sale_supply_line.getParentValue().getStartDateRangeMin())
)
assert sale_supply_line.test(tmp_context) == expected_test_result, """Expected: %s %i %s
Product: %s %s
Project: %s %s
Destination: %s %s
Date: %s %s
""" % (
expected_test_result, i, sale_supply_line.getRelativeUrl(),
software_product.getRelativeUrl(), sale_supply_line.getResource(),
project.getRelativeUrl(), sale_supply_line.getParentValue().getDestinationProject(),
destination, sale_supply_line.getParentValue().getDestination(),
start_date, sale_supply_line.getParentValue().getStartDateRangeMin()
)
assert (sale_supply_line in domain_tool.searchPredicateList(
tmp_context, portal_type=['Sale Supply Line'])) == expected_test_result
# Check Sale Supply Cell predicate configuration
for sale_supply_cell in sale_supply_cell_list:
expected_test_result = (
(sale_supply_cell.hasBasePrice()) and
(sale_supply_cell.getPriceCurrency() == "currency_module/EUR") and
(software_product.getRelativeUrl() == sale_supply_cell.getResource()) and
(software_type.getRelativeUrl() == sale_supply_cell.getSoftwareType()) and
(software_release.getRelativeUrl() == sale_supply_cell.getSoftwareRelease()) and
(project == sale_supply_cell.getParentValue().getParentValue().getDestinationProjectValue()) and
((sale_supply_cell.getParentValue().getParentValue().getDestinationValue() is None) or
(destination == sale_supply_cell.getParentValue().getParentValue().getDestinationValue())) and
(start_date == sale_supply_cell.getParentValue().getParentValue().getStartDateRangeMin())
)
assert sale_supply_cell.test(tmp_context) == expected_test_result, """Expected: %s %i %s
Product: %s %s
Type: %s %s
Release: %s %s
Project: %s %s
Destination: %s %s
Date: %s %s
""" % (
expected_test_result, i, sale_supply_cell.getRelativeUrl(),
software_product.getRelativeUrl(), sale_supply_cell.getResource(),
software_type.getRelativeUrl(), sale_supply_cell.getSoftwareType(),
software_release.getRelativeUrl(), sale_supply_cell.getSoftwareRelease(),
project.getRelativeUrl(), sale_supply_cell.getParentValue().getParentValue().getDestinationProject(),
destination, sale_supply_cell.getParentValue().getParentValue().getDestination(),
start_date, sale_supply_cell.getParentValue().getParentValue().getStartDateRangeMin()
)
assert (sale_supply_cell in domain_tool.searchPredicateList(
tmp_context, portal_type=['Sale Supply Cell'])) == expected_test_result
i += 1
# New variation, to check the price when not Sale Supply Cell matching
with_price_software_release = simple_product.contentValues(portal_type="Software Product Release Variation")[0]
without_price_software_release = simple_product.newContent(
portal_type="Software Product Release Variation",
url_string="http://example.org/release_XX"
)
software_type = simple_product.contentValues(portal_type="Software Product Type Variation")[0]
# Create movements
# check getPrice
for destination, project, software_release, date, expected_price in [
(person_1, project_1, with_price_software_release, now, 24),
(person_1, project_1, without_price_software_release, now, 22),
(person_2, project_1, with_price_software_release, now, 14),
(person_2, project_1, without_price_software_release, now, 12),
(person_1, project_1, with_price_software_release, now - 1, None),
(person_1, project_2, without_price_software_release, now, None),
]:
resource_vcl = [
'software_release/%s' % software_release.getRelativeUrl(),
'software_type/%s' % software_type.getRelativeUrl()
]
resource_vcl.sort()
tmp_context = self.portal.portal_trash.newContent(
portal_type='Sale Order Line',
temp_object=1,
resource_value=simple_product,
variation_category_list=resource_vcl,
start_date=date,
destination_project_value=project,
destination_value=destination,
quantity_unit=software_product.getQuantityUnit(),
price_currency="currency_module/EUR"
)
tmp_context = tmp_context.newContent(
portal_type='Sale Order Cell',
temp_object=1,
software_type_value=software_type,
software_release_value=software_release
)#"""
# Check that price is the predicate base price
assert tmp_context.getPrice() == expected_price, """Expected:
Price: %s %s
Destination: %s
Project: %s
Software_release: %s
Date: %s
""" % (
tmp_context.getPrice(), expected_price,
destination, project, software_release, date
)
\ No newline at end of file
<?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>testSlapOSSaleSupply</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSSaleSupply</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>
......@@ -7,6 +7,8 @@ business_process_module/slapos_reservation_refound_business_process/**
business_process_module/slapos_subscription_business_process
business_process_module/slapos_subscription_business_process/**
currency_module/CNY
business_process_module/slapos_ultimate_business_process
service_module/slapos_virtual_master_subscription
currency_module/EUR
sale_trade_condition_module/default_subscription_trade_condition
sale_trade_condition_module/slapos_aggregated_trade_condition_v3
......
organisation_module/slapos
business_process_module/slapos_ultimate_business_process
service_module/slapos_virtual_master_subscription
sale_packing_list_module/slapos_accounting_instance_delivery_template
sale_packing_list_module/slapos_accounting_instance_delivery_line_template
sale_packing_list_module/slapos_accounting_instance_delivery_line_template/**
......
organisation_module/slapos/bank_account
business_process_module/slapos_ultimate_business_process
service_module/slapos_virtual_master_subscription
service_module/slapos_instance_subscription
service_module/slapos_instance_cleanup
service_module/slapos_instance_setup
......
......@@ -10,8 +10,6 @@ account_module/purchase
account_module/receivable
account_module/refundable_vat
account_module/sales
accounting_module/template_contract_sale_invoice_transaction
accounting_module/template_contract_sale_invoice_transaction/**
business_process_module/slapos_aggregated_business_process
business_process_module/slapos_aggregated_business_process/**
business_process_module/slapos_consumption_business_process
......@@ -20,10 +18,10 @@ business_process_module/slapos_reservation_refound_business_process
business_process_module/slapos_reservation_refound_business_process/**
business_process_module/slapos_subscription_business_process
business_process_module/slapos_subscription_business_process/**
business_process_module/slapos_ultimate_business_process
business_process_module/slapos_ultimate_business_process/**
currency_module/CNY
currency_module/EUR
organisation_module/slapos
organisation_module/slapos/bank_account
portal_alarms/slapos_accounting_generate_packing_list_from_tioxml
portal_alarms/slapos_cancel_sale_invoice_transaction_paied_payment_list
portal_alarms/slapos_contract_request_validation_payment
......@@ -111,4 +109,5 @@ service_module/slapos_reservation_fee
service_module/slapos_reservation_fee/**
service_module/slapos_reservation_refund
service_module/slapos_tax
service_module/slapos_virtual_master_subscription
service_module/zero_emission_ratio
\ No newline at end of file
Accounting Transaction | SlapOSLedgerConstraint
Accounting Transaction | SlapOSVirtualMasterSourceProjectConstraint
Amortisation Transaction | SlapOSLedgerConstraint
Amortisation Transaction | SlapOSVirtualMasterSourceProjectConstraint
Balance Transaction | SlapOSLedgerConstraint
Balance Transaction | SlapOSVirtualMasterSourceProjectConstraint
Cloud Contract Line | SlapOSCloudContractLineAccounting
Cloud Contract | SlapOSCloudContractAccounting
Computer Consumption TioXML File | SortIndex
Hosting Subscription | SlapOSAccountingHostingSubscriptionConstraint
Hosting Subscription | SlapOSLedgerConstraint
Hosting Subscription | SlapOSVirtualMasterConstraint
Internal Invoice Transaction | SlapOSLedgerConstraint
Internal Invoice Transaction | SlapOSVirtualMasterSourceProjectConstraint
Open Sale Order Line | SlapOSAccountingOpenSaleOrderLineConstraint
Open Sale Order | SlapOSAccountingOpenSaleOrderConstraint
Open Sale Order | SlapOSLedgerConstraint
Open Sale Order | SlapOSVirtualMasterSourceProjectConstraint
Payment Transaction | SlapOSLedgerConstraint
Payment Transaction | SlapOSVirtualMasterSourceProjectConstraint
Purchase Invoice Transaction | SlapOSLedgerConstraint
Purchase Invoice Transaction | SlapOSVirtualMasterSourceProjectConstraint
Sale Invoice Transaction | SlapOSAccountingSaleInvoiceTransactionConstraint
Sale Invoice Transaction | SlapOSLedgerConstraint
Sale Invoice Transaction | SlapOSVirtualMasterSourceProjectConstraint
Sale Packing List Line | SlapOSAccountingSalePackingListLineConstraint
Sale Packing List | SlapOSAccountingSalePackingListConstraint
Sale Packing List | SlapOSLedgerConstraint
Sale Packing List | SlapOSVirtualMasterSourceProjectConstraint
Sale Supply | SlapOSVirtualMasterSourceProjectConstraint
Sale Trade Condition | SlapOSAccountingSaleTradeConditionConstraint
Slave Instance | InstanceAccountingSynchronisation
Software Instance | InstanceAccountingSynchronisation
User Consumption HTML File | SortIndex
\ No newline at end of file
InstanceAccountingSynchronisation
SlapOSLedgerConstraint
SlapOSAccountingOpenSaleOrderLineConstraint
SlapOSAccountingOpenSaleOrderConstraint
SlapOSAccountingHostingSubscriptionConstraint
SlapOSAccountingSaleTradeConditionConstraint
SlapOSAccountingSaleInvoiceTransactionConstraint
SlapOSAccountingSalePackingListConstraint
SlapOSAccountingSalePackingListLineConstraint
......
test.erp5.testSlapOSConsumptionSkins
test.erp5.testSlapOSSaleSupply
test.erp5.testSlapOSAccountingConstraint
test.erp5.testSlapOSAccountingRule
test.erp5.testSlapOSAccountingBuilder
......
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