Commit c743c2c8 authored by Romain Courteaud's avatar Romain Courteaud

Merge remote-tracking branch 'origin/master' into hostingwebsite

parents 6c15d3ad 7c12795f
Changes
=======
0.21 (unreleased)
0.22 (unreleased)
-----------------
* No changes yet.
0.21 (2011-12-23)
-----------------
* slap: Add renaming API. [Antoine Catton]
0.20 (2011-11-24)
-----------------
......
22
\ No newline at end of file
24
\ No newline at end of file
......@@ -320,26 +320,15 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.ERP5Type.DateUtils import getClosestDate\n
from DateTime import DateTime\n
\n
# support build_before\n
build_before = kw.pop(\'build_before\', None)\n
if build_before is None:\n
build_before = getClosestDate(target_date=DateTime(), precision=\'month\', before=0)\n
\n
kw[\'movement.start_date\'] = \'< %s\' % build_before\n
\n
<value> <string>select_dict= {\'delivery_uid\': None}\n
kw[\'select_dict\']=select_dict\n
kw[\'left_join_list\']=select_dict.keys()\n
kw[\'delivery_uid\']=None\n
if src__==0:\n
movement_list = context.portal_catalog(**kw)\n
return movement_list\n
return context.portal_catalog(**kw)\n
else:\n
return context.portal_catalog(src__=1, **kw)\n
]]></string> </value>
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
......@@ -51,9 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>portal_type = context.getDeliveryPortalType()\n
# make sure that the result of the simulation state is update to date, so check getSimulationState manually\n
return [x.getObject() for x in context.portal_catalog(portal_type=portal_type,simulation_state=\'planned\') \n
if x.getObject().getSimulationState()==\'planned\']\n
simulation_state = \'planned\'\n
# use catalog to prefetch, but check later in ZODB\n
return [x.getObject() for x in context.getPortalObject().portal_catalog(\n
portal_type=portal_type,\n
simulation_state=simulation_state) if x.getSimulationState() == simulation_state]\n
</string> </value>
</item>
<item>
......
......@@ -50,21 +50,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""This script is called on the Invoice after the delivery builder has created\n
<value> <string>"""This script is called on the Invoice after the delivery builder has created\n
the new Invoice.\n
"""\n
from Products.ERP5Type.Message import translateString\n
try:\n
from Products.CMFCore.WorkflowCore import WorkflowException\n
except ImportError:\n
# WorkflowException has not always been allowed in restricted\n
# environment, in this case, make sure WorkflowException is \n
# defined \n
class WorkflowException(Exception):\n
pass\n
\n
from DateTime import DateTime\n
if related_simulation_movement_path_list is None:\n
raise RuntimeError, \'related_simulation_movement_path_list is missing. Update ERP5 Product.\'\n
\n
......@@ -75,60 +65,20 @@ if not invoice.Invoice_isAdvanced():\n
if not invoice.getResource():\n
invoice.setResource(invoice.getPriceCurrency())\n
\n
related_packing_list = invoice.getDefaultCausalityValue()\n
related_order = related_packing_list.getDefaultCausalityValue()\n
\n
# copy payment conditions from packing list\n
# if missing, try to copy from order (for compatibility)\n
if not invoice.contentValues(portal_type=\'Payment Condition\'):\n
payment_condition_copy_id_list = []\n
if related_packing_list is not None:\n
payment_condition_copy_id_list = related_packing_list.contentIds(filter={\'portal_type\':\'Payment Condition\'})\n
if len(payment_condition_copy_id_list) > 0:\n
clipboard = related_packing_list.manage_copyObjects(ids=payment_condition_copy_id_list)\n
invoice.manage_pasteObjects(clipboard)\n
elif related_order is not None:\n
payment_condition_copy_id_list = related_order.contentIds(\n
filter={\'portal_type\':\'Payment Condition\'})\n
if len(payment_condition_copy_id_list) > 0:\n
clipboard = related_order.manage_copyObjects(ids=payment_condition_copy_id_list)\n
invoice.manage_pasteObjects(clipboard)\n
\n
if related_order is not None and context.portal_skins.hasObject(\'erp5_simulation_legacy\'):\n
# copy trade condition:\n
if not context.getSpecialise():\n
context.edit(specialise=related_order.getSpecialise())\n
\n
# copy order\'s trade model lines\n
invoice_trade_model_line_reference_list = [document.getReference() \\\n
for document in context.contentValues(portal_type=\'Trade Model Line\')]\n
order_trade_model_line_copy_id_list = []\n
for order_trade_model_line in related_order.contentValues(\n
portal_type=\'Trade Model Line\'):\n
if order_trade_model_line.getReference() not in \\\n
invoice_trade_model_line_reference_list:\n
order_trade_model_line_copy_id_list.append(order_trade_model_line.getId())\n
\n
if order_trade_model_line_copy_id_list:\n
clipboard = related_order.manage_copyObjects(\n
ids=order_trade_model_line_copy_id_list)\n
context.manage_pasteObjects(clipboard)\n
\n
# copy title, if not updating a new delivery\n
if not invoice.hasTitle() and related_packing_list.hasTitle():\n
invoice.setTitle(related_packing_list.getTitle())\n
if invoice.getStartDate() is None:\n
invoice.setStartDate(DateTime())\n
\n
# initialize accounting_workflow to confirmed state\n
confirm_tag = \'%s_confirm\' % invoice.getPath()\n
# initialize accounting_workflow to planned state\n
plan_tag = \'%s_plan\' % invoice.getPath()\n
if invoice.getSimulationState() == \'draft\':\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
tag=confirm_tag).Delivery_confirm()\n
tag=plan_tag).plan(comment=translateString(\'Initialised by Delivery Builder.\'))\n
else:\n
# call builder just same as after script of \'confirm\' transition\n
# call builder just same as after script of \'plan\' transition\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
tag=confirm_tag).Delivery_expandAndBuild()\n
tag=plan_tag).Delivery_expandAndBuild()\n
\n
# First set the invoice in the building state on the causality workflow\n
invoice.startBuilding()\n
......@@ -136,10 +86,22 @@ invoice.startBuilding()\n
# Then an activity should put the causality state in diverged or solved\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
after_tag=confirm_tag).updateCausalityState()\n
]]></string> </value>
after_tag=plan_tag).updateCausalityState()\n
\n
# update casuality from movements\n
causality_list = invoice.getCausalityList()\n
causality_list.sort()\n
modified = 0\n
for movement in invoice.getMovementList(portal_type=\'Invoice Line\'):\n
movement_causality = movement.getCausality()\n
if movement_causality not in causality_list:\n
modified = 1\n
causality_list.append(movement_causality)\n
\n
if modified:\n
causality_list.sort()\n
invoice.setCausalityList(causality_list)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
......@@ -51,6 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Message import translateString\n
from DateTime import DateTime\n
\n
payment_transaction = context\n
\n
......@@ -58,12 +59,29 @@ payment_transaction = context\n
if payment_transaction.getSimulationState() == "draft":\n
payment_transaction.plan(comment=translateString("Initialised by Delivery Builder."))\n
\n
if payment_transaction.getStartDate() is None:\n
payment_transaction.setStartDate(DateTime())\n
\n
# First set the payment transaction in the building state on the causality workflow\n
payment_transaction.startBuilding()\n
\n
# Then an activity should put the causality state in diverged or solved\n
payment_transaction.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))).updateCausalityState()\n
\n
# update casuality from movements\n
causality_list = payment_transaction.getCausalityList()\n
causality_list.sort()\n
modified = 0\n
for movement in payment_transaction.getMovementList():\n
movement_causality = movement.getCausality()\n
if movement_causality not in causality_list:\n
modified = 1\n
causality_list.append(movement_causality)\n
\n
if modified:\n
causality_list.sort()\n
payment_transaction.setCausalityList(causality_list)\n
</string> </value>
</item>
<item>
......
......@@ -50,20 +50,27 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>software_instance = state_change[\'object\']\n
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n
\n
software_instance = state_change[\'object\']\n
# mark destroy is requested\n
portal = context.getPortalObject()\n
if software_instance.getPortalType() == "Software Instance":\n
software_instance.SoftwareInstance_destroySlaveInstanceRelated()\n
\n
software_instance.destroyRequested()\n
# deliver proper packing list\n
packing_list_line = context.SoftwareInstance_getInstanceDestroyPackingListLine(state_change)\n
\n
packing_list = packing_list_line.getParentValue()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'start\'):\n
if portal.portal_workflow.isTransitionPossible(packing_list, \'start\'):\n
packing_list.start()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'deliver\'):\n
if portal.portal_workflow.isTransitionPossible(packing_list, \'deliver\'):\n
packing_list.deliver()\n
\n
# revoke certificate\n
try:\n
context.getPortalObject().portal_certificate_authority\\\n
portal.portal_certificate_authority\\\n
.revokeCertificate(software_instance.getDestinationReference())\n
except ValueError:\n
# Ignore already revoked certificates, as OpenSSL backend is\n
......
<?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>_body</string> </key>
<value> <string>from DateTime import DateTime\n
\n
portal = context.getPortalObject()\n
software_instance = state_change[\'object\']\n
software_release_url_string = state_change.kwargs[\'software_release\']\n
hosting_subscription_uid = state_change.kwargs[\'hosting_subscription_uid\']\n
\n
# Assertion: No packing list line should be related to this software instance\n
packing_list_line = software_instance.getAggregateRelatedValue(portal_type=\'Sale Packing List Line\')\n
if packing_list_line is not None:\n
raise ValueError("Software Instance %s is already associated to a packing list line" % software_instance.getRelativeurl())\n
\n
# Find a free computer partition. This means:\n
# Computer Partition which doesn\'t have non delivered sale packing list related\n
\n
software_release_document = context.portal_catalog.getResultValue(\n
portal_type=\'Software Release\',\n
url_string=software_release_url_string)\n
\n
# protect computer partition from being selected again\n
portal = context.getPortalObject()\n
\n
hosting_subscription = software_instance.portal_catalog.getResultValue(uid=hosting_subscription_uid)\n
\n
open_order = portal.portal_catalog.getResultValue(\n
portal_type="Open Sale Order",\n
validation_state="validated")\n
computer_partition_relative_url = open_order.OpenSaleOrder_restrictMethodAsShadowUser(\n
open_order=open_order,\n
callable_object=open_order.OpenSaleOrder_findPartition,\n
argument_list=[software_release_url_string, software_instance.getSourceReference(),\n
software_instance.getPortalType(), software_instance.getSlaXmlAsDict()])\n
\n
sale_packing_list_line = context.HostingSubscription_getInstancePackingListLine(state_change)\n
base_sale_packing_list = sale_packing_list_line.getParentValue()\n
# XXX: SoftwareInstance_createSalePackingList shall be used to create new Sale Packing List\n
sale_packing_list_module = portal.getDefaultModule(portal_type=\'Sale Packing List\')\n
\n
sale_packing_list = sale_packing_list_module.newContent(\n
portal_type=\'Sale Packing List\', \n
start_date=DateTime(),\n
specialise=base_sale_packing_list.getSpecialise() or base_sale_packing_list.getCausalityValue().getSpecialise(),\n
destination=base_sale_packing_list.getDestination(),\n
destination_section=base_sale_packing_list.getDestinationSection(),\n
destination_decision=base_sale_packing_list.getDestinationDecision(),\n
source=base_sale_packing_list.getSource(),\n
source_section=base_sale_packing_list.getSourceSection(),\n
price_currency=base_sale_packing_list.getPriceCurrency())\n
sale_packing_list_line = sale_packing_list.newContent(\n
portal_type=\'Sale Packing List Line\',\n
resource=context.portal_preferences.getPreferredInstanceSetupResource(),\n
aggregate_list=[software_instance.getRelativeUrl(), software_release_document.getRelativeUrl(), \n
computer_partition_relative_url, hosting_subscription.getRelativeUrl()]\n
)\n
\n
# confirm Sale Packing List\n
sale_packing_list.confirm()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_requestComputerPartition</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -63,6 +63,9 @@ service_relative_url = software_instance.portal_preferences.\\\n
getPreferredInstanceCleanupResource()\n
sale_packing_list = context.SoftwareInstance_createSalePackingList(state_change, service_relative_url, tag=tag)\n
sale_packing_list.confirm(activate_kw={\'tag\':tag})\n
\n
if software_instance.getPortalType() == "Software Instance":\n
software_instance.SoftwareInstance_requestDestroySlaveInstanceRelated()\n
]]></string> </value>
......
......@@ -121,13 +121,41 @@ if (request_software_instance is None):\n
**portal.Base_getNewSoftwareInstanceCoordinate()\n
)\n
request_software_instance.portal_workflow.doActionFor(request_software_instance, \'validate_action\')\n
sale_packing_list_line = context.SoftwareInstance_getInstanceSetupPackingListLine(state_change)\n
hosting_subscription_uid = sale_packing_list_line.getAggregateValue(portal_type=\'Hosting Subscription\').getUid()\n
request_software_instance.requestComputerPartition(\n
software_release=software_release_url_string,\n
hosting_subscription_uid=hosting_subscription_uid,\n
software_type=software_type,\n
tag=tag)\n
if state == "started":\n
request_software_instance.startRequested()\n
if state == "stopped":\n
request_software_instance.stopRequested()\n
setup_service_relative_url = portal.portal_preferences.getPreferredInstanceSetupResource()\n
packing_list_line = software_instance.getAggregateRelatedValue(portal_type="Sale Packing List Line")\n
subscription = packing_list_line.getAggregateValue(portal_type="Hosting Subscription")\n
software_release_document = context.portal_catalog.getResultValue(\n
portal_type=\'Software Release\',\n
url_string=software_release_url_string)\n
base_sale_packing_list = packing_list_line.getParentValue()\n
trade_condition = packing_list_line.getSpecialise(portal_type="Sale Trade Condition")\n
sale_order = portal.getDefaultModule(portal_type="Sale Order").newContent(\n
portal_type="Sale Order",\n
destination=base_sale_packing_list.getDestination(),\n
destination_section=base_sale_packing_list.getDestinationSection(),\n
destination_decision=base_sale_packing_list.getDestinationDecision(),\n
start_date=DateTime(),\n
received_date=DateTime(),\n
# XXX Hardcoded values\n
source="organisation_module/vifib_internet",\n
source_section="organisation_module/vifib_internet",\n
price_currency="currency_module/EUR",\n
activate_kw={\'tag\': tag},\n
)\n
\n
sale_order.setSpecialise(trade_condition, portal_type="Sale Trade Condition")\n
sale_order_line = sale_order.newContent(\n
portal_type="Sale Order Line",\n
resource=setup_service_relative_url,\n
quantity=1,\n
aggregate_value_list=[request_software_instance,subscription,software_release_document],\n
activate_kw={\'tag\': tag},\n
)\n
sale_order.order()\n
else:\n
# Update existing software instance\n
# Sale Packing List interaction has to be requested automatically with an interaction workflow\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>SoftwareInstance_requestComputerPartition</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>request_computer_partition</string> </value>
</item>
<item>
<key> <string>new_state_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string>SoftwareInstance_checkConsistency</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Request Computer Partition</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
325
\ No newline at end of file
350
\ No newline at end of file
vifib_base
vifib_simulation
\ No newline at end of file
......@@ -57,6 +57,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/usage</string>
</tuple>
</value>
</item>
......@@ -88,7 +89,192 @@
<key> <string>title</string> </key>
<value> <string>CPU Consumption</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<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>915.27360.39415.51234</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>1325175965.82</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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> <string>validate_action</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 id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176059.39</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>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> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176059.4</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>
......@@ -57,6 +57,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/usage</string>
</tuple>
</value>
</item>
......@@ -88,7 +89,192 @@
<key> <string>title</string> </key>
<value> <string>Memory Consumption</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<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>915.27360.39415.51234</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>1325175959.47</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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> <string>validate_action</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 id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176053.07</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>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> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176053.07</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>
......@@ -57,9 +57,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -68,6 +68,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/configuration</string>
</tuple>
</value>
</item>
......@@ -79,9 +80,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value>
<none/>
</value>
<value> <string>instance_hosting</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -102,9 +101,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -112,7 +111,237 @@
<key> <string>title</string> </key>
<value> <string>Instance Hosting</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<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>915.27360.39415.51234</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 id="3.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175531.25</float>
<string>GMT+1</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>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>915.27378.55986.59357</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>
<none/>
</tuple>
<state>
<tuple>
<float>1325175923.91</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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> <string>validate_action</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 id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176039.93</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>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> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176039.94</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>
......@@ -57,9 +57,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -68,6 +68,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/configuration</string>
</tuple>
</value>
</item>
......@@ -102,7 +103,7 @@
<string>Computer Partition</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
<string>Hosting Subscription</string>
</tuple>
</value>
</item>
......@@ -110,7 +111,192 @@
<key> <string>title</string> </key>
<value> <string>Instance Setup</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<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>915.27360.39415.51234</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>1325175915.59</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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> <string>validate_action</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 id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176033.17</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>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> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176033.18</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>
......@@ -14,9 +14,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -27,9 +25,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -40,9 +36,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -54,9 +48,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -65,9 +57,9 @@
<value>
<tuple>
<string>Computer Partition</string>
<string>Hosting Subscription</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
</tuple>
</value>
</item>
......@@ -76,6 +68,7 @@
<value>
<tuple>
<string>quantity_unit/unit/piece</string>
<string>product_line/cloud/subscription</string>
</tuple>
</value>
</item>
......@@ -110,7 +103,7 @@
<string>Computer Partition</string>
<string>Software Instance</string>
<string>Software Release</string>
<string>Subscription Item</string>
<string>Hosting Subscription</string>
</tuple>
</value>
</item>
......@@ -118,7 +111,192 @@
<key> <string>title</string> </key>
<value> <string>Instance Subscription</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<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>915.27360.39415.51234</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>1325175892.78</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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> <string>validate_action</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 id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176025.57</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>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> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176025.58</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>
......@@ -106,7 +106,192 @@
<key> <string>title</string> </key>
<value> <string>Software Setup</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>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<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>915.27360.39415.51234</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>1325175865.26</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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> <string>validate_action</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 id="4.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176012.04</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>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> <reference id="4.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325176012.05</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>
......@@ -14,9 +14,7 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -27,9 +25,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -40,9 +36,7 @@
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
......@@ -54,26 +48,22 @@
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Author</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>aggregated_portal_type</string> </key>
<value>
<tuple>
<string>Usage Report</string>
</tuple>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>product_line/service/80000000</string>
<string>quantity_unit/volume/cubic_meter</string>
<string>product_line/cloud/usage</string>
</tuple>
</value>
</item>
......@@ -111,6 +101,12 @@
<key> <string>title</string> </key>
<value> <string>Usage Report</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
......@@ -132,4 +128,183 @@
</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>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</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> <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>915.27360.39415.51234</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>1325175734.94</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate_action</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 id="5.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175998.94</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>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> <reference id="5.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1325175998.94</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>
......@@ -127,9 +127,7 @@
</item>
<item>
<key> <string>preferred_payzen_integration_site</string> </key>
<value>
<none/>
</value>
<value> <string>portal_integrations/vifib_payzen_integration</string> </value>
</item>
<item>
<key> <string>preferred_software_setup_resource</string> </key>
......
87
\ No newline at end of file
91
\ No newline at end of file
service_module/cpu_consumption
service_module/memory_consumption
service_module/vifib_instance_cleanup
service_module/vifib_instance_hosting
service_module/vifib_instance_setup
service_module/vifib_instance_subscription
service_module/vifib_instance_update
service_module/vifib_software_setup
service_module/vifib_usage_report
\ No newline at end of file
......@@ -114,9 +114,7 @@
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
<string>delivered</string>
<string>started</string>
<string>stopped</string>
</tuple>
</value>
......
......@@ -50,7 +50,6 @@
<value>
<tuple>
<string>trade_phase/vifib/accounting</string>
<string>trade_date/trade_phase/vifib/invoicing</string>
<string>source/account_module/sales</string>
<string>destination/account_module/purchase</string>
</tuple>
......
......@@ -50,7 +50,6 @@
<value>
<tuple>
<string>trade_phase/vifib/accounting</string>
<string>trade_date/trade_phase/vifib/invoicing</string>
<string>source/account_module/receivable</string>
<string>destination/account_module/payable</string>
</tuple>
......
......@@ -114,9 +114,7 @@
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
<string>delivered</string>
<string>started</string>
<string>stopped</string>
</tuple>
</value>
......
......@@ -70,7 +70,6 @@
<value>
<tuple>
<string>trade_phase/vifib/delivery</string>
<string>trade_date/trade_phase/vifib/order</string>
<string>end_of/day</string>
</tuple>
</value>
......
......@@ -49,7 +49,6 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_date/trade_phase/vifib/delivery</string>
<string>trade_phase/vifib/invoicing</string>
</tuple>
</value>
......
......@@ -50,7 +50,6 @@
<value>
<tuple>
<string>trade_phase/vifib/order</string>
<string>trade_date/trade_phase/vifib/order</string>
</tuple>
</value>
</item>
......
......@@ -115,9 +115,7 @@
<item>
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -149,6 +147,14 @@
<none/>
</value>
</item>
<item>
<key> <string>frozen_state</string> </key>
<value>
<tuple>
<string>delivered</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>pay</string> </value>
......
......@@ -52,7 +52,6 @@
<string>trade_phase/vifib/payment</string>
<string>source/account_module/receivable</string>
<string>destination/account_module/payable</string>
<string>trade_date/trade_phase/vifib/invoicing</string>
</tuple>
</value>
</item>
......
......@@ -52,7 +52,6 @@
<string>trade_phase/vifib/payment</string>
<string>source/account_module/bank</string>
<string>destination/account_module/bank</string>
<string>trade_date/trade_phase/vifib/invoicing</string>
<string>source_payment/organisation_module/vifib_internet/bank_account</string>
</tuple>
</value>
......
......@@ -109,7 +109,7 @@
</item>
<item>
<key> <string>simulation_select_method_id</string> </key>
<value> <string>PaymentTransaction_selectMovement</string> </value>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -37,13 +37,10 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>source_payment</string>
<string>destination_payment</string>
<string>source_section</string>
<string>destination_section</string>
<string>payment_mode</string>
<string>resource</string>
<string>specialise</string>
</tuple>
</value>
</item>
......
......@@ -27,7 +27,7 @@
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -41,6 +41,9 @@
<string>destination</string>
<string>source_project</string>
<string>destination_project</string>
<string>source_payment</string>
<string>destination_payment*</string>
<string>specialise</string>
</tuple>
</value>
</item>
......@@ -48,6 +51,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -10,7 +10,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/delivery</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
......@@ -22,7 +22,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>delivery_causality_assignement_movement_group_on_delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -34,7 +34,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Delivery Causality Assignement Movement Group On Delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Movement Group" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Movement Group</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>start_date</string>
<string>stop_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,7 +11,7 @@
<value>
<tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
......@@ -23,7 +23,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
<value> <string>property_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -44,7 +44,11 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
<value> <string>property_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
......
......@@ -112,7 +112,7 @@
</item>
<item>
<key> <string>simulation_select_method_id</string> </key>
<value> <string>PurchaseOrder_selectMovement</string> </value>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -126,7 +126,7 @@
</item>
<item>
<key> <string>delivery_select_method_id</string> </key>
<value> <string>VifibInvoiceBuilder_selectPlannedSaleInvoiceList</string> </value>
<value> <string>VifibDeliveryBuilder_selectPlannedDeliveryList</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -148,7 +148,7 @@
</item>
<item>
<key> <string>simulation_select_method_id</string> </key>
<value> <string>SaleInvoiceTransaction_selectPackingListMovement</string> </value>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -27,7 +27,7 @@
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -37,21 +37,10 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>specialise</string>
<string>delivery_mode</string>
<string>incoterm</string>
<string>source</string>
<string>destination</string>
<string>source_section</string>
<string>destination_section</string>
<string>source_decision</string>
<string>destination_decision</string>
<string>source_administration</string>
<string>destination_administration</string>
<string>source_project</string>
<string>destination_project</string>
<string>source_payment</string>
<string>destination_payment</string>
<string>price_currency</string>
</tuple>
</value>
......@@ -60,6 +49,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -37,6 +37,7 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>specialise</string>
<string>resource</string>
<string>aggregate</string>
<string>quantity_unit</string>
......@@ -46,6 +47,16 @@
<string>destination_function</string>
<string>source_account</string>
<string>destination_account</string>
<string>source_decision</string>
<string>destination_decision</string>
<string>source_administration</string>
<string>destination_administration</string>
<string>source_project</string>
<string>destination_project</string>
<string>source_payment</string>
<string>destination_payment</string>
<string>delivery_mode</string>
<string>incoterm</string>
</tuple>
</value>
</item>
......@@ -53,6 +64,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -10,7 +10,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/delivery</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
......@@ -22,7 +22,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>delivery_causality_assignement_movement_group_on_delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -34,7 +34,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Delivery Causality Assignement Movement Group On Delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Movement Group" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Movement Group</string> </value>
</item>
<item>
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>start_date</string>
<string>stop_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -38,6 +38,8 @@
<value>
<tuple>
<string>description</string>
<string>start_date</string>
<string>stop_date</string>
</tuple>
</value>
</item>
......@@ -47,6 +49,10 @@
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -143,7 +143,7 @@
</item>
<item>
<key> <string>simulation_select_method_id</string> </key>
<value> <string>SaleInvoiceTransaction_selectInvoiceMovement</string> </value>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -37,6 +37,7 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>specialise</string>
<string>resource</string>
<string>source</string>
<string>destination</string>
......@@ -52,6 +53,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
60
\ No newline at end of file
82
\ No newline at end of file
account_module/bank
account_module/capital
account_module/coll_vat
account_module/equipments
account_module/inventories
account_module/payable
account_module/profit_loss
account_module/purchase
account_module/receivable
account_module/refundable_vat
account_module/sales
portal_rules/new_invoice_simulation_rule
portal_rules/new_invoice_simulation_rule/**
portal_rules/new_delivery_simulation_rule
portal_rules/new_delivery_simulation_rule/**
portal_rules/new_delivery_root_simulation_rule
portal_rules/new_delivery_root_simulation_rule/**
portal_rules/new_invoice_transaction_simulation_rule
portal_rules/new_invoice_transaction_simulation_rule/**
portal_rules/new_invoice_root_simulation_rule
portal_rules/new_invoice_root_simulation_rule/**
portal_rules/new_order_root_simulation_rule
portal_rules/new_order_root_simulation_rule/**
portal_rules/default_subscription_item_rule
portal_rules/default_subscription_item_rule/**
portal_rules/new_payment_simulation_rule
portal_rules/new_payment_simulation_rule/**
\ No newline at end of file
##############################################################################
###############################################################################
#
# Copyright (c) 2002-2011 Nexedi SA and Contributors. All Rights Reserved.
#
......@@ -75,6 +75,74 @@ def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None,
# Restore the original user.
setSecurityManager(sm)
def SoftwareInstance_requestDestroySlaveInstanceRelated(self):
""" request destroy all Slave Instance allocated in the Computer Partition
related to the Software Instance """
sm = getSecurityManager()
portal = self.getPortalObject()
service_relative_url = portal.portal_preferences.getPreferredInstanceCleanupResource()
newSecurityManager(None, portal.acl_users.getUserById(
self.getReference()))
computer_partition_relative_url = self.getAggregateRelatedValue(
"Sale Packing List Line").getAggregate(portal_type="Computer Partition")
portal_preferences = portal.portal_preferences
service_uid_list = [
portal.restrictedTraverse(portal_preferences.getPreferredInstanceHostingResource()).getUid(),
portal.restrictedTraverse(portal_preferences.getPreferredInstanceSetupResource()).getUid(),
]
try:
result_list = self.portal_catalog(portal_type="Sale Packing List Line",
aggregate_portal_type="Slave Instance",
computer_partition_relative_url=computer_partition_relative_url,
default_resource_uid=service_uid_list)
slave_instance_list = [line.getAggregateValue(portal_type="Slave Instance") for line in result_list]
uid_list = []
for slave_instance in slave_instance_list:
slave_instance_uid = slave_instance.getUid()
if slave_instance_uid in uid_list:
continue
cleanup_packing_list = self.portal_catalog(
portal_type='Sale Packing List Line',
aggregate_relative_url=slave_instance.getRelativeUrl(),
resource_relative_url=service_relative_url,
limit=1,
)
if len(cleanup_packing_list) == 0:
uid_list.append(slave_instance_uid)
slave_instance.requestDestroyComputerPartition()
finally:
# Restore the original user.
setSecurityManager(sm)
def SoftwareInstance_destroySlaveInstanceRelated(self):
""" destroy all Slave Instance allocated in the Computer Partition
related to the Software Instance """
sm = getSecurityManager()
newSecurityManager(None, self.getPortalObject().acl_users.getUserById(
self.getReference()))
portal = self.getPortalObject()
portal_preferences = portal.portal_preferences
computer_partition_relative_url = self.getAggregateRelatedValue(
"Sale Packing List Line").getAggregate(portal_type="Computer Partition")
simulation_state = ["confirmed"]
service_uid_list = [
portal.restrictedTraverse(portal_preferences.getPreferredInstanceCleanupResource()).getUid(),
]
try:
result_list = self.portal_catalog(portal_type="Sale Packing List Line",
aggregate_portal_type="Slave Instance",
computer_partition_relative_url=computer_partition_relative_url,
simulation_state=simulation_state,
default_resource_uid=service_uid_list)
slave_instance_list = [line.getAggregateValue(portal_type="Slave Instance") for line in result_list]
# restore the original user to destroy each Slave Instance
setSecurityManager(sm)
for slave_instance in slave_instance_list:
slave_instance.destroyComputerPartition()
finally:
# Restore the original user.
setSecurityManager(sm)
def getComputerSecurityCategory(self, base_category_list, user_name,
object, portal_type):
"""
......
<local_roles_item>
<local_roles>
<role id='R-MEMBER'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='superluke'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -9,6 +9,7 @@
</role>
<role id='R-INSTANCE'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
......
......@@ -4,6 +4,9 @@
<item>Auditor</item>
<item>Author</item>
</role>
<role id='R-INSTANCE'>
<item>Auditor</item>
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
<item>Author</item>
......
......@@ -9,7 +9,7 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<role id='Auditor; Author'>
<property id='title'>Instance</property>
<multi_property id='category'>role/instance</multi_property>
<multi_property id='base_category'>role</multi_property>
......
......@@ -4,6 +4,11 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Instance</property>
<multi_property id='category'>role/instance</multi_property>
<multi_property id='base_category'>role</multi_property>
</role>
<role id='Auditor; Author'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
......
......@@ -15,9 +15,14 @@
<property id='base_category_script'>ERP5Type_acquireSecurityFromOwner</property>
<multi_property id='base_category'>source</multi_property>
</role>
<role id='Assignee'>
<property id='title'>Slave Instance related by Software Instance</property>
<role id='Assignor'>
<property id='title'>Slave Instance related by Hosting Subscription</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromAggregateMovementItemByHostingSubscription</property>
<multi_property id='base_category'>aggregate</multi_property>
</role>
<role id='Assignor'>
<property id='title'>Software Instance which provides this Slave Instance</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromSoftwareInstance</property>
<multi_property id='base_category'>source</multi_property>
<multi_property id='base_category'>aggregate</multi_property>
</role>
</type_roles>
\ No newline at end of file
......@@ -72,8 +72,11 @@ state_list = portal.getPortalCurrentInventoryStateList() + \\\n
portal.getPortalReservedInventoryStateList() + \\\n
portal.getPortalTransitInventoryStateList()\n
\n
resource_list = [portal.portal_preferences.getPreferredInstanceSetupResource(),\n
portal.portal_preferences.getPreferredInstanceHostingResource()]\n
\n
sale_packing_list_line = portal.portal_catalog.getResultValue(\n
resource_relative_url=portal.portal_preferences.getPreferredInstanceHostingResource(),\n
resource_relative_url=resource_list,\n
aggregate_uid=obj.getUid(),\n
portal_type="Sale Packing List Line",\n
simulation_state=state_list)\n
......@@ -91,14 +94,27 @@ query = ComplexQuery(\n
Query(aggregate_relative_url=software_release.getRelativeUrl()),\n
operator="AND",\n
)\n
\n
catalog_result = portal.portal_catalog(portal_type="Sale Packing List Line",\n
aggregate_portal_type="Slave Instance",\n
aggregate_relative_url=obj.getRelativeUrl(),\n
simulation_state=state_list,\n
aggregate_relative_url=query,\n
limit=1,\n
query=query,\n
)\n
for sale_packing_list_line in catalog_result:\n
software_instance = sale_packing_list_line.getAggregateValue(\n
\n
if len(catalog_result) == 0:\n
return catalog_result\n
\n
packing_list_line = portal.portal_catalog.getResultValue(\n
portal_type="Sale Packing List Line",\n
aggregate_portal_type="Software Instance",\n
simulation_state=state_list,\n
query=query,)\n
\n
if packing_list_line is not None:\n
software_instance = packing_list_line.getAggregateValue(\n
portal_type="Software Instance")\n
if software_instance is not None:\n
return {"Auditor": [software_instance.getReference(),]}\n
\n
return category_list\n
......
......@@ -89,7 +89,7 @@ catalog_result = portal.portal_catalog(portal_type=movement_portal_type,\n
for item in catalog_result:\n
software_instance = item.getAggregateValue(portal_type="Software Instance")\n
if software_instance is not None:\n
return {"Assignee": [software_instance.getReference(),]}\n
return [{"aggregate": [software_instance.getRelativeUrl()]}]\n
</string> </value>
</item>
<item>
......
......@@ -2,39 +2,25 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Causality Movement Group" module="erp5.portal_type"/>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/delivery</string>
</tuple>
</value>
<key> <string>_function</string> </key>
<value> <string>SoftwareInstance_destroySlaveInstanceRelated</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<key> <string>_module</string> </key>
<value> <string>VifibSecurity</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>causality_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Causality Movement Group</string> </value>
<value> <string>SoftwareInstance_destroySlaveInstanceRelated</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>causality_movement_group_on_delivery</string> </value>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>SoftwareInstance_requestDestroySlaveInstanceRelated</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>VifibSecurity</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_requestDestroySlaveInstanceRelated</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
vifib_data_simulation
vifib_data_payzen
\ No newline at end of file
310
\ No newline at end of file
327
\ No newline at end of file
......@@ -47,6 +47,7 @@ person_module/test_vifib_user_developer
portal_contributions
portal_gadgets
portal_integrations
portal_integrations/vifib_payzen_integration
product_module
purchase_order_module
purchase_packing_list_module
......
......@@ -12,8 +12,8 @@ account_module/refundable_vat
account_module/sales
accounting_module
business_process_module
business_process_module/vifib_sale_business_process
business_process_module/vifib_purchase_business_process
business_process_module/vifib_sale_business_process
campaign_module
component_module
computer_module
......@@ -47,6 +47,7 @@ person_module/test_vifib_user_developer
portal_contributions
portal_gadgets
portal_integrations
portal_integrations/vifib_payzen_integration
product_module
purchase_order_module
purchase_packing_list_module
......
......@@ -2,93 +2,94 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_registerPlannedPaymentTransactionPayzen</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
<key> <string>id</string> </key>
<value> <string>register_planned_payment_transaction_payzen</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<key> <string>periodicity_hour</string> </key>
<value>
<list>
<string>SoftwareInstance_requestStopSlaveInstanceListFromComputerPartition</string>
</list>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>guard</string> </key>
<key> <string>periodicity_month</string> </key>
<value>
<none/>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_destroy</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<key> <string>periodicity_month_day</string> </key>
<value>
<list>
<string>destroyComputerPartition</string>
</list>
<tuple/>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<key> <string>periodicity_start_date</string> </key>
<value>
<list>
<string>Software Instance</string>
</list>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1288051200.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
<key> <string>sense_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
<key> <string>title</string> </key>
<value> <string>Register planned Payment Transaction in payzen</string> </value>
</item>
</dictionary>
</pickle>
......
<?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>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
for payment_transaction in portal.portal_catalog(\n
portal_type="Payment Transaction", \n
simulation_state="planned",\n
limit=10\n
):\n
# do not trust catalog\n
if payment_transaction.getSimulationState() == \'planned\':\n
payment_transaction.PaymentTransaction_registerPayzen()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_registerPlannedPaymentTransactionPayzen</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
48
\ No newline at end of file
49
\ No newline at end of file
portal_alarms/payzen_update_confirmed_payment_transaction
portal_alarms/register_planned_payment_transaction_payzen
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jump</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jump</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jump_to_related_usage_report_list</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Related Usage Reports</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string encoding="cdata"><![CDATA[
string:${object_url}/Base_jumpToRelatedObject?base_category=causality&portal_type=Usage+Report
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,86 +2,88 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_stopPlannedSaleInvoiceTransaction</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
<key> <string>description</string> </key>
<value>
<tuple>
<string>action_type/object_jump</string>
</tuple>
<none/>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jump</string> </value>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
<key> <string>id</string> </key>
<value> <string>stop_planned_sale_invoice_transaction</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<key> <string>periodicity_hour</string> </key>
<value>
<none/>
<tuple/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jump_to_related_usage_report_list</string> </value>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<key> <string>periodicity_month</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>3660.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Related Usage Reports</string> </value>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string encoding="cdata"><![CDATA[
string:${object_url}/Base_jumpToRelatedObject?base_category=causality&portal_type=Usage+Report
]]></string> </value>
<key> <string>title</string> </key>
<value> <string>Stop planned Sale Invoices before current month</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -51,19 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
\n
build_before = None\n
if params is not None:\n
build_before = params.get(\'build_before\', None)\n
kw = {\'build_before\':build_before}\n
else:\n
kw = {}\n
\n
for business_process in [\n
portal.business_process_module.vifib_sale_business_process,\n
portal.business_process_module.vifib_purchase_business_process]:\n
for link in business_process.contentValues(portal_type="Business Link"):\n
link.build(**kw)\n
link.build()\n
</string> </value>
</item>
<item>
......
<?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>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate\n
\n
portal = context.getPortalObject()\n
this_month = getClosestDate(target_date=DateTime())\n
for sale_invoice_transaction in portal.portal_catalog(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'planned\',\n
limit=10,\n
**{"delivery.start_date": \'< %s\' % this_month}\n
):\n
if sale_invoice_transaction.getSimulationState() == \'planned\' and sale_invoice_transaction.getStartDate() < this_month:\n
# do not trust catalog\n
sale_invoice_transaction.confirm()\n
sale_invoice_transaction.start()\n
sale_invoice_transaction.stop()\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_stopPlannedSaleInvoiceTransaction</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -52,8 +52,11 @@
<key> <string>_body</string> </key>
<value> <string>computer = state_change[\'object\']\n
for computer_partition in [x for x in computer.contentValues(portal_type=\'Computer Partition\') if x.getSlapState() == \'busy\']:\n
# raises ValueError in case of no packing list found, left as is\n
try:\n
packing_list_line = computer_partition.Item_getInstancePackingListLine()\n
except ValueError:\n
# no need to bang trees without any delivery line\n
continue\n
software_instance = packing_list_line.getAggregateValue(portal_type=\'Software Instance\')\n
software_instance.activate().SoftwareInstance_bangAsSelf(reference=software_instance.getReference(),\n
comment=state_change.kwargs.get(\'comment\', \'\'))\n
......
......@@ -28,7 +28,7 @@
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>SoftwareInstance_requestStopSlaveInstanceListFromComputerPartition</string>
<string>SlaveInstance_requestUpdate</string>
</list>
</value>
</item>
......@@ -45,30 +45,32 @@
<item>
<key> <string>guard</string> </key>
<value>
<none/>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstance_requestDestroy</string> </value>
<value> <string>SlaveInstance_requestUpdateOnChange</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>requestDestroyComputerPartition</string>
<string>_setTitle</string>
<string>_setSourceReference</string>
<string>_setTextContent</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Software Instance</string>
<string>Slave Instance</string>
</list>
</value>
</item>
......@@ -80,7 +82,7 @@
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -93,4 +95,32 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>expr</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: len(here.checkConsistency()) == 0</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -75,7 +75,6 @@ query = ComplexQuery(computer_partition_query, \n
\n
return portal.portal_catalog(portal_type=\'Sale Packing List Line\',\n
default_resource_uid=service_uid_list,\n
sort_on=((\'movement.start_date\', \'DESC\'),),\n
query=query, **kw)\n
</string> </value>
</item>
......
......@@ -75,7 +75,7 @@ else:\n
\n
# Deliver all SPL related to this software instance\n
isTransitionPossible = context.portal_workflow.isTransitionPossible\n
software_instance = current_delivery_line.getAggregateValue(portal_type="Software Instance")\n
software_instance = current_delivery_line.getAggregateValue(portal_type=["Software Instance", "Slave Instance"])\n
for sale_packing_list_line in portal.portal_catalog(\n
portal_type="Sale Packing List Line", \n
default_aggregate_uid=software_instance.getUid(),\n
......
......@@ -51,22 +51,21 @@
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
accounting_module = portal.getDefaultModule(\'Sale Invoice Transaction\')\n
count_result_kw = dict(portal_type="Sale Packing List Line",\n
aggregate_uid=state_change["object"].getUid(),\n
limit=1)\n
\n
invoice = accounting_module.searchFolder(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'planned\')\n
\n
return invoice\n
if len(portal.portal_catalog(**count_result_kw)) == 1:\n
state_change[\'object\'].requestUpdateComputerPartition()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibInvoiceBuilder_selectPlannedSaleInvoiceList</string> </value>
<value> <string>SlaveInstance_requestUpdate</string> </value>
</item>
</dictionary>
</pickle>
......
484
\ No newline at end of file
489
\ No newline at end of file
Computer Partition | jump_to_related_usage_report_list
System Preference | vifib_preference
Virtio Partition | jump_to_related_usage_report_list
Virtio Partition | view
\ No newline at end of file
portal_alarms/confirm_ordered_sale_order
portal_alarms/confirm_ordered_sale_order/**
portal_alarms/stop_planned_sale_invoice_transaction
portal_alarms/stop_planned_sale_invoice_transaction/**
portal_alarms/vifib_trigger_build
portal_alarms/vifib_trigger_build/**
\ No newline at end of file
......@@ -536,28 +536,34 @@ class SlapTool(BaseTool):
setup_service = portal.restrictedTraverse(
portal_preferences.getPreferredInstanceSetupResource())
hosting_query = ComplexQuery(Query(aggregate_portal_type="Slave Instance"),
Query(aggregate_relative_url=computer_partition_document.getRelativeUrl()),
# Search only for Confirmed and Stopped, the only one states that require
# buildout be re-updated.
Query(simulation_state=["confirmed", "stopped"]),
update_service = portal.restrictedTraverse(
portal_preferences.getPreferredInstanceUpdateResource())
global_query_kw = dict(aggregate_portal_type="Slave Instance",
aggregate_relative_url=computer_partition_document.getRelativeUrl(),)
hosting_query = ComplexQuery(Query(simulation_state=["confirmed", "stopped"]),
Query(default_resource_uid=hosting_service.getUid()),
operator="AND")
setup_query = ComplexQuery(Query(aggregate_portal_type="Slave Instance"),
Query(aggregate_relative_url=computer_partition_document.getRelativeUrl()),
Query(simulation_state=["confirmed", "started"]),
setup_query = ComplexQuery(Query(simulation_state=["confirmed", "started"]),
Query(default_resource_uid=setup_service.getUid()),
operator="AND")
query = ComplexQuery(hosting_query, setup_query, operator="OR")
update_query = ComplexQuery(Query(simulation_state=["confirmed"]),
Query(default_resource_uid=update_service.getUid()),
operator="AND")
query = ComplexQuery(hosting_query,
setup_query,
update_query,
operator="OR")
# Use getTrackingList
catalog_result = portal.portal_catalog(
portal_type='Sale Packing List Line',
sort_on=(('movement.start_date', 'DESC'),),
limit=1,
query=query)
query=query, **global_query_kw)
return len(catalog_result)
......
......@@ -220,17 +220,6 @@ class testVifibMixin(ERP5TypeTestCase):
start_date=start_date, stop_date=stop_date)
accounting_period.start()
def prepareTestServices(self):
isTransitionPossible = self.portal.portal_workflow.isTransitionPossible
for service in self.portal.portal_catalog(
portal_type="Service",
id="vifib_%",
):
service = service.getObject()
if isTransitionPossible(service, 'validate'):
service.validate()
def setupVifibMachineAuthenticationPlugin(self):
"""Sets up Vifib Authentication plugin"""
pas = self.getPortal().acl_users
......@@ -293,7 +282,6 @@ class testVifibMixin(ERP5TypeTestCase):
self.setPreference()
self.prepareTestUsers()
self.prepareVifibAccountingPeriod()
self.prepareTestServices()
transaction.commit()
self.tic()
self.logout()
......
......@@ -481,6 +481,8 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
CheckSoftwareInstanceAndRelatedComputerPartition
CheckRequestedSoftwareInstanceAndRelatedComputerPartition
Logout
......@@ -528,7 +530,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# now this computer patrition request new one
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotFoundResponse
RequestComputerPartition
SlapLogout
"""
sequence_list.addSequenceString(sequence_string)
......@@ -610,7 +612,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# now this computer patrition request new one
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotFoundResponse
RequestComputerPartition
SlapLogout
# now vifib_admin computer partition request new one and suceeds
......@@ -624,6 +626,8 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
CheckSoftwareInstanceAndRelatedComputerPartition
CheckRequestedSoftwareInstanceAndRelatedComputerPartition
Logout
......@@ -671,7 +675,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# now this computer patrition request new one
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotFoundResponse
RequestComputerPartition
SlapLogout
"""
sequence_list.addSequenceString(sequence_string)
......@@ -711,7 +715,7 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
# now this computer patrition request new one
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNotFoundResponse
RequestComputerPartition
SlapLogout
"""
sequence_list.addSequenceString(sequence_string)
......
......@@ -25,18 +25,22 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
root_software_instance.requestSoftwareInstance(partition_reference=S1,
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
S1_instance = self.portal.portal_catalog.getResultValue(
portal_type='Software Instance', title=S1)
S1_instance.requestSoftwareInstance(partition_reference=S2, **common_kw)
self.stepTic()
S1_instance.requestSoftwareInstance(partition_reference=S3, **common_kw)
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
root_software_instance.requestSoftwareInstance(partition_reference=S4,
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
S2_instance = self.portal.portal_catalog.getResultValue(
portal_type='Software Instance', title=S2)
......@@ -141,7 +145,6 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
LoginDefaultUser
FinishSoftwareInstanceTree
Logout
SlapLoginCurrentComputer
CheckEmptyComputerGetComputerPartitionCall
SlapLogout
......@@ -363,7 +366,6 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
software_type='any', instance_xml=self.minimal_correct_xml,
state='stopped')
self.logout()
self.login(sequence['software_instance_reference'])
root_software_instance.requestSoftwareInstance(
partition_reference=S1,
......@@ -373,6 +375,8 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
</instance>""" % sequence['computer_reference_c1'],
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
self.logout()
self.stepLoginDefaultUser()
......@@ -380,7 +384,6 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
portal_type='Software Instance', title=S1)
S1_reference = S1_instance.getReference()
self.logout()
self.login(S1_reference)
S1_instance.requestSoftwareInstance(
partition_reference=S2,
......@@ -390,6 +393,8 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
</instance>""" % sequence['computer_reference_c0'],
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
self.logout()
self.stepLoginDefaultUser()
......@@ -410,6 +415,8 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
self.logout()
self.stepLoginDefaultUser()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
S3_instance = self.portal.portal_catalog.getResultValue(
portal_type='Software Instance', title=S3)
S3_reference = S3_instance.getReference()
......@@ -550,6 +557,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
FinishSoftwareInstanceSpannedTree
Tic
SlapLoginCurrentComputer
CheckEmptyComputerGetComputerPartitionCall
ComputerBang
......@@ -631,6 +639,8 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
partition_reference=S1,
**common_kw)
self.stepTic()
self.stepConfirmOrderedSaleOrderActiveSense()
self.stepTic()
self.logout()
self.stepLoginDefaultUser()
......
......@@ -349,7 +349,10 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -738,7 +741,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -764,6 +771,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
Tic
RequestComputerPartition
Tic
......@@ -888,7 +900,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -914,7 +930,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -1048,7 +1068,11 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
SlapLogout
......@@ -1344,7 +1368,10 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
RequestSlaveInstanceFromComputerPartition
Tic
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginCurrentSoftwareInstance
SoftwareInstanceAvailable
Tic
......
......@@ -340,7 +340,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
SlapLogout \
\
LoginTestVifibCustomer \
RequestSlaveInstanceStop \
RequestSoftwareInstanceStop \
Tic \
Logout \
\
......
This diff is collapsed.
This diff is collapsed.
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