Commit a350e129 authored by Łukasz Nowak's avatar Łukasz Nowak

Merge remote-tracking branch 'origin/master' into performance-hack

parents bcc1a6dc a7ce9c8f
......@@ -80,7 +80,7 @@ if root_hosting_subscription is None:\n
root_hosting_subscription = instance_setup_line.getAggregateValue(portal_type=\'Hosting Subscription\')\n
if root_hosting_subscription is None:\n
raise ConsistencyError(("Software instance %s has no hosting "\n
"subscription as root.") % context.getReference())\n
"subscription as root.") % context.getPath())\n
\n
return root_hosting_subscription.getUid()\n
</string> </value>
......
......@@ -55,7 +55,7 @@ portal = software_instance.getPortalObject()\n
\n
root_hosting_subscription = portal.portal_catalog.getResultValue(uid=software_instance.SoftwareInstance_getRootHostingSubscriptionUid())\n
tag = \'%s_%s_inProgress\' % (software_instance.getUid(), root_hosting_subscription.getTitle())\n
root_software_instance = root_hosting_subscription.HostingSubscription_requestRootSoftwareInstance(tag)\n
root_software_instance = root_hosting_subscription.getPredecessorValue()\n
\n
# Use iterative algorithm instead of recursive approach in order to avoid\n
# complexity as much as possible.\n
......
......@@ -141,16 +141,19 @@ if (request_software_instance is None):\n
# XXX Hardcoded values\n
source="organisation_module/vifib_internet",\n
source_section="organisation_module/vifib_internet",\n
quantity_unit="unit/piece",\n
price_currency="currency_module/EUR",\n
activate_kw={\'tag\': tag},\n
)\n
\n
setup_service_relative_url = portal.portal_preferences.getPreferredInstanceSetupResource()\n
service = portal.restrictedTraverse(setup_service_relative_url)\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
price=service.getSaleSupplyLineBasePrice(),\n
aggregate_value_list=[request_software_instance,subscription,software_release_document],\n
activate_kw={\'tag\': tag},\n
)\n
......
erp5_accounting
erp5_accounting_l10n_fr
erp5_administration
erp5_base
erp5_commerce
erp5_computer_immobilisation
erp5_software_pdm
erp5_content_translation
erp5_core_proxy_field_legacy
erp5_credential
erp5_crm
erp5_dhtml_style
erp5_discount_resource
erp5_dms
erp5_forge
erp5_full_text_myisam_catalog
erp5_ingestion
erp5_ingestion_mysql_innodb_catalog
erp5_invoicing
erp5_item
erp5_jquery
erp5_jquery_ui
erp5_km
erp5_knowledge_pad
erp5_l10n_fr
erp5_legacy_tax_system
erp5_ods_style
erp5_odt_style
erp5_ooo_import
erp5_open_trade
erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_rss_style
erp5_secure_payment
erp5_simplified_invoicing
erp5_simulation
erp5_software_pdm
erp5_system_event
erp5_tax_resource
erp5_tiosafe_core
erp5_trade
erp5_web
erp5_web_download_theme
erp5_xhtml_jquery_style
\ No newline at end of file
409
\ No newline at end of file
414
\ No newline at end of file
......@@ -571,7 +571,7 @@
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>myspace</string> </value>
<value> <string>WebSection_viewVifibKVMOrder</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -1021,6 +1021,96 @@ Vifib Cloud is a distributed cloud around the world.<br />Just fill the email fi
</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>916.60997.57303.57958</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="10.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331558795.51</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>917.5574.38805.43195</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="10.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331558960.32</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
......
......@@ -71,6 +71,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_viewServerInformationDialog</string> </value>
......
87
\ No newline at end of file
88
\ No newline at end of file
......@@ -6,7 +6,6 @@
</role>
<role id='R-MEMBER'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='devel'>
<item>Owner</item>
......
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_hr_admin'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_sale_agent'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_updated_vifib_user'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_vifib_admin'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_vifib_customer_a'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_vifib_customer'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_vifib_developer'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_vifib_member'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_vifib_user_admin'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<item>Assignor</item>
</role>
<role id='test_vifib_user_developer'>
<item>Assignee</item>
<item>Auditor</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_hr_admin</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131174.87</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_hr_admin_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_sale_agent</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131174.99</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_sale_agent_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_updated_vifib_user</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131175.13</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_updated_vifib_user_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_vifib_admin</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131175.26</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_vifib_admin_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_vifib_customer_a</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131175.4</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_vifib_customer_a_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -96,10 +96,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_vifib_customer</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131175.52</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_vifib_customer_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_vifib_developer</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131175.66</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_vifib_developer_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_vifib_member</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131175.88</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_vifib_member_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_vifib_user_admin</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131176.02</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_vifib_user_admin_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -78,10 +78,43 @@
<key> <string>default_reference</string> </key>
<value> <string>OSO-test_vifib_user_developer</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>effective_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1331131176.16</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>format</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_vifib_user_developer_open_sale_order</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value> <string>_generatePerDayId</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Open Sale Order</string> </value>
......
......@@ -4,7 +4,7 @@
<multi_property id='category'>group/company</multi_property>
<multi_property id='base_category'>group</multi_property>
</role>
<role id='Auditor; Author'>
<role id='Auditor'>
<property id='title'>Member</property>
<multi_property id='category'>role/member</multi_property>
<multi_property id='base_category'>role</multi_property>
......
<type_roles>
<role id='Assignee'>
<role id='Auditor'>
<property id='title'>Destination Decision</property>
<property id='description'>Monovalued role</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromContent</property>
......
......@@ -28,9 +28,6 @@
<string>root_software_release_url</string>
<string>root_state</string>
<string>title</string>
<string>periodicity_hour</string>
<string>periodicity_minute</string>
<string>periodicity_month_day</string>
</tuple>
</value>
</item>
......@@ -42,7 +39,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reference_constraint</string> </value>
<value> <string>basic_property_constraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -2,7 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="TALES Constraint" module="erp5.portal_type"/>
<global name="Property Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
......@@ -19,18 +19,24 @@
</value>
</item>
<item>
<key> <string>description</string> </key>
<key> <string>constraint_property</string> </key>
<value>
<none/>
<tuple>
<string>periodicity_hour</string>
<string>periodicity_minute</string>
<string>periodicity_month_day</string>
</tuple>
</value>
</item>
<item>
<key> <string>expression</string> </key>
<value> <string>python: len(context.getAggregateValue(portal_type=\'Hosting Subscription\').getAggregateRelatedList(portal_type=\'Open Sale Order Line\')) == 1</string> </value>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>aggregate_hosting_subscription_open_sale_order_line_related_constraint</string> </value>
<value> <string>periodicity_property_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -44,17 +50,9 @@
<tuple/>
</value>
</item>
<item>
<key> <string>message_expression_error</string> </key>
<value> <string>Hosting Subscription related to Sale Order Line have to be related with exactly 1 Open Sale Order Line</string> </value>
</item>
<item>
<key> <string>message_expression_false</string> </key>
<value> <string>Hosting Subscription related to Sale Order Line have to be related with exactly 1 Open Sale Order Line</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>TALES Constraint</string> </value>
<value> <string>Property Existence Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
......@@ -70,7 +68,7 @@
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: context.getSimulationState() in context.getPortalPlannedOrderStateList() and context.getAggregateValue(portal_type=\'Hosting Subscription\') is not None</string> </value>
<value> <string>python: context.getPortalObject().portal_catalog.getResultValue(portal_type=\'Sale Packing List Line\', default_aggregate_uid=context.getUid(), default_resource_uid=context.getPortalObject().restrictedTraverse(context.getPortalObject().portal_preferences.getPreferredInstanceSetupResource()).getUid(), simulation_state=(\'stopped\', \'delivered\')) is not None</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>effective_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>effective_date_existence_constraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Existence Constraint</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -12,23 +12,6 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
......@@ -39,33 +22,51 @@
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>quantity</string>
<string>expiration_date</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Property quantity must be defined</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_existence_constraint</string> </value>
<value> <string>expiration_date_existence_constraint</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Property quantity must be defined</string> </value>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Property quantity must be defined</string> </value>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Existence Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getSimulationState() != \'draft\'</string> </value>
<value> <string>python: context.getValidationState() == \'archived\'</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -28,7 +28,7 @@
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Hosting Subscription\',)</string> </value>
<value> <string>python: \'Hosting Subscription\'</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -38,12 +38,20 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>aggregate_hosting_subscription_constraint</string> </value>
<value> <string>line_aggregate_hosting_subscription_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_not_in_range</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_too_small</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
......@@ -52,6 +60,10 @@
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getResourceValue() is not None and object.getResource() in [object.portal_preferences.getPreferredInstanceSetupResource(), object.portal_preferences.getPreferredInstanceHostingResource(), object.portal_preferences.getPreferredInstanceCleanupResource()]</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
......
......@@ -22,8 +22,6 @@
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>start_date</string>
<string>stop_date</string>
<string>quantity</string>
<string>price</string>
</tuple>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Arity Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>aggregate</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Computer Partition\', \'Slave Partition\')</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>line_aggregate_computer_partition_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>message_arity_with_portal_type_not_in_range</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_too_small</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getSimulationState() == \'confirmed\' and object.getResourceValue() is not None and object.getResource() in [object.portal_preferences.getPreferredInstanceSetupResource(), object.portal_preferences.getPreferredInstanceHostingResource(), object.portal_preferences.getPreferredInstanceCleanupResource()]</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Arity Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>aggregate</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: \'Hosting Subscription\'</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>line_aggregate_hosting_subscription_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_not_in_range</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_too_small</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getResourceValue() is not None and object.getResource() in [object.portal_preferences.getPreferredInstanceSetupResource(), object.portal_preferences.getPreferredInstanceHostingResource(), object.portal_preferences.getPreferredInstanceCleanupResource()]</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership Arity Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_base_category</string> </key>
<value>
<tuple>
<string>aggregate</string>
</tuple>
</value>
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Slave Instance\', \'Software Instance\')</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>line_aggregate_software_instance_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_not_in_range</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_too_small</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getResourceValue() is not None and object.getResource() in [object.portal_preferences.getPreferredInstanceSetupResource(), object.portal_preferences.getPreferredInstanceHostingResource(), object.portal_preferences.getPreferredInstanceCleanupResource()]</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -28,7 +28,7 @@
</item>
<item>
<key> <string>constraint_portal_type</string> </key>
<value> <string>python: (\'Hosting Subscription\',)</string> </value>
<value> <string>python: \'Software Release\'</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -38,12 +38,20 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>aggregate_constraint</string> </value>
<value> <string>line_aggregate_software_release_constraint</string> </value>
</item>
<item>
<key> <string>max_arity</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_not_in_range</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_too_small</string> </key>
<value> <string>There should be exactly one ${portal_type} present in Items</string> </value>
</item>
<item>
<key> <string>min_arity</string> </key>
<value> <int>1</int> </value>
......@@ -52,6 +60,10 @@
<key> <string>portal_type</string> </key>
<value> <string>Category Membership Arity Constraint</string> </value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getResourceValue() is not None and object.getResource() in [object.portal_preferences.getPreferredInstanceSetupResource(), object.portal_preferences.getPreferredInstanceHostingResource(), object.portal_preferences.getPreferredInstanceCleanupResource()]</string> </value>
</item>
<item>
<key> <string>use_acquisition</string> </key>
<value> <int>0</int> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>price</string>
<string>quantity</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_existence_constraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Existence Constraint</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Existence Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>price</string>
<string>quantity</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_existence_constraint</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Existence Constraint</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
vifib_data_simulation
vifib_base
vifib_core
vifib_crm
vifib_data
vifib_data_category
vifib_data_payzen
vifib_data_simulation
vifib_data_web
vifib_forge_release
vifib_l10n_fr
vifib_mysql_innodb_catalog
vifib_open_trade
vifib_payzen
vifib_slap
vifib_software_pdm
vifib_web
\ No newline at end of file
395
\ No newline at end of file
411
\ No newline at end of file
<catalog_method>
<item key="sql_catalog_object_list" type="int">
<value>1</value>
</item>
<item key="_is_filtered_archive" type="int">
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: context.getPortalType() in ('Software Instance', 'Slave Instance', 'Computer')</value>
</item>
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
security_uid\r\n
getOwnerInfo\r\n
getViewPermissionOwner\r\n
getPath\r\n
getRelativeUrl\r\n
getParentUid\r\n
id\r\n
getDescription\r\n
getTitle\r\n
meta_type\r\n
getPortalType\r\n
getOpportunityState\r\n
getCorporateRegistrationCode\r\n
getEan13Code\r\n
getSimulationState\r\n
getCausalityState\r\n
getInvoiceState\r\n
getValidationState\r\n
getPaymentState\r\n
getEventState\r\n
getImmobilisationState\r\n
getReference\r\n
getGroupingReference\r\n
getSourceReference\r\n
getDestinationReference\r\n
getStringIndex\r\n
getIntIndex\r\n
getFloatIndex\r\n
hasCellContent\r\n
getModificationDate</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_catalog_no_workflow_date_object_list</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
REPLACE INTO\n
catalog\n
(`uid`, `security_uid`, `owner`, `viewable_owner`, `path`, `relative_url`, `parent_uid`, `id`, `description`, `title`, `meta_type`,\n
`portal_type`, `opportunity_state`, `corporate_registration_code`, `ean13_code`, `validation_state`, `simulation_state`,\n
`causality_state`, `invoice_state`, `payment_state`, `event_state`, `immobilisation_state`, `reference`, `grouping_reference`,\n
`source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`, `modification_date`)\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">, \n
<dtml-sqlvar expr="security_uid[loop_item]" type="int">,\n
<dtml-sqlvar expr="getOwnerInfo[loop_item][\'id\']" type="string">,\n
<dtml-sqlvar expr="(getViewPermissionOwner[loop_item] is not None) and getViewPermissionOwner[loop_item] or \'\'" type="string" optional>,\n
<dtml-sqlvar expr="getPath[loop_item]" type="string">,\n
<dtml-sqlvar expr="getRelativeUrl[loop_item]" type="string">,\n
<dtml-sqlvar expr="getParentUid[loop_item]" type="int">,\n
<dtml-sqlvar expr="id[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getDescription[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getTitle[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="meta_type[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getPortalType[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getOpportunityState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getCorporateRegistrationCode[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getEan13Code[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getValidationState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSimulationState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getCausalityState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getInvoiceState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getPaymentState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getEventState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getImmobilisationState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getGroupingReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSourceReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getDestinationReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getStringIndex[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getIntIndex[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getFloatIndex[loop_item]" type="float" optional>,\n
<dtml-sqlvar expr="hasCellContent[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getModificationDate[loop_item]" type="datetime" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,4 +2,13 @@
<item key="sql_catalog_object_list" type="int">
<value>1</value>
</item>
<item key="_is_filtered_archive" type="int">
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: context.getPortalType() not in ('Software Instance', 'Slave Instance', 'Computer')</value>
</item>
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
......@@ -43,7 +43,9 @@ getDestinationReference\r\n
getStringIndex\r\n
getIntIndex\r\n
getFloatIndex\r\n
hasCellContent</string> </value>
hasCellContent\r\n
getCreationDate\r\n
getModificationDate</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
......@@ -88,7 +90,8 @@ REPLACE INTO\n
(`uid`, `security_uid`, `owner`, `viewable_owner`, `path`, `relative_url`, `parent_uid`, `id`, `description`, `title`, `meta_type`,\n
`portal_type`, `opportunity_state`, `corporate_registration_code`, `ean13_code`, `validation_state`, `simulation_state`,\n
`causality_state`, `invoice_state`, `payment_state`, `event_state`, `immobilisation_state`, `reference`, `grouping_reference`,\n
`source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`)\n
`source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`, `creation_date`,\n
`modification_date`)\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
(\n
......@@ -121,7 +124,9 @@ VALUES\n
<dtml-sqlvar expr="getStringIndex[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getIntIndex[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getFloatIndex[loop_item]" type="float" optional>,\n
<dtml-sqlvar expr="hasCellContent[loop_item]" type="int" optional>\n
<dtml-sqlvar expr="hasCellContent[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getCreationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getModificationDate[loop_item]" type="datetime" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
......
......@@ -6,6 +6,7 @@ erp5_mysql_innodb/z0_uncatalog_software_instance
erp5_mysql_innodb/z0_uncatalog_software_release
erp5_mysql_innodb/z_catalog_computer_partition_list
erp5_mysql_innodb/z_catalog_email_list
erp5_mysql_innodb/z_catalog_no_workflow_date_object_list
erp5_mysql_innodb/z_catalog_object_list
erp5_mysql_innodb/z_catalog_software_instance_list
erp5_mysql_innodb/z_catalog_software_release_list
......
......@@ -7,10 +7,6 @@
<type>Purchase Packing List</type>
<workflow>vifib_open_order_interaction_workflow</workflow>
</chain>
<chain>
<type>Sale Order</type>
<workflow>vifib_open_order_interaction_workflow</workflow>
</chain>
<chain>
<type>Subscription Item Root Simulation Rule</type>
<workflow>edit_workflow, rule_validation_workflow</workflow>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
</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>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>Delivery_assertCustomTradeConditionAndOpenOrder</string>
</list>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
</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>assert_open_order</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>order</string>
<string>confirm</string>
<string>plan</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Sale Order</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_accounting
erp5_open_trade
\ No newline at end of file
168
\ No newline at end of file
172
\ No newline at end of file
Hosting Subscription | edit_workflow
Hosting Subscription | hosting_subscription_workflow
Purchase Packing List | vifib_open_order_interaction_workflow
Sale Order | vifib_open_order_interaction_workflow
Subscription Item Root Simulation Rule | edit_workflow
Subscription Item Root Simulation Rule | rule_validation_workflow
\ No newline at end of file
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_updateOpenSaleOrderLine</string> </value>
<value> <string>Alarm_updatePersonOpenOrder</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -22,35 +22,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>vifib_update_open_sale_order_line</string> </value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>periodicity_month</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
<value> <string>vifib_person_update_open_order</string> </value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
......@@ -64,26 +36,20 @@
</tuple>
<state>
<tuple>
<float>946684800.0</float>
<float>0.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Open Sale Order Line update</string> </value>
<value> <string>Updates Persons\' Open Order to reflect changes</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -15,6 +15,10 @@
<type>Internal Packing List</type>
<workflow>slap_interaction_workflow</workflow>
</chain>
<chain>
<type>Open Sale Order</type>
<workflow>slap_interaction_workflow</workflow>
</chain>
<chain>
<type>Person</type>
<workflow>person_slap_interface_workflow, slap_interaction_workflow</workflow>
......
<?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>if params is None:\n
params = {}\n
kw = {}\n
\n
from DateTime import DateTime\n
from Products.ZSQLCatalog.SQLCatalog import Query\n
\n
last_active_process = context.getLastActiveProcess()\n
if last_active_process is not None and params.get(\'full\', False):\n
# fetch only objects modified since last alarm run\n
kw[\'modification_date\'] = Query(modification_date=last_active_process.getStartDate(), range="min")\n
\n
# register active process in order to have "windows" of last indexed objects\n
context.newActiveProcess()\n
\n
context.getPortalObject().portal_catalog.searchAndActivate(\n
method_id=\'Person_storeOpenOrderJournal\',\n
method_kw={\'modification_date\': kw.get(\'modification_date\'), \'tag\': tag, \'stop_date\': params.get(\'stop_date\')},\n
activate_kw={\'tag\': tag, \'priority\': 10},\n
packet_size=1, # Person_storeOpenOrderJournal generates big transactions\n
portal_type=\'Person\'\n
)\n
\n
context.activate(after_tag=tag).getId()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>tag, fixit, params</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_updatePersonOpenOrder</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -94,6 +94,7 @@ new_one = False\n
if (request_software_instance is None):\n
new_one = True\n
setup_service_relative_url = portal.portal_preferences.getPreferredInstanceSetupResource()\n
service = portal.restrictedTraverse(setup_service_relative_url)\n
request_software_instance = portal.getDefaultModule(portal_type=software_instance_portal_type).newContent(\n
portal_type=software_instance_portal_type,\n
source_reference=hosting_subscription.getSourceReference(),\n
......@@ -118,6 +119,7 @@ if (request_software_instance is None):\n
start_date=DateTime(),\n
received_date=DateTime(),\n
# XXX Hardcoded values\n
specialise=\'sale_trade_condition_module/vifib_trade_condition\',\n
source="organisation_module/vifib_internet",\n
source_section="organisation_module/vifib_internet",\n
quantity_unit="unit/piece",\n
......@@ -128,7 +130,7 @@ if (request_software_instance is None):\n
portal_type=sale_order_line_portal_type,\n
resource=setup_service_relative_url,\n
quantity=1,\n
price=0,\n
price=service.getSaleSupplyLineBasePrice(),\n
aggregate_value_list=[request_software_instance,\n
hosting_subscription,\n
software_release_document\n
......@@ -139,35 +141,6 @@ if (request_software_instance is None):\n
# XXX: Do not verify security\n
sale_order.order()\n
\n
if person is not None:\n
# Update Open Order\n
# does this order have a client-specific Open Order\n
open_order = portal.portal_catalog.getResultValue(\n
default_destination_section_uid=person.getUid(),\n
portal_type="Open Sale Order",\n
validation_state="validated")\n
if open_order is None:\n
raise ValueError(\'Person has no open order created\')\n
\n
now = DateTime()\n
start_date = getClosestDate(target_date=now, precision=\'day\', before=1)\n
# 12 months of subscription by default\n
stop_date = addToDate(getClosestDate(target_date=now, precision=\'month\', before=1), month=1)\n
\n
subscription_service_relative_url = portal.portal_preferences.getPreferredInstanceSubscriptionResource()\n
open_order.newContent(\n
portal_type="Open Sale Order Line",\n
title=hosting_subscription.getTitle(),\n
aggregate_value=hosting_subscription,\n
start_date=start_date,\n
stop_date=stop_date,\n
quantity=1,\n
quantity_unit="unit/piece",\n
# XXX Hardcoded values\\n\n
resource=subscription_service_relative_url,\n
price=context.restrictedTraverse(subscription_service_relative_url).getSaleSupplyLineBasePrice(),\n
activate_kw={\'tag\': tag},\n
)\n
hosting_subscription_predecessor_list = hosting_subscription.getPredecessorList()\n
hosting_subscription_predecessor_list.append(request_software_instance.getRelativeUrl())\n
hosting_subscription.edit(predecessor_list=hosting_subscription_predecessor_list)\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
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery\n
state = context.getValidationState()\n
validated = state == \'validated\'\n
archived = state == \'archived\'\n
\n
if state == \'archived\':\n
if context.getEffectiveDate() is None or context.getExpirationDate() is None:\n
if context.getExpirationDate() is None:\n
# is there any validated order?\n
validated_open_order = context.getPortalObject().portal_catalog.getResultValue(\n
portal_type=\'Open Sale Order\',\n
reference=context.getReference(),\n
simulation_state=\'validated\',\n
)\n
expiration_date = DateTime()\n
if validated_open_order is not None: \n
expiration_date = validated_open_order.getEffectiveDate()\n
if expiration_date is None:\n
raise NotImplementedError(\'Inform that it was impossible to fix as validated has no effective date.\')\n
context.setExpirationDate(expiration_date)\n
\n
if context.getEffectiveDate() is not None:\n
# ok\n
return\n
# is there any archived open sale order?\n
archived_open_order = context.getPortalObject().portal_catalog.getResultValue(\n
portal_type=\'Open Sale Order\',\n
reference=context.getReference(),\n
simulation_state=\'archived\',\n
uid=NegatedQuery(Query(uid=context.getUid())),\n
sort_on=((\'expiration_date\', \'descending\'),)\n
)\n
effective_date = DateTime()\n
if archived_open_order is not None:\n
effective_date = archived_open_order.getExpirationDate()\n
if effective_date is None:\n
raise NotImplementedError(\'Inform that it was impossible to fix as archived order has no expiration date.\')\n
context.setEffectiveDate(effective_date)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>OpenSaleOrder_fixEffectiveExpirationDateConsistency</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.ERP5Type.DateUtils import addToDate, getClosestDate\n
from DateTime import DateTime\n
\n
person = context\n
portal = person.getPortalObject()\n
\n
if remove_hosting_list is None:\n
remove_hosting_list = []\n
if add_kw_list is None:\n
add_kw_list = []\n
if start_date_tuple_list is None:\n
start_date_tuple_list = []\n
if stop_date is not None:\n
stop_date = DateTime(stop_date)\n
\n
previous_open_sale_order = portal.portal_catalog.getResultValue(\n
default_destination_section_uid=person.getUid(),\n
portal_type="Open Sale Order",\n
validation_state="validated")\n
\n
hosting_subscription_mapping = {}\n
if previous_open_sale_order is not None:\n
for open_sale_order_line in previous_open_sale_order.contentValues(portal_type=\'Open Sale Order Line\'):\n
hosting_subscription_mapping[open_sale_order_line.getAggregate(portal_type=\'Hosting Subscription\')] = open_sale_order_line.getId()\n
\n
now = DateTime()\n
\n
add_kw_kw = {}\n
for add_kw in add_kw_list:\n
existing = portal.portal_catalog.countResults(portal_type=\'Open Sale Order Line\', default_aggregate_uid=portal.restrictedTraverse(add_kw[\'aggregate\']).getUid())[0][0] > 0\n
if add_kw[\'aggregate\'] not in hosting_subscription_mapping and not existing:\n
add_kw_kw[add_kw[\'aggregate\']] = add_kw.copy()\n
\n
modify_kw_kw = {}\n
hs_modify_kw_kw = {}\n
for start_date_tuple in start_date_tuple_list:\n
start_date = getClosestDate(target_date=start_date_tuple[1], precision=\'day\')\n
while start_date.day() >= 29:\n
start_date = addToDate(start_date, to_add={\'day\': -1})\n
if start_date_tuple[0] in hosting_subscription_mapping:\n
line_id = hosting_subscription_mapping[start_date_tuple[0]]\n
line = previous_open_sale_order[line_id]\n
if line.getStartDate() != start_date:\n
modify_kw_kw[line.getAggregate(portal_type=\'Hosting Subscription\')] = {\'start_date\': start_date}\n
elif start_date_tuple[0] in add_kw_kw:\n
add_kw_kw[start_date_tuple[0]][\'start_date\'] = start_date\n
hs = portal.restrictedTraverse(start_date_tuple[0])\n
if hs.getPeriodicityMonthDayList() != [start_date.day()]:\n
hs_modify_kw_kw.setdefault(start_date_tuple[0], {})\n
hs_modify_kw_kw[start_date_tuple[0]] = dict(\n
periodicity_month_day_list = [start_date.day()],\n
periodicity_hour_list=[0],\n
periodicity_minute_list=[0]\n
)\n
\n
if previous_open_sale_order is not None:\n
for line in previous_open_sale_order.contentValues(portal_type=\'Open Sale Order Line\'):\n
old_stop_date = line.getStopDate()\n
if old_stop_date is not None:\n
if stop_date is not None and old_stop_date < stop_date:\n
modify_kw_kw.setdefault(line.getAggregate(portal_type=\'Hosting Subscription\'), {})\n
modify_kw_kw[line.getAggregate(portal_type=\'Hosting Subscription\')][\'stop_date\'] = stop_date\n
elif old_stop_date < now:\n
new_stop_date = addToDate(old_stop_date, to_add={\'month\': 1})\n
while new_stop_date < now:\n
new_stop_date = addToDate(new_stop_date, to_add={\'month\': 1})\n
hosting_id = line.getAggregate(portal_type=\'Hosting Subscription\')\n
modify_kw_kw.setdefault(hosting_id, {})\n
modify_kw_kw[line.getAggregate(portal_type=\'Hosting Subscription\')][\'stop_date\'] = new_stop_date\n
\n
for (key, value) in add_kw_kw.copy().iteritems():\n
if stop_date is not None:\n
add_kw_kw[key][\'stop_date\'] = stop_date\n
else:\n
start_date = add_kw_kw[key].get(\'start_date\')\n
if start_date is not None:\n
new_stop_date = addToDate(start_date, to_add={\'month\': 1})\n
while new_stop_date < now:\n
new_stop_date = addToDate(new_stop_date, to_add={\'month\': 1})\n
add_kw_kw[key][\'stop_date\'] = new_stop_date\n
\n
for (key, value) in modify_kw_kw.copy().iteritems():\n
if stop_date is not None:\n
modify_kw_kw[key][\'stop_date\'] = stop_date\n
else:\n
start_date = modify_kw_kw[key].get(\'start_date\')\n
if start_date is not None:\n
new_stop_date = addToDate(start_date, to_add={\'month\': 1})\n
while new_stop_date < now:\n
new_stop_date = addToDate(new_stop_date, to_add={\'month\': 1})\n
modify_kw_kw[key][\'stop_date\'] = new_stop_date\n
\n
remove_id_list = set()\n
if previous_open_sale_order is not None:\n
for remove_hosting in remove_hosting_list:\n
if remove_hosting in add_kw_kw or remove_hosting in modify_kw_kw:\n
# just added, cannot remove yet\n
continue\n
if remove_hosting in hosting_subscription_mapping:\n
line = previous_open_sale_order[hosting_subscription_mapping.get(remove_hosting)]\n
if line.getStartDate() is not None and line.getStopDate() is not None and line.getStartDate() < line.getStopDate():\n
remove_id_list.add(line.getId())\n
return add_kw_kw, modify_kw_kw, hs_modify_kw_kw, list(remove_id_list)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>remove_hosting_list=None, add_kw_list=None, stop_date=None, start_date_tuple_list=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_getOpenOrderDifference</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -50,56 +50,89 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Log import log\n
order = state_change[\'object\']\n
portal = order.getPortalObject()\n
<value> <string>person = context\n
portal = context.getPortalObject()\n
catalog = portal.portal_catalog\n
\n
vifib_trade_condition = \'sale_trade_condition_module/vifib_trade_condition\'\n
if not order.hasSpecialise():
order.edit(specialise=vifib_trade_condition)
cleanup_resource_uid = portal.restrictedTraverse(portal.portal_preferences.getPreferredInstanceCleanupResource()).getUid()\n
setup_resource_uid = portal.restrictedTraverse(portal.portal_preferences.getPreferredInstanceSetupResource()).getUid()\n
\n
# ### STEP 1: does this order have a client-specific Trade Condition\n
# trade_condition = order.getSpecialiseValue(portal_type="Sale Trade Condition")\n
# custom_trade_condition = None\n
# if trade_condition is not None:\n
# if trade_condition.getDestinationSection() == order.getDestinationSection():\n
# # The client in this trade condition is the client of the order\n
# custom_trade_condition = trade_condition\n
# \n
# if custom_trade_condition is None:\n
# # If no trade condition or generic trade condition\n
# # try to find existing trade condition\n
# trade_condition_list = portal.portal_catalog(\n
# destination_section_relative_url=order.getDestinationSection(),\n
# validation_state="validated",\n
# specialise_relative_url=vifib_trade_condition,\n
# portal_type=\'Sale Trade Condition\')\n
# if len(trade_condition_list):\n
# custom_trade_condition = trade_condition_list[0].getObject()\n
# \n
# if custom_trade_condition is None:\n
# # nothing found then create a new custom trade condition\n
# custom_trade_condition = portal.sale_trade_condition_module.newContent(specialise=vifib_trade_condition,\n
# destination_section=order.getDestinationSection(),\n
# title="ViFiB Custom Conditions",\n
# portal_type=\'Sale Trade Condition\')\n
# \n
# if custom_trade_condition is None:\n
# raise ValueError(\'It was impossible to generate custom trade condition.\')\n
# if order.getSpecialise(portal_type="Sale Trade Condition") != custom_trade_condition.getRelativeUrl():\n
# order.setSpecialiseValue(custom_trade_condition)\n
# \n
# if portal.portal_workflow.isTransitionPossible(custom_trade_condition, \'validate\'):\n
# custom_trade_condition.validate()\n
person_uid = person.getUid()\n
\n
kw = {}\n
if modification_date is not None:\n
kw[\'modification_date\'] = Query(modification_date=modification_date, range="min")\n
\n
remove_hosting_list = []\n
add_kw_list = []\n
start_date_tuple_list = []\n
\n
movement_kw = kw.copy()\n
movement_kw[\'movement.destination_uid\'] = person_uid\n
for cleanup_line in catalog(\n
portal_type=\'Sale Packing List Line\',\n
default_resource_uid=cleanup_resource_uid,\n
simulation_state=\'delivered\',\n
**movement_kw):\n
aggregate = cleanup_line.getAggregate(portal_type=\'Hosting Subscription\')\n
if aggregate not in remove_hosting_list:\n
remove_hosting_list.append(aggregate)\n
\n
subscription_service_relative_url=portal.portal_preferences.getPreferredInstanceSubscriptionResource()\n
common_add_kw = dict(\n
portal_type="Open Sale Order Line",\n
quantity=1,\n
quantity_unit="unit/piece",\n
# XXX Hardcoded values\n
resource=subscription_service_relative_url,\n
price=portal.restrictedTraverse(subscription_service_relative_url).getSaleSupplyLineBasePrice()\n
)\n
for order in catalog(\n
portal_type=\'Sale Order\',\n
simulation_state=[\'planned\', \'ordered\',\'confirmed\'],\n
default_destination_decision_uid=person_uid,\n
**kw\n
):\n
hosting_subscription = order.getMovementList()[0].getAggregate(portal_type=\'Hosting Subscription\')\n
add_kw = common_add_kw.copy()\n
add_kw.update(\n
title=portal.restrictedTraverse(hosting_subscription).getTitle(),\n
aggregate=hosting_subscription\n
)\n
add_kw_list.append(add_kw)\n
\n
def getWorkflowDate(delivery, state):\n
workflow_item_list = portal.portal_workflow.getInfoFor(ob=delivery, name=\'history\', wf_id=\'packing_list_workflow\')\n
for item in workflow_item_list:\n
if item.get(\'simulation_state\') == state:\n
return item.get(\'time\')\n
raise ValueError(\'Delivery %s has no state %s\' % (delivery.getPath(), state))\n
\n
for setup_line in catalog(\n
portal_type=\'Sale Packing List Line\',\n
default_resource_uid=setup_resource_uid,\n
simulation_state=[\'stopped\', \'delivered\'],\n
**movement_kw):\n
real_setup_line = catalog.getResultValue(portal_type=\'Sale Packing List Line\', simulation_state=[\'stopped\', \'delivered\'],\n
default_resource_uid=setup_resource_uid,\n
default_aggregate_uid=setup_line.getAggregateValue(portal_type=\'Hosting Subscription\').getUid(),\n
sort_on=((\'movement.start_date\', \'ascending\'),))\n
# start date shall be stopped state reach\n
start_date = getWorkflowDate(real_setup_line.getParentValue(), \'stopped\')\n
start_date_tuple_list.append((setup_line.getAggregate(portal_type=\'Hosting Subscription\'), start_date))\n
\n
result = person.Person_updateOpenOrder(src__=src__, remove_hosting_list=remove_hosting_list, add_kw_list=add_kw_list, start_date_tuple_list=start_date_tuple_list, stop_date=stop_date)\n
from pprint import pformat\n
return pformat(result)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
<value> <string>src__=0, modification_date=None, tag=None, stop_date=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_assertCustomTradeConditionAndOpenOrder</string> </value>
<value> <string>Person_storeOpenOrderJournal</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -50,48 +50,81 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from zExceptions import Unauthorized\n
portal = context.getPortalObject()\n
<value> <string encoding="cdata"><![CDATA[
from DateTime import DateTime\n
\n
order = state_change[\'object\']\n
person = context\n
portal = person.getPortalObject()\n
tag = \'%s_updateOpenOrder\' % person.getUid()\n
activate_kw = {\'tag\': tag}\n
if portal.portal_activities.countMessageWithTag(tag) > 0:\n
# nothing to do\n
return\n
\n
setup_service_relative_url = order.portal_preferences.getPreferredInstanceSetupResource()\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
add_kw_kw, modify_kw_kw, hs_modify_kw_kw, remove_id_list = context.Person_getOpenOrderDifference(\n
remove_hosting_list=remove_hosting_list, add_kw_list=add_kw_list,\n
stop_date=stop_date, start_date_tuple_list=start_date_tuple_list)\n
\n
instance_portal_type_list = ["Software Instance","Slave Instance"]\n
for order_line in order.getMovementList():\n
if order_line.getResource() == setup_service_relative_url:\n
computer_partition = order_line.getAggregateValue(portal_type="Computer Partition")\n
if computer_partition is None:\n
if not order.Delivery_isDestinationSectionAllowedToRequest():\n
raise Unauthorized(\'Request disallowed\')\n
software_release = order_line.getAggregateValue(portal_type="Software Release")\n
software_instance = order_line.getAggregateValue(portal_type=instance_portal_type_list)\n
if src__== 1:\n
return add_kw_kw, modify_kw_kw, hs_modify_kw_kw, remove_id_list\n
\n
hosting_subscription = order_line.getAggregateValue(portal_type="Hosting Subscription")\n
open_order_line = portal.portal_catalog.getResultValue(\n
portal_type="Open Sale Order Line",\n
validation_state="validated",\n
aggregate_relative_url=hosting_subscription.getRelativeUrl(),\n
destination_section_relative_url=order.getDestinationSection())\n
if open_order_line is not None:\n
open_order = open_order_line.getParentValue()\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.getUrlString(), software_instance.getSourceReference(),\n
software_instance.getPortalType(), software_instance.getSlaXmlAsDict()])\n
order_line.edit(\n
aggregate_list=order_line.getAggregateList()+[computer_partition_relative_url])\n
</string> </value>
for hs, kw in hs_modify_kw_kw.iteritems():\n
portal.restrictedTraverse(hs).edit(activate_kw=activate_kw, **kw)\n
\n
now = DateTime()\n
previous_open_sale_order = portal.portal_catalog.getResultValue(\n
default_destination_section_uid=person.getUid(),\n
portal_type="Open Sale Order",\n
validation_state="validated")\n
\n
if previous_open_sale_order is None:\n
open_sale_order = portal.open_sale_order_module.newContent(\n
source=\'organisation_module/vifib_internet\',\n
source_section=\'organisation_module/vifib_internet\',\n
destination_section=person.getRelativeUrl(),\n
destination_decision=person.getRelativeUrl(),\n
destination=person.getRelativeUrl(),\n
price_currency=\'currency_module/EUR\',\n
specialise=\'sale_trade_condition_module/vifib_trade_condition\',\n
title="ViFiB Open Order",\n
effective_date=now,\n
activate_kw=activate_kw)\n
open_sale_order.order(activate_kw=activate_kw)\n
open_sale_order.validate(activate_kw=activate_kw)\n
\n
if not(add_kw_kw or modify_kw_kw or remove_id_list):\n
return # nothing to do\n
\n
if previous_open_sale_order is not None:\n
open_sale_order = previous_open_sale_order.Base_createCloneDocument(batch_mode=1)\n
open_sale_order.setEffectiveDate(now, activate_kw=activate_kw)\n
open_sale_order.order(activate_kw=activate_kw)\n
open_sale_order.validate(activate_kw=activate_kw)\n
\n
for kw in add_kw_kw.itervalues():\n
open_sale_order.newContent(activate_kw=activate_kw, **kw)\n
\n
for hs, kw in modify_kw_kw.iteritems():\n
line = [q for q in open_sale_order.contentValues() if q.getAggregate(portal_type=\'Hosting Subscription\') == hs][0]\n
line.edit(activate_kw=activate_kw, **kw)\n
\n
open_sale_order.deleteContent(remove_id_list)\n
if previous_open_sale_order is not None:\n
previous_open_sale_order.setExpirationDate(now, activate_kw=activate_kw)\n
\n
return add_kw_kw, modify_kw_kw, remove_id_list\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
<value> <string>src__=0, remove_hosting_list=None, add_kw_list=None, stop_date=None, start_date_tuple_list=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_assignComputerPartition</string> </value>
<value> <string>Person_updateOpenOrder</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -53,22 +53,58 @@
<value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from zExceptions import Unauthorized\n
\n
def assignComputerPartition(order):\n
portal = context.getPortalObject()\n
\n
setup_service_relative_url = order.portal_preferences.getPreferredInstanceSetupResource()\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
\n
instance_portal_type_list = ["Software Instance","Slave Instance"]\n
for order_line in order.getMovementList():\n
if order_line.getResource() == setup_service_relative_url:\n
computer_partition = order_line.getAggregateValue(portal_type="Computer Partition")\n
if computer_partition is None:\n
if not order.Delivery_isDestinationSectionAllowedToRequest():\n
raise Unauthorized(\'Request disallowed\')\n
software_release = order_line.getAggregateValue(portal_type="Software Release")\n
software_instance = order_line.getAggregateValue(portal_type=instance_portal_type_list)\n
\n
hosting_subscription = order_line.getAggregateValue(portal_type="Hosting Subscription")\n
open_order_line = portal.portal_catalog.getResultValue(\n
portal_type="Open Sale Order Line",\n
validation_state="validated",\n
aggregate_relative_url=hosting_subscription.getRelativeUrl(),\n
destination_section_relative_url=order.getDestinationSection())\n
if open_order_line is not None:\n
open_order = open_order_line.getParentValue()\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.getUrlString(), software_instance.getSourceReference(),\n
software_instance.getPortalType(), software_instance.getSlaXmlAsDict()])\n
order_line.edit(\n
aggregate_list=order_line.getAggregateList()+[computer_partition_relative_url])\n
return computer_partition_relative_url\n
\n
sale_order = context.getParentValue()\n
if sale_order.getSimulationState() == \'ordered\':\n
try:\n
sale_order.Base_checkConsistency()\n
except ValidationFailed:\n
# order not ready yet\n
pass\n
else:\n
try:\n
sale_order.confirm()\n
computer_partition = assignComputerPartition(sale_order)\n
except ValueError:\n
# It was not possible to find free Computer Partition\n
pass\n
except Unauthorized:\n
# user has bad balance\n
pass\n
else:\n
if computer_partition is not None:\n
try:\n
sale_order.Base_checkConsistency()\n
except ValidationFailed:\n
# order not ready yet\n
pass\n
else:\n
sale_order.confirm()\n
</string> </value>
</item>
<item>
......
......@@ -54,10 +54,6 @@
# movement build but not indexed, so do nothing\n
return\n
\n
if context.getResource() == \'service_module/vifib_instance_subscription\':\n
# XXX-Luke: Avoid building until Open Order logic is fixed\n
return\n
\n
root_applied_rule = context.getRootAppliedRule()\n
\n
context.getCausalityValue(portal_type=\'Business Link\').build(path=\'%s/%%\' % root_applied_rule.getPath(), activate_kw={\'tag\': tag})\n
......
......@@ -53,7 +53,7 @@
<value> <string>if context.getPortalType() == \'Sale Order Line\':\n
delivery_line = context\n
else:\n
delivery_line = context.SoftwareInstance_getInstancePackingListLine()\n
delivery_line = context.SoftwareInstance_getInstancePackingListLine(portal_type=["Sale Order Line", "Sale Packing List Line"])\n
\n
if delivery_line is not None:\n
software_release = delivery_line.getAggregateValue(portal_type=\'Software Release\')\n
......
......@@ -74,7 +74,7 @@ else:\n
service_uid_list.append(service.getUid())\n
\n
# Packing List valid state\n
state_list = []\n
state_list = ["ordered"]\n
state_list.extend(portal.getPortalReservedInventoryStateList())\n
state_list.extend(portal.getPortalTransitInventoryStateList())\n
state_list.extend(portal.getPortalCurrentInventoryStateList())\n
......@@ -82,7 +82,7 @@ state_list.extend(portal.getPortalCurrentInventoryStateList())\n
packing_list_line = portal.portal_catalog.getResultValue(\n
portal_type=portal_type,\n
simulation_state=state_list,\n
aggregate_uid=software_instance.getUid(),\n
default_aggregate_uid=software_instance.getUid(),\n
default_resource_uid=service_uid_list,\n
sort_on=((\'movement.start_date\', \'DESC\'),),\n
limit=1,\n
......
......@@ -111,9 +111,6 @@ if (request_hosting_subscription is None):\n
root_software_release_url=software_release_url_string,\n
root_slave=is_slave,\n
root_state=state,\n
periodicity_hour_list=[0],\n
periodicity_minute_list=[0],\n
periodicity_month_day=[1],\n
activate_kw={\'tag\': tag},\n
)\n
request_hosting_subscription.portal_workflow.doActionFor(request_hosting_subscription,\n
......
......@@ -27,15 +27,15 @@
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>Delivery_fixConsistency</string>
</list>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
<list>
<string>Delivery_fixConsistency</string>
</list>
</value>
</item>
<item>
......
......@@ -33,7 +33,9 @@
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
<list>
<string>OpenSaleOrder_fixConsistency</string>
</list>
</value>
</item>
<item>
......@@ -48,13 +50,13 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>assign_computer_partition</string> </value>
<value> <string>OpenSaleOrder_fixConsistency</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>confirm</string>
<string>fixConsistency</string>
</list>
</value>
</item>
......@@ -66,16 +68,14 @@
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Sale Order</string>
<string>Open Sale Order</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<list>
<string>Delivery_assignComputerPartition</string>
</list>
<tuple/>
</value>
</item>
<item>
......
......@@ -27,15 +27,15 @@
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>SoftwareInstnace_fixConsistency</string>
</list>
<tuple/>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
<list>
<string>SoftwareInstance_fixConsistency</string>
</list>
</value>
</item>
<item>
......
......@@ -50,21 +50,17 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
if context.getStopDate() < stop_date:\n
context.setStopDate(stop_date)\n
]]></string> </value>
<value> <string>open_sale_order = state_change[\'object\']\n
open_sale_order.OpenSaleOrder_fixEffectiveExpirationDateConsistency()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>stop_date</string> </value>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>OpenSaleOrderLine_updateStopDate</string> </value>
<value> <string>OpenSaleOrder_fixConsistency</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -51,27 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>person = state_change[\'object\']\n
portal = person.getPortalObject()\n
open_sale_order = portal.portal_catalog.getResultValue(\n
default_destination_section_uid=person.getUid(),\n
portal_type="Open Sale Order",\n
validation_state="validated")\n
\n
tag = \'%s_createOpenOrder\' % person.getUid()\n
kw = {\'activate_kw\': {\'tag\': tag}}\n
if open_sale_order is None:\n
if portal.portal_activities.countMessageWithTag(tag) == 0:\n
open_order = portal.open_sale_order_module.newContent(\n
source=\'organisation_module/vifib_internet\',\n
source_section=\'organisation_module/vifib_internet\',\n
destination_section=person.getRelativeUrl(),\n
destination_decision=person.getRelativeUrl(),\n
destination=person.getRelativeUrl(),\n
price_currency=\'currency_module/EUR\',\n
specialise=\'sale_trade_condition_module/vifib_trade_condition\',\n
title="ViFiB Open Order", **kw)\n
open_order.order(**kw)\n
open_order.validate(**kw)\n
person.Person_updateOpenOrder()\n
</string> </value>
</item>
<item>
......
......@@ -90,9 +90,6 @@ for sale_packing_list_line in portal.portal_catalog(\n
sale_packing_list.deliver()\n
if sale_packing_list.getSimulationState() != \'delivered\':\n
raise ValueError(\'It was not possible to deliver %r during destruction of %r\' % (sale_packing_list.getRelativeUrl(), software_instance.getRelativeUrl()))\n
# Remove unused open sale order line\n
subscription_item = sale_packing_list_line.getAggregateValue(portal_type="Hosting Subscription")\n
subscription_item.HostingSubscription_removeRelatedOpenSaleOrderLine()\n
</string> </value>
</item>
<item>
......
......@@ -59,7 +59,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstnace_fixConsistency</string> </value>
<value> <string>SoftwareInstance_fixConsistency</string> </value>
</item>
</dictionary>
</pickle>
......
599
\ No newline at end of file
660
\ No newline at end of file
......@@ -10,7 +10,7 @@ portal_alarms/vifib_desactivate_dead_computer
portal_alarms/vifib_destroy_non_instanciated_partition
portal_alarms/vifib_lock_person
portal_alarms/vifib_lock_software_instance
portal_alarms/vifib_person_update_open_order
portal_alarms/vifib_trigger_build
portal_alarms/vifib_unlock_person
portal_alarms/vifib_unlock_software_instance
\ No newline at end of file
portal_alarms/vifib_update_open_sale_order_line
\ No newline at end of file
......@@ -4,6 +4,7 @@ Computer Partition | slap_interaction_workflow
Computer | computer_slap_interface_workflow
Computer | slap_interaction_workflow
Internal Packing List | slap_interaction_workflow
Open Sale Order | slap_interaction_workflow
Person | person_slap_interface_workflow
Person | slap_interaction_workflow
Purchase Packing List Line | slap_interaction_workflow
......
<?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>context.getPortalObject().portal_catalog.searchAndActivate(\n
portal_type=\'Open Sale Order\',\n
method_id=\'OpenSaleOrder_deleteContent\'\n
)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_initiateOpenSaleOrderLineDelete</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.getPortalObject().portal_catalog.searchAndActivate(\n
portal_type=\'Applied Rule\',\n
parent_uid=context.getPortalObject().portal_simulation.getUid(),\n
specialise_uid=context.getPortalObject().portal_rules.vifib_subscription_item_rule.getUid(),\n
method_id=\'SubscriptionAppliedRule_delete\'\n
)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_initiateSubscriptionRuleRemoval</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.getPortalObject().portal_catalog.searchAndActivate(\n
method_id=\'SaleOrderLine_migratePriceOne\',\n
**{\n
\'portal_type\': \'Sale Order Line\',\n
\'movement.price\': \'!= 0\'\n
})\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_migrateSaleOrderLinePriceOne</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.getPortalObject().portal_catalog.searchAndActivate(\n
portal_type=\'Open Sale Order Line\',\n
method_id=\'OpenSaleOrderLine_setPriceZero\'\n
)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_setOpenSaleOrderLinePriceZero</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if context.getPortalType() != \'Open Sale Order Line\':\n
raise TypeError(\'%s is not Open Sale Order Line\')\n
if context.getPrice() != 0.0:\n
context.setPrice(0.0)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>OpenSaleOrderLine_setPriceZero</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if context.getPortalType() != \'Open Sale Order\':\n
raise TypeError(\'%s is not Open Sale Order\' % context.getPath())\n
\n
context.deleteContent(list(context.objectIds()))\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>OpenSaleOrder_deleteContent</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if context.getPortalType() != \'Sale Order Line\':\n
raise TypeError(\'%s is not Sale Order Line\' % context.getPath())\n
\n
if context.getPrice() == 0:\n
return\n
\n
context.setPrice(0.0)\n
\n
order_simulation_movement = context.getDeliveryRelatedValue(portal_type=\'Simulation Movement\')\n
\n
order_simulation_movement.setPrice(0.0)\n
for delivery_rule in order_simulation_movement.contentValues():\n
for delivery_simulation_movement in delivery_rule.contentValues():\n
delivery_simulation_movement.setPrice(0.0)\n
delivery_line = delivery_simulation_movement.getDeliveryValue()\n
if delivery_line is not None:\n
delivery_line.setPrice(0.0)\n
for invoice_rule in delivery_simulation_movement.contentValues():\n
for invoice_simulation_movement in invoice_rule.contentValues():\n
invoice_simulation_movement.setPrice(0.0)\n
invoice_line = invoice_simulation_movement.getDeliveryValue()\n
if invoice_line is not None:\n
if invoice_line.getSimulationState() == \'planned\':\n
invoice_line.getParentValue().deleteContent(invoice_line.getId())\n
else:\n
raise TypeError(\'%s is not planned\' % invoice_line.getPath())\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrderLine_migratePriceOne</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -53,7 +53,7 @@
<value> <string>assert(context.getPortalType() == \'Sale Trade Condition\')\n
\n
if context.getTitle() == \'ViFiB Custom Conditions\':\n
assert(len(context.getSpecialiseRelatedValueList()) == 0)\n
assert(len([q for q in context.getSpecialiseRelatedValueList() if q.getPortalType() in context.getPortalDeliveryTypeList()]) == 0)\n
assert(len(context.contentValues()) == 0)\n
context.getParentValue().deleteContent(id=context.getId())\n
</string> </value>
......
......@@ -50,32 +50,25 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>stop_date = None\n
if params is not None:\n
stop_date = params.get(\'stop_date\')\n
from DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate, addToDate\n
<value> <string>if context.getPortalType() != \'Applied Rule\' or context.getParentValue().getId() != \'portal_simulation\' or context.getSpecialise() != \'portal_rules/vifib_subscription_item_rule\':\n
raise TypeError(\'Applied Rule %s does not match constraint\' % context.getPath())\n
\n
if stop_date is None:\n
# generate expected next month\n
stop_date = addToDate(getClosestDate(target_date=DateTime(), precision=\'month\', before=1), month=1)\n
# check that all movements are not delivered\n
\n
context.portal_catalog.searchAndActivate(\n
method_id=\'OpenSaleOrderLine_updateStopDate\',\n
activate_kw={\'tag\':tag},\n
method_kw={\'stop_date\': stop_date},\n
portal_type=\'Open Sale Order Line\')\n
for m in context.contentValues():\n
if m.getDelivery() is not None:\n
raise TypeError(\'Movement %s is already delivered\' % m.getPath())\n
\n
context.activate(after_tag=tag).getId()\n
context.getParentValue().deleteContent(context.getId())\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>tag, fixit, params</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_updateOpenSaleOrderLine</string> </value>
<value> <string>SubscriptionAppliedRule_delete</string> </value>
</item>
</dictionary>
</pickle>
......
75
\ No newline at end of file
80
\ No newline at end of file
......@@ -2,100 +2,97 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Existence Constraint" module="erp5.portal_type"/>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<key> <string>categories</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<string>action_type/object_web_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<key> <string>category</string> </key>
<value> <string>object_web_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<key> <string>description</string> </key>
<value>
<tuple>
<string>quantity</string>
</tuple>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Property quantity must be defined</string> </value>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_existence_constraint</string> </value>
<value> <string>web_view</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Property quantity must be defined</string> </value>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Property quantity must be defined</string> </value>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Existence Constraint</string> </value>
<key> <string>priority</string> </key>
<value> <float>0.5</float> </value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getSimulationState() != \'draft\'</string> </value>
<key> <string>title</string> </key>
<value> <string>Web View</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="PersistentMapping" module="Persistence.mapping"/>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/HostingSubscription_viewAsWeb</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
<key> <string>text</string> </key>
<value> <string>python: object is not None and object.isWebMode()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -70,6 +70,8 @@ else:\n
\n
if paid:\n
result = "Paid"\n
elif context.getTotalPrice() == 0:\n
result = "Free!"\n
else:\n
result = "Waiting for payment"\n
\n
......
......@@ -50,45 +50,27 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># As Open Sale Order codebase is unstable Assignor proxied role script is introduced\n
# to cleanup finialised Open Sale Order Line\n
<value> <string>subscription_item = context\n
portal = context.getPortalObject()\n
\n
if REQUEST is not None:\n
# protect against direct HTTP access, XML-RPC will still work\n
raise ValueError(\'Not available\')\n
from Products.ZSQLCatalog.SQLCatalog import NegatedQuery, Query\n
release = portal.portal_catalog.getResultValue(\n
portal_type="Software Release",\n
url_string=subscription_item.getRootSoftwareReleaseUrl(),\n
)\n
if release is not None:\n
software_product = release.getAggregateValue()\n
return \'%s/index_html\' % software_product.getDefaultImageAbsoluteUrl()\n
\n
portal = context.getPortalObject()\n
all_delivered = True\n
for sale_packing_list_line in portal.portal_catalog(\n
portal_type="Sale Packing List Line", \n
default_aggregate_uid=context.getUid(),\n
simulation_state=NegatedQuery(Query(simulation_state="delivered")),\n
):\n
if sale_packing_list_line.getSimulationState() != \'delivered\':\n
all_delivered = False\n
if all_delivered:\n
open_order_line = context.getAggregateRelatedValue(portal_type="Open Sale Order Line")\n
if open_order_line is not None:\n
# XXX: Mahybe system shall *NOT* work without Open Sale Orders\n
open_order_line.getParentValue().manage_delObjects(open_order_line.getId())\n
return \'\'\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
</tuple>
</value>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>HostingSubscription_removeRelatedOpenSaleOrderLine</string> </value>
<value> <string>HostingSubscription_getDefaultImageAbsoluteUrl</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
subscription_item = context\n
\n
line_list = context.portal_catalog(\n
portal_type=["Sale Order Line", "Sale Packing List Line"],\n
default_resource_uid=portal.restrictedTraverse(context.portal_preferences.getPreferredInstanceSetupResource()).getUid(),\n
default_aggregate_uid=subscription_item.getUid())\n
\n
portal_type_list = ["Software Instance", "Slave Instance"]\n
instance_dict = dict([(x.getAggregate(portal_type=portal_type_list), 0) for x in line_list])\n
return [portal.restrictedTraverse(x) for x in instance_dict.keys()]\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>HostingSubscription_getSoftwareInstanceList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>normal</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_status</string>
<string>listbox_start_button</string>
<string>listbox_destroy_button</string>
<string>listbox_stop_button</string>
<string>listbox_image</string>
<string>listbox_action_button</string>
</list>
</value>
</item>
<item>
<key> <string>normal</string> </key>
<value>
<list>
<string>my_title</string>
<string>listbox</string>
<string>last_event_listbox</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>HostingSubscription_viewAsWeb</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>OpenSaleOrderLine_viewAsWeb</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>enabled</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>last_event_listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_rss_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Last Event</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>columns</string>
<string>editable_columns</string>
<string>list_method</string>
<string>search</string>
<string>select</string>
<string>selection_name</string>
<string>title</string>
<string>url_columns</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>image</string>
<string>Image</string>
</tuple>
<tuple>
<string>status</string>
<string>Status</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>action_button</string>
<string>Action</string>
</tuple>
<tuple>
<string>image</string>
<string>image</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>select</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>software_instance_selection</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>My Software Instances</string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
<value>
<list>
<tuple>
<string>start_button</string>
<string>SoftwareInstance_getStartUrl</string>
</tuple>
<tuple>
<string>stop_button</string>
<string>SoftwareInstance_getStopUrl</string>
</tuple>
<tuple>
<string>destroy_button</string>
<string>SoftwareInstance_getDestroyUrl</string>
</tuple>
</list>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>HostingSubscription_getSoftwareInstanceList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="RawTextAreaField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_action_button</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>nolabel positive widthAuto</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Start</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Start</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>40</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: {\'started\': \'Stop\', \'stopped\': \'Start\'}.get(context.SoftwareInstance_getStatus(), \'\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="RawTextAreaField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_destroy_button</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>nolabel negative widthAuto</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Destroy</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Destroy</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>40</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.SoftwareInstance_getStatus() in (\'started\', \'stopped\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ImageField" module="Products.ERP5Form.ImageField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_image</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_display</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_format</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_resolution</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_display</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_format</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_resolution</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>image_display</string> </key>
<value> <string>thumbnail</string> </value>
</item>
<item>
<key> <string>image_format</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_resolution</string> </key>
<value> <int>75</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>cell/SoftwareInstance_getDefaultImageAbsoluteUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="RawTextAreaField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_start_button</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>nolabel positive widthAuto</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Start</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Start</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>40</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StringField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_status</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Status</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>cell/SoftwareInstance_getStatus</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="RawTextAreaField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_stop_button</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>nolabel negative widthAuto</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Stop</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Stop</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>40</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_section_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python:"<h1>Partitions installed for: %s</h1>" % (context.getTranslatedTitle())
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ZSQLCatalog.SQLCatalog import NegatedQuery, Query\n
\n
portal = context.getPortalObject()\n
person_uid = portal.ERP5Site_getPropertyFromAuthenticatedMemberPersonValue(\'uid\')\n
person_reference = portal.ERP5Site_getPropertyFromAuthenticatedMemberPersonValue(\'reference\')\n
\n
setup_service = portal.restrictedTraverse(portal.portal_preferences.getPreferredInstanceSetupResource())\n
\n
# XXX Owner column should not be used to fetch the list!\n
# Data model of hosting subscription should be fixed to allow direct query\n
hosting_subscription_list = portal.portal_catalog(\n
portal_type="Hosting Subscription",\n
owner=person_reference,\n
)\n
\n
# Only return ongoing hosting subscription\n
return [x for x in hosting_subscription_list if \\\n
(len(portal.portal_catalog(\n
portal_type="Sale Packing List Line",\n
simulation_state=NegatedQuery(Query(simulation_state="delivered")),\n
default_resource_uid=setup_service.getUid(),\n
default_aggregate_uid=x.getUid(),\n
limit=1,\n
)) == 1) or \\\n
(len(portal.portal_catalog(\n
portal_type="Sale Packing List Line",\n
default_resource_uid=setup_service.getUid(),\n
default_aggregate_uid=x.getUid(),\n
limit=1,\n
)) == 0)]\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_getCurrentHostingSubscriptionList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -53,15 +53,9 @@
<value> <string>portal = context.getPortalObject()\n
person_uid = portal.ERP5Site_getPropertyFromAuthenticatedMemberPersonValue(\'uid\')\n
\n
open_order_uid_list = [x.uid for x in portal.portal_catalog(\n
portal_type="Open Sale Order",\n
simulation_state="started",\n
default_destination_section_uid=person_uid)\n
]\n
\n
return portal.portal_catalog(\n
portal_type="Open Sale Order Line",\n
parent_uid=open_order_uid_list,\n
parent_uid=portal.portal_catalog.getResultValue(portal_type=\'Open Sale Order\', default_destination_decision_uid=person_uid, validation_state=\'validated\').getUid(),\n
**kw\n
)\n
</string> </value>
......
......@@ -139,7 +139,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>my_open_order_line_selection</string> </value>
<value> <string>my_current_hosting_subscription_selection</string> </value>
</item>
<item>
<key> <string>target</string> </key>
......@@ -163,7 +163,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>WebSection_getPersonOpenSaleOrderLine</string> </value>
<value> <string>WebSection_getCurrentHostingSubscriptionList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -174,6 +174,14 @@
<key> <string>image_format</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_pre_converted_only</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_quality</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image_resolution</string> </key>
<value> <string></string> </value>
......@@ -297,16 +305,13 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>cell/OpenSaleOrderLine_getDefaultImageAbsoluteUrl</string> </value>
<value> <string>cell/HostingSubscription_getDefaultImageAbsoluteUrl</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -89,6 +89,7 @@
<list>
<string>listbox_getSummaryAsHTML</string>
<string>listbox_getDefaultImageAbsoluteUrl</string>
<string>listbox_hardcoded_description</string>
</list>
</value>
</item>
......
......@@ -94,6 +94,10 @@
<string>getDefaultImageAbsoluteUrl</string>
<string></string>
</tuple>
<tuple>
<string>hardcoded_description</string>
<string>Price</string>
</tuple>
</list>
</value>
</item>
......@@ -149,6 +153,10 @@
<string>getDefaultImageAbsoluteUrl</string>
<string></string>
</tuple>
<tuple>
<string>hardcoded_description</string>
<string></string>
</tuple>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StringField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_hardcoded_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>1€/month</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Price</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -115,6 +115,7 @@
<string>my_login_button</string>
<string>my_join_button</string>
<string>my_order_button</string>
<string>go_to_software</string>
<string>my_pay_button</string>
<string>your_payment_preparation_js</string>
<string>your_payment_in_progress_js</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>default</string>
<string>enabled</string>
<string>href</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>go_to_software</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>href</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string>nolabel alignr</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>More softwares</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_hyperlink</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>href</string> </key>
<value> <string>./myspace/software</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>More softwares</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.portal_membership.isAnonymousUser()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>description</string>
</list>
</value>
......@@ -87,6 +88,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string>nolabel alignr</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Get your own virtual machine for 1€ per month</string> </value>
......
......@@ -143,11 +143,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: not here.portal_membership.isAnonymousUser() and (here.portal_catalog.countResults(portal_type=\'Payment Transaction\', default_destination_section_uid=here.ERP5Site_getAuthenticatedMemberPersonValue().getUid())[0][0] > 1 or (here.portal_catalog.countResults(portal_type=\'Payment Transaction\', default_destination_section_uid=here.ERP5Site_getAuthenticatedMemberPersonValue().getUid())[0][0] == 1 and here.portal_catalog.portal_catalog(portal_type=\'Payment Transaction\', default_destination_section_uid=here.ERP5Site_getAuthenticatedMemberPersonValue().getUid())[0].getSimulationState() not in [\'confirmed\', \'planned\']))
]]></string> </value>
<value> <string>python: not here.portal_membership.isAnonymousUser()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -64,12 +64,6 @@
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -81,7 +75,7 @@
<item>
<key> <string>href</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -138,19 +132,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.portal_membership.isAnonymousUser() and here.ERP5Site_getInitialPlannedPaymentTransaction() is not None</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
......
......@@ -146,9 +146,7 @@
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
......@@ -244,7 +242,7 @@ Registration Payment is begin processed. It will take some time.
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
......@@ -304,17 +302,4 @@ Registration Payment is begin processed. It will take some time.
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.portal_membership.isAnonymousUser() and here.portal_catalog.countResults(portal_type=\'Payment Transaction\', default_destination_section_uid=here.ERP5Site_getAuthenticatedMemberPersonValue().getUid())[0][0] == 1 and here.portal_catalog(portal_type=\'Payment Transaction\', default_destination_section_uid=here.ERP5Site_getAuthenticatedMemberPersonValue().getUid())[0].getSimulationState() == \'confirmed\'</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -146,9 +146,7 @@
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
......@@ -244,7 +242,7 @@ Registration Payment Information are being updated. Please wait a while.
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
......@@ -304,17 +302,4 @@ Registration Payment Information are being updated. Please wait a while.
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.portal_membership.isAnonymousUser() and here.portal_catalog.countResults(portal_type=\'Payment Transaction\', default_destination_section_uid=here.ERP5Site_getAuthenticatedMemberPersonValue().getUid())[0][0] == 0</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
335
\ No newline at end of file
339
\ No newline at end of file
Computer | web_view
Hosting Subscription | web_view
Open Sale Order Line | web_view
Software Instance | web_view
\ No newline at end of file
......@@ -881,9 +881,11 @@ class SlapTool(BaseTool):
if shared:
# XXX: Dirty hack
slave_instance = None
for slave_instance in parameter_dict.get("slave_instance_list", []):
if slave_instance['slave_title'] == partition_reference:
break
if slave_instance is not None:
software_instance._parameter_dict = self._instanceXmlToDict(
slave_instance.pop('xml'))
software_instance._connection_dict = self._instanceXmlToDict(
......
......@@ -198,6 +198,7 @@ class VifibShadowAuthenticationPlugin(BasePlugin):
# get the loggable document from its reference - no security check needed
catalog_result = self.portal_catalog.unrestrictedSearchResults(
portal_type=self.loggable_portal_type_list,
validation_state='validated',
reference=user_name)
if len(catalog_result) != 1: # we won't proceed with groups
if len(catalog_result) > 1: # configuration is screwed
......
......@@ -91,8 +91,8 @@ class testVifibMixin(ERP5TypeTestCase):
'erp5_system_event',
'erp5_secure_payment',
'erp5_payzen_secure_payment',
'erp5_ui_test_core',
'erp5_ui_test',
# 'erp5_ui_test_core',
# 'erp5_ui_test',
'vifib_mysql_innodb_catalog',
'vifib_core',
'vifib_base',
......@@ -102,7 +102,7 @@ class testVifibMixin(ERP5TypeTestCase):
'vifib_forge_release',
'vifib_software_pdm',
'vifib_web',
'vifib_web_ui_test',
# 'vifib_web_ui_test',
'vifib_l10n_fr',
'vifib_data',
'vifib_data_category',
......@@ -111,7 +111,7 @@ class testVifibMixin(ERP5TypeTestCase):
'vifib_data_payzen',
'vifib_data_simulation',
'vifib_erp5',
'vifib_test',
# 'vifib_test',
]
return result
......@@ -375,7 +375,7 @@ class testVifibMixin(ERP5TypeTestCase):
super(testVifibMixin, self).stepTic(**kw)
def stepTic(self, **kw):
def build():
def activateAlarm():
sm = getSecurityManager()
self.login()
try:
......@@ -391,17 +391,17 @@ class testVifibMixin(ERP5TypeTestCase):
if kw.get('sequence', None) is None:
# in case of using not in sequence commit transaction
transaction.commit()
# trigger build before tic
build()
# trigger activateAlarm before tic
activateAlarm()
transaction.commit()
super(testVifibMixin, self).stepTic(**kw)
# retrigger build after tic
build()
# retrigger activateAlarm after tic
activateAlarm()
transaction.commit()
# tic after build
# tic after activateAlarm
super(testVifibMixin, self).stepTic(**kw)
self.checkDivergency()
......@@ -6,7 +6,7 @@ from random import random
from slapos import slap
from zExceptions import Unauthorized
from DateTime import DateTime
from Products.ERP5Type.tests.backportUnittest import expectedFailure
from Products.ERP5Type.tests.backportUnittest import skip
class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
......@@ -386,25 +386,25 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
'planned',
sale_invoice.getSimulationState())
self.assertAlmostEquals(
0.0, sale_invoice.getTotalPrice(), 3)
0.836, sale_invoice.getTotalPrice(), 3)
# 1 invoice line is expected
invoice_line_list = sale_invoice.contentValues(
portal_type="Invoice Line")
self.assertEquals(1, len(invoice_line_list))
self.assertEquals(2, len(invoice_line_list))
service_line = [x for x in invoice_line_list \
if x.getResource() == 'service_module/vifib_instance_setup'][0]
# subscription_line = [x for x in invoice_line_list \
# if x.getResource() == 'service_module/vifib_instance_subscription'][0]
subscription_line = [x for x in invoice_line_list \
if x.getResource() == 'service_module/vifib_instance_subscription'][0]
self.assertEquals(True, service_line.hasPrice())
self.assertAlmostEquals(0, service_line.getPrice(), 3)
self.assertEquals(1, service_line.getQuantity())
# self.assertEquals(True, subscription_line.hasPrice())
# self.assertAlmostEquals(0.836, subscription_line.getPrice(), 3)
# self.assertEquals(1, subscription_line.getQuantity())
self.assertEquals(True, subscription_line.hasPrice())
self.assertAlmostEquals(0.836, subscription_line.getPrice(), 3)
self.assertEquals(1, subscription_line.getQuantity())
# 0 transaction line
transaction_line_list = sale_invoice.contentValues(
......@@ -962,8 +962,6 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
self.assertEquals('account_module/bank', sale_line.getSource())
self.assertEquals('account_module/bank', sale_line.getDestination())
@expectedFailure
# Hosting subscription is disabled, so scenarios are irrelevant
def test_default_use_case(self):
"""Test full default use case.
......@@ -1037,7 +1035,15 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
SlapLoginCurrentComputer \
SoftwareInstanceDestroyed \
Tic \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckComputerPartitionInstanceCleanupSalePackingListDelivered \
CheckComputerPartitionIsFree \
CheckOpenOrderLineRemoved \
Logout \
\
LoginWebUser \
CheckDestroyOngoingInvoice \
SlapLogout \
......@@ -1051,23 +1057,15 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
LoginWebUser \
CheckWaitingInvoice \
Tic \
CheckNoNewPayment \
PayRegistrationPayment \
Tic \
CheckPaidInvoice \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
# PayRegistrationPayment \
# Tic \
# CheckPaidInvoice \
def stepCheckNoNewPayment(self, sequence, **kw):
"""
"""
self.assertEqual(None, self.portal.portal_catalog.getResultValue(
portal_type="Payment Transaction",
simulation_state="planned"))
def stepCheckComplexInvoice(self, sequence, **kw):
"""
......@@ -1250,8 +1248,6 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
self.assertEquals('account_module/bank', sale_line.getSource())
self.assertEquals('account_module/bank', sale_line.getDestination())
@expectedFailure
# Hosting subscription is disabled, so scenarios are irrelevant
def test_aggregated_use_case(self):
"""Test a more complex use case with many packing list agregated
"""
......@@ -1316,7 +1312,15 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
SlapLoginCurrentComputer \
SoftwareInstanceDestroyed \
Tic \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckComputerPartitionInstanceCleanupSalePackingListDelivered \
CheckComputerPartitionIsFree \
CheckOpenOrderLineRemoved \
Logout \
\
' + \
self.create_new_user_instance_sequence_string + '\
SlapLoginCurrentComputer \
......@@ -1349,8 +1353,14 @@ class TestVifibDefaultUseCase(TestVifibSlapWebServiceMixin):
SlapLoginCurrentComputer \
SoftwareInstanceDestroyed \
Tic \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckComputerPartitionInstanceCleanupSalePackingListDelivered \
CheckComputerPartitionIsFree \
CheckOpenOrderLineRemoved \
Logout \
\
LoginERP5TypeTestCase \
ConfirmOngoingInvoice \
......
import unittest
from Products.ERP5Type.tests.Sequence import SequenceList
from testVifibSlapWebService import TestVifibSlapWebServiceMixin
from Products.ERP5Type.DateUtils import getClosestDate
from Products.ERP5Type.DateUtils import getClosestDate, addToDate
from DateTime import DateTime
from testVifibOpenOrderSimulation import generateTimeFrameList
from Products.ERP5Type.tests.backportUnittest import expectedFailure
class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
......@@ -19,20 +17,27 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
# is next month covered?
self.assertEqual(1, len(delivery_list))
# generate the expected time frames
now = DateTime()
start_date = \
getClosestDate(target_date=now, precision='day', before=1)
# Calculate the list of time frames
expected_time_frame_list = generateTimeFrameList(start_date)
instance_setup_delivery = self.portal.portal_catalog.getResultValue(
portal_type='Sale Packing List Line',
default_aggregate_uid=sequence['software_instance_uid'],
resource=self.portal.portal_preferences\
.getPreferredInstanceSetupResource()).getParentValue()
self.assertEqual('stopped', instance_setup_delivery.getSimulationState())
start_date = None
for item in self.portal.portal_workflow.getInfoFor(
ob=instance_setup_delivery, name='history', wf_id='packing_list_workflow'):
if item.get('simulation_state') == 'stopped':
start_date = item.get('time')
break
start_date = getClosestDate(target_date=start_date, precision='day')
while start_date.day() >= 29:
start_date = addToDate(start_date, to_add={'day': -1})
stop_date = addToDate(start_date, to_add={'month': 1})
idx = 0
for delivery in delivery_list:
expected_start_date = expected_time_frame_list[idx]
expected_stop_date = expected_time_frame_list[idx+1]
self.assertEqual(expected_start_date, delivery.getStartDate())
self.assertEqual(expected_stop_date, delivery.getStopDate())
self.assertEqual(start_date, delivery.getStartDate())
self.assertEqual(stop_date, delivery.getStopDate())
self.assertEqual(hosting_subscription.getRelativeUrl(),
delivery.getCausality())
......@@ -63,8 +68,10 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
# fetch open order, open order line and subscription
person = self.portal.person_module['test_vifib_customer']
open_order = \
person.getDestinationDecisionRelatedValue(portal_type="Open Sale Order")
open_order = self.portal.portal_catalog.getResultValue(
default_destination_decision_uid=person.getUid(),
portal_type="Open Sale Order",
validation_state='validated')
open_order_line = \
open_order.contentValues(portal_type="Open Sale Order Line")[0]
......@@ -551,8 +558,6 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
uid=sequence['invoice_uid'])
invoice.setStartDate(getClosestDate(target_date=DateTime())-1)
@expectedFailure
# Subscription deliveries are not build for now.
def test_OpenOrder_sale_packing_list(self):
"""
Check that sale_packing_list is generated properly from simulation
......
import unittest
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.DateUtils import getClosestDate, addToDate
from Products.ERP5Type.DateUtils import getClosestDate, addToDate, getNumberOfDayInMonth
from testVifibSlapWebService import TestVifibSlapWebServiceMixin
from Products.ERP5Type.tests.backportUnittest import expectedFailure
from DateTime.DateTime import DateTime
def generateTimeFrameList(start_date):
expected_time_frame_list = [start_date]
current = \
getClosestDate(target_date=start_date, precision='month', before=0)
for m in range(0, 12):
expected_time_frame_list.append(addToDate(current, month=m))
return expected_time_frame_list
class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
def stepCheckSimulationMovement(self, sequence, **kw):
# find related documents: open order, open order line,
# subscription item, etc.
person = self.portal.person_module['test_vifib_customer']
open_order = \
person.getDestinationDecisionRelatedValue(portal_type="Open Sale Order")
open_order = self.portal.portal_catalog.getResultValue(
default_destination_decision_uid=person.getUid(),
validation_state='validated',
portal_type="Open Sale Order")
open_order_line_list = \
open_order.contentValues(portal_type="Open Sale Order Line")
self.assertEquals(1, len(open_order_line_list))
......@@ -34,6 +27,26 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
"portal_rules/vifib_subscription_item_rule",
applied_rule.getSpecialise())
# check start date and stop date of the subscription item,
# currently there is 1 month
instance_setup_delivery = self.portal.portal_catalog.getResultValue(
portal_type='Sale Packing List Line',
default_aggregate_uid=sequence['software_instance_uid'],
resource=self.portal.portal_preferences\
.getPreferredInstanceSetupResource()).getParentValue()
self.assertEqual('stopped', instance_setup_delivery.getSimulationState())
start_date = None
for item in self.portal.portal_workflow.getInfoFor(
ob=instance_setup_delivery, name='history', wf_id='packing_list_workflow'):
if item.get('simulation_state') == 'stopped':
start_date = item.get('time')
break
start_date = getClosestDate(target_date=start_date, precision='day')
while start_date.day() >= 29:
start_date = addToDate(start_date, to_add={'day': -1})
stop_date = addToDate(start_date, to_add={'month': 1})
# check periodicity, should be first day of each month
self.assertEquals(
None, hosting_subscription.getPeriodicityMinuteFrequency())
......@@ -48,47 +61,12 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
self.assertEquals(
None, hosting_subscription.getPeriodicityMonthFrequency())
self.assertEquals(
[1], hosting_subscription.getPeriodicityMonthDayList())
[start_date.day()], hosting_subscription.getPeriodicityMonthDayList())
self.assertEquals(
None, hosting_subscription.getPeriodicityWeekFrequency())
# check start date and stop date of the subscription item,
# currently there is 1 month
now = DateTime()
start_date = \
getClosestDate(target_date=now, precision='day', before=1)
self.assertEquals(
start_date.year(), open_order_line.getStartDate().year())
self.assertEquals(
start_date.month(), open_order_line.getStartDate().month())
self.assertEquals(
start_date.day(), open_order_line.getStartDate().day())
self.assertEquals(
0, open_order_line.getStartDate().hour())
self.assertEquals(
0, open_order_line.getStartDate().minute())
self.assertEquals(
0.0, open_order_line.getStartDate().second())
stop_date = addToDate(
getClosestDate(target_date=now, precision='month', before=1), month=1)
self.assertEquals(
stop_date.year(), open_order_line.getStopDate().year())
self.assertEquals(
stop_date.month(), open_order_line.getStopDate().month())
self.assertEquals(
stop_date.day(), open_order_line.getStopDate().day())
self.assertEquals(
0, open_order_line.getStopDate().hour())
self.assertEquals(
0, open_order_line.getStopDate().minute())
self.assertEquals(
0.0, open_order_line.getStopDate().second())
# Calculate the list of time frames
expected_time_frame_list = generateTimeFrameList(start_date)
# test the test: have we generated 12th next months coverage?
self.assertEqual(13, len(expected_time_frame_list))
self.assertEqual(start_date, open_order_line.getStartDate())
self.assertEqual(stop_date, open_order_line.getStopDate())
simulation_movement_list = self.portal.portal_catalog(
portal_type='Simulation Movement',
......@@ -102,8 +80,6 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
# Check the list of expected simulation
idx = 0
for simulation_movement in simulation_movement_list:
expected_start_date = expected_time_frame_list[idx]
expected_stop_date = expected_time_frame_list[idx+1]
# Check simulation movement property
self.assertEquals(1.0,
simulation_movement.getQuantity())
......@@ -141,8 +117,8 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
self.assertEquals(None,
simulation_movement.getAggregate(
portal_type="Software Release"))
self.assertEqual(expected_start_date, simulation_movement.getStartDate())
self.assertEqual(expected_stop_date, simulation_movement.getStopDate())
self.assertEqual(start_date, simulation_movement.getStartDate())
self.assertEqual(stop_date, simulation_movement.getStopDate())
# delivered already
self.assertNotEqual(None, simulation_movement.getDelivery())
......@@ -158,21 +134,23 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
idx += 1
def stepIncreaseOpenOrderCoverage(self, sequence, **kw):
self.portal.portal_alarms.vifib_update_open_sale_order_line.Alarm_updateOpenSaleOrderLine(
'test_tag', False,
{'stop_date': addToDate(getClosestDate(target_date=DateTime(),
self.portal.portal_alarms.vifib_person_update_open_order.\
Alarm_updatePersonOpenOrder(
tag='test_tag', fixit=False,
params={'stop_date': addToDate(getClosestDate(target_date=DateTime(),
precision='month', before=1), month=3)})
def stepCheckThreeTopLevelSimulationMovement(self, sequence, **kw):
person = self.portal.person_module['test_vifib_customer']
open_order = \
person.getDestinationDecisionRelatedValue(portal_type="Open Sale Order")
open_order_line_list = \
open_order.contentValues(portal_type="Open Sale Order Line")
self.assertEquals(1, len(open_order_line_list))
open_order_line = open_order_line_list[0]
hosting_subscription = \
open_order_line.getAggregateValue(portal_type="Hosting Subscription")
hosting_subscription = self.portal.portal_catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
# 3 open order lines:
# * one without dates
# * one with start date and stop date
# * one with stop date extended by test
self.assertEqual(3, self.portal.portal_catalog.countResults(
default_aggregate_uid=sequence['hosting_subscription_uid'],
portal_type='Open Sale Order Line')[0][0]
)
applied_rule = \
hosting_subscription.getCausalityRelatedValue(portal_type="Applied Rule")
self.assertEquals(
......@@ -187,8 +165,6 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
self.assertEquals(3,
len(simulation_movement_list))
@expectedFailure
# Subscription deliveries are not build for now.
def test_OpenOrder_request_changeSoftwareType(self):
"""
Check that requesting the same instance with a different software type
......@@ -199,6 +175,7 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
sequence_string = \
self.prepare_installed_computer_partition_sequence_string + """
LoginERP5TypeTestCase
Tic # in order to update simulation
CheckSimulationMovement
Tic
SlapLogout
......@@ -210,22 +187,29 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
Logout
LoginTestVifibCustomer
RequestSoftwareInstanceStart
RequestSoftwareInstanceDestroy
Tic
Logout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListConfirmed
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
Logout
SlapLoginCurrentComputer
SoftwareInstanceStarted
SoftwareInstanceDestroyed
Tic
Tic # in order to update Open Order
SlapLogout
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListStarted
CheckComputerPartitionInstanceCleanupSalePackingListDelivered
CheckComputerPartitionIsFree
CheckOpenOrderLineRemoved
Logout
LoginERP5TypeTestCase
Tic # in order to call update simulation alarm of open order
Tic
CheckThreeTopLevelSimulationMovement
CheckSiteConsistency
Logout
"""
......
......@@ -123,9 +123,7 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web
vifib_web_ui_test
erp5_km
erp5_km_theme
erp5_knowledge_pad
......@@ -179,8 +177,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -220,9 +216,7 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web
vifib_web_ui_test
erp5_free_fiber_request
erp5_km
erp5_km_theme
......@@ -277,8 +271,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -319,9 +311,7 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web
vifib_web_ui_test
erp5_km
erp5_km_theme
erp5_knowledge_pad
......@@ -375,8 +365,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -413,8 +401,6 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web_ui_test
erp5_km
erp5_knowledge_pad
erp5_simulation
......@@ -467,8 +453,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -504,8 +488,6 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web_ui_test
erp5_km
erp5_knowledge_pad
erp5_simulation
......@@ -558,8 +540,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -595,9 +575,7 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web
vifib_web_ui_test
erp5_free_fiber_request
erp5_km
erp5_knowledge_pad
......@@ -652,8 +630,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -690,8 +666,6 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web_ui_test
erp5_km
erp5_km_theme
erp5_knowledge_pad
......@@ -746,8 +720,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -784,8 +756,6 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web_ui_test
erp5_commerce_multiflex_layout
erp5_km
erp5_knowledge_pad
......@@ -838,8 +808,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -875,8 +843,6 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web_ui_test
erp5_km
erp5_web_download_theme
erp5_knowledge_pad
......@@ -929,8 +895,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......@@ -965,8 +929,6 @@ vifib_payzen
vifib_simulation
vifib_slap
vifib_software_pdm
vifib_test
vifib_web_ui_test
erp5_rss_style
erp5_km
erp5_knowledge_pad
......@@ -1019,8 +981,6 @@ erp5_system_event
erp5_tax_resource
erp5_toolbox
erp5_trade
erp5_ui_test
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
......
......@@ -1193,7 +1193,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance
SoftwareInstanceSaleOrderConfirmRaisesValueError
SoftwareInstanceSaleOrderLineNoPartitionFound
Logout
SlapLoginTestVifibCustomer
......@@ -1202,7 +1202,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout
LoginDefaultUser
SoftwareInstanceSaleOrderConfirmRaisesValueError
SoftwareInstanceSaleOrderLineNoPartitionFound
Logout
LoginERP5TypeTestCase
......
......@@ -325,6 +325,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
\
LoginTestVifibCustomer \
PersonRequestSlaveInstance \
Tic \
SlapLogout \
\
LoginDefaultUser \
......@@ -353,6 +354,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
\
LoginTestVifibCustomer \
PersonRequestSlaveInstance \
Tic \
SlapLogout \
\
LoginDefaultUser \
......
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.tests.backportUnittest import expectedFailure
from Products.ERP5Type.tests.backportUnittest import skip
import urllib
import urlparse
......@@ -620,6 +621,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_SlaveInstance_twiceDifferentParent(self):
"""
Checks that requesting a Slave Instance twice with same arguments from
......@@ -966,6 +968,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
########################################
# ComputerPartition.request - slave
########################################
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_slave_simpleCase(self):
"""
Check the most simple case of request. The behaviour should
......@@ -996,6 +999,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_slave_instantiate(self):
"""
Check that one Slave Instance is instantiate correctly and the validate
......@@ -1055,6 +1059,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_slave_same_twice_SR(self):
"""
Check that requesting the same slave instance twice, only one is created
......@@ -1095,6 +1100,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_slave_after_destroy_SlaveInstance(self):
"""
Check that a Slave Instance will not be allocated when a Software
......@@ -1117,7 +1123,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic
LoginDefaultUser
SelectSlaveInstanceFromSaleOrderOrdered
SoftwareInstanceSaleOrderConfirmRaisesValueError
SoftwareInstanceSaleOrderLineNoPartitionFound
ConfirmOrderedSaleOrderActiveSense
Tic
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
......@@ -1133,6 +1139,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_slave_twice_different(self):
"""
Check request 2 different slave instances on same Software
......@@ -1172,6 +1179,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_slave_NotFound(self):
"""
Check that requesting a Slave Instance works in system capable to fulfill
......@@ -1201,6 +1209,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
self.stepDirectRequestComputerPartitionHttpRequestTimeoutResponseWithoutState(
sequence, **kw)
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_slave_state_is_optional(self):
"""Checks that state is optional parameter on Slap Tool This ensures
backward compatibility with old libraries."""
......@@ -1223,6 +1232,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence['requested_filter_dict'] = dict(
computer_guid="COMP-99999999999999999999999")
@skip('Slaves are disabled for now')
def test_ComputerPartition_request_filter_slave_computer_guid(self):
"""Check that requesting with filter computer_guid key works as expected.
......@@ -1243,7 +1253,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \
LoginDefaultUser \
SelectSlaveInstanceFromSaleOrderOrdered \
SoftwareInstanceSaleOrderConfirmRaisesValueError \
SoftwareInstanceSaleOrderLineNoPartitionFound \
Tic \
CheckComputerPartitionInstanceSetupSalePackingListConfirmed \
Logout \
......@@ -1298,6 +1308,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
self.assertEquals(sequence["slave_instance_site_url"],
slave_instance.getConnectionParameter("site_url"))
@skip('Slaves are disabled for now')
def test_SlaveInstance_request_SlaveInstance_From_SoftwareInstance(self):
"""
Check that existing Software Instance can request new Slave Instance
......@@ -1389,6 +1400,8 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
@expectedFailure
# slave_instance_list is disabled in getInstanceParameterDict
def test_SlaveInstance_request_SlaveInstance_From_SoftwareInstance_Fetch_Correct_Slave(self):
"""
Check that existing Software Instance requesting new Slave Instance
......
......@@ -63,7 +63,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance
SoftwareInstanceSaleOrderConfirmRaisesValueError
SoftwareInstanceSaleOrderLineNoPartitionFound
Logout
LoginERP5TypeTestCase
......
......@@ -177,6 +177,32 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
########################################
# Steps -- scenarios
########################################
def stepCheckOpenOrderLineRemoved(self, sequence, **kw):
software_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
hosting_subscription = software_instance.getAggregateRelatedValue(
portal_type='Sale Packing List Line').getAggregateValue(
portal_type='Hosting Subscription')
# shall be not present on any validted open order
validated_open_order_line = self.portal.portal_catalog.getResultValue(
portal_type='Open Sale Order Line', validation_state='validated',
default_aggregate_uid=hosting_subscription.getUid())
self.assertEqual(None, validated_open_order_line)
# shall be present on the latest archived open order
reference = self.portal.portal_catalog.getResultValue(
portal_type='Open Sale Order Line',
default_aggregate_uid=hosting_subscription.getUid())\
.getParentValue().getReference()
open_sale_order = self.portal.portal_catalog.getResultValue(
portal_type='Open Sale Order',
reference=reference,
validation_state='archived',
sort_on=(('effective_date', 'descending'),)
)
self.assertTrue(hosting_subscription.getRelativeUrl() in \
[q.getAggregate(portal_type='Hosting Subscription') for q in \
open_sale_order.contentValues(portal_type='Open Sale Order Line')])
def stepRequestComputerPartitionNoTic(self, sequence, **kw):
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
......@@ -313,14 +339,11 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
portal_type='Sale Order Line').getAggregateValue(
portal_type='Hosting Subscription').getUid())
def stepSoftwareInstanceSaleOrderConfirmRaisesValueError(self, sequence,
def stepSoftwareInstanceSaleOrderLineNoPartitionFound(self, sequence,
**kw):
"""Checks that current software instance is realted only with sale order
and that this sale order cannot be confirmed
In Vifib implementation sale order which cannot find free computer partition
raises ValueError"""
and that no partition is found
"""
software_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
......@@ -332,9 +355,10 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
self.assertTrue(self.sale_order_line_portal_type in [q.getPortalType() for\
q in aggregate_value_list])
sale_order_line = aggregate_value_list[0]
sale_order = sale_order_line.getParentValue()
self.assertRaises(ValueError, sale_order.confirm)
self.assertNotEqual('confirmed', sale_order_line.getSimulationState())
sale_order_line.SaleOrderLine_tryToAllocatePartition()
self.assertNotEqual('confirmed', sale_order_line.getSimulationState())
def stepCheckViewCurrentSoftwareInstance(self, sequence, **kw):
software_instance = self.portal.portal_catalog.getResultValue(
......@@ -376,7 +400,10 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition = self.portal.portal_catalog.getResultValue(
uid=sequence['computer_partition_uid'])
delivery_line_list = [q.getObject() for q in self.portal.portal_catalog(
aggregate_relative_url=computer_partition.getRelativeUrl(),
default_aggregate_uid=ComplexQuery(
Query(default_aggregate_uid=computer_partition.getUid()),
Query(default_aggregate_uid=sequence['software_instance_uid']),
operator="AND"),
portal_type=self.sale_packing_list_line_portal_type,
simulation_state=state,
resource_relative_url=resource)]
......@@ -1091,11 +1118,13 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
SlapLoginCurrentComputer \
SoftwareInstanceDestroyed \
Tic \
Tic \
SlapLogout \
\
LoginDefaultUser \
CheckComputerPartitionInstanceCleanupSalePackingListDelivered \
CheckComputerPartitionIsFree \
CheckOpenOrderLineRemoved \
Logout \
'
......@@ -2115,9 +2144,10 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Base.serialize = verify_serialize_call
try:
sale_order_ordered = self.portal.portal_catalog.getResultValue(
portal_type="Sale Order", simulation_state="ordered")
self.assertRaises(DummyTestException, sale_order_ordered.confirm)
sale_order_line_ordered = self.portal.portal_catalog.getResultValue(
portal_type="Sale Order Line", simulation_state="ordered")
self.assertRaises(DummyTestException,
sale_order_line_ordered.SaleOrderLine_tryToAllocatePartition)
finally:
Base.serialize = Base.serialize_call
......@@ -2765,6 +2795,7 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
line = order.newContent(
portal_type=self.sale_packing_list_line_portal_type,
quantity=1,
price=1
)
sequence.edit(sale_packing_list_line_uid=line.getUid())
......@@ -3454,16 +3485,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_uid = sequence["computer_partition_uid"]
computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid)
hosting_date = DateTime()
setup_date = hosting_date + 1
hosting_date = DateTime() - 1
for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.sale_packing_list_line_portal_type):
if movement.getResource() == \
movement.portal_preferences.getPreferredInstanceHostingResource():
movement.edit(start_date=hosting_date)
elif movement.getResource() == \
movement.portal_preferences.getPreferredInstanceSetupResource():
movement.edit(start_date=setup_date)
def stepCheckPackingListAmountTwoComputerPartition(self, sequence, **kw):
computer_partition_uid = sequence["computer_partition_uid"]
......@@ -3479,16 +3506,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_uid = sequence["computer_partition_uid"]
computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid)
setup_date = DateTime()
hosting_date = setup_date + 1
hosting_date = DateTime() + 1
for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.sale_packing_list_line_portal_type):
if movement.getResource() == \
movement.portal_preferences.getPreferredInstanceHostingResource():
movement.edit(start_date=hosting_date)
elif movement.getResource() == \
movement.portal_preferences.getPreferredInstanceSetupResource():
movement.edit(start_date=setup_date)
def stepSetPurchasePackingListLineSetupResource(self, sequence, **kw):
"""
......@@ -3508,16 +3531,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_uid = sequence["computer_uid"]
computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid)
hosting_date = DateTime()
setup_date = hosting_date + 1
hosting_date = DateTime() - 1
service_uid = sequence['service_uid']
for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.purchase_packing_list_line_portal_type):
if movement.getResourceUid() == service_uid:
movement.edit(start_date=hosting_date)
elif movement.getResource() == \
movement.portal_preferences.getPreferredSoftwareSetupResource():
movement.edit(start_date=setup_date)
def stepSetAccountingAfterSetupStartDate(self, sequence, **kw):
"""
......@@ -3526,16 +3545,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_uid = sequence["computer_uid"]
computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid)
setup_date = DateTime()
hosting_date = setup_date + 1
hosting_date = DateTime() + 1
service_uid = sequence['service_uid']
for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.sale_packing_list_line_portal_type):
if movement.getResourceUid() == service_uid:
movement.edit(start_date=hosting_date)
elif movement.getResource() == \
movement.portal_preferences.getPreferredSoftwareSetupResource():
movement.edit(start_date=setup_date)
def _checkComputerPartitionAndRelatedSoftwareInstance(self,
computer_partition):
......
......@@ -28,7 +28,6 @@
##############################################################################
import unittest
from VifibMixin import testVifibMixin
from Products.ERP5Type.tests.backportUnittest import expectedFailure
HTTP_OK = 200
MOVED_TEMPORARILY = 302
......@@ -71,7 +70,6 @@ class TestVifibWebSite(testVifibMixin):
response.getHeader('content-type'))
self.assertTrue("Website is under construction..." in response.getBody())
@expectedFailure
def test_04_checkHostingAccess(self):
"""
Test Hosting Access
......
......@@ -346,8 +346,10 @@ class ComputerPartition(SlapDocument):
software_instance.slap_computer_partition_id.encode('UTF-8'))
if shared:
computer_partition._synced = True
computer_partition._connection_dict = software_instance._connection_dict
computer_partition._parameter_dict = software_instance._parameter_dict
computer_partition._connection_dict = getattr(software_instance,
'_connection_dict', None)
computer_partition._parameter_dict = getattr(software_instance,
'_parameter_dict', None)
return computer_partition
def building(self):
......
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