Commit e22873bd by Łukasz Nowak

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

2 parents db127598 fcb5a781
Showing 49 changed files with 1474 additions and 38 deletions
......@@ -13,5 +13,6 @@
<item>SoftwareInstance</item>
<item>SoftwareInstanceConstraint</item>
<item>TextDocument</item>
<item>VariationRange</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
......@@ -86,6 +86,12 @@
<value> <string>SoftwareInstance</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
......
<?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>left</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>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_link</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_viewWorklist</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>ERP5Site_viewWorklist</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</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>Worklists</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>
erp5_computer_immobilisation
erp5_software_pdm
\ No newline at end of file
erp5_software_pdm
erp5_knowledge_pad
erp5_rss_style
\ No newline at end of file
350
\ No newline at end of file
352
\ No newline at end of file
......@@ -6,4 +6,5 @@ Slave Instance | TextDocument
Software Instance | Reference
Software Instance | SoftwareInstance
Software Instance | SoftwareInstanceConstraint
Software Instance | TextDocument
\ No newline at end of file
Software Instance | TextDocument
Software Instance | VariationRange
\ No newline at end of file
......@@ -11,4 +11,16 @@
<portal_type id="Hosting Subscription Module">
<item>Hosting Subscription</item>
</portal_type>
<portal_type id="Subscription Item Root Simulation Rule">
<item>Accounting Rule Cell</item>
<item>Category Membership Divergence Tester</item>
<item>DateTime Divergence Tester</item>
<item>Float Divergence Tester</item>
<item>Mapped Property</item>
<item>Net Converted Quantity Divergence Tester</item>
<item>Predicate</item>
<item>Specialise Divergence Tester</item>
<item>String Divergence Tester</item>
<item>Variation Divergence Tester</item>
</portal_type>
</allowed_content_type_list>
\ No newline at end of file
......@@ -51,6 +51,8 @@
<item>
<key> <string>_body</string> </key>
<value> <string>def getRelatedTradeConditionList(trade_condition):\n
if trade_condition is None:\n
return []\n
related_trade_condition_list = trade_condition.getSpecialiseValueList(\n
portal_type=(\'Sale Trade Condition\', \'Purchase Trade Condition\'))\n
for related_trade_condition in trade_condition.getSpecialiseValueList(\n
......
138
\ No newline at end of file
140
\ No newline at end of file
......@@ -5,4 +5,14 @@ Delivery Simulation Rule | Net Converted Quantity Divergence Tester
Delivery Simulation Rule | Specialise Divergence Tester
Delivery Simulation Rule | String Divergence Tester
Delivery Simulation Rule | Variation Divergence Tester
Hosting Subscription Module | Hosting Subscription
\ No newline at end of file
Hosting Subscription Module | Hosting Subscription
Subscription Item Root Simulation Rule | Accounting Rule Cell
Subscription Item Root Simulation Rule | Category Membership Divergence Tester
Subscription Item Root Simulation Rule | DateTime Divergence Tester
Subscription Item Root Simulation Rule | Float Divergence Tester
Subscription Item Root Simulation Rule | Mapped Property
Subscription Item Root Simulation Rule | Net Converted Quantity Divergence Tester
Subscription Item Root Simulation Rule | Predicate
Subscription Item Root Simulation Rule | Specialise Divergence Tester
Subscription Item Root Simulation Rule | String Divergence Tester
Subscription Item Root Simulation Rule | Variation Divergence Tester
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_form_id</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>catalog_query_string</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>module_list</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>lines</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_activateCheckConsistency</string> </value>
</item>
<item>
<key> <string>alarm_notification_mode</string> </key>
<value>
<tuple>
<string>problem</string>
</tuple>
</value>
</item>
<item>
<key> <string>catalog_query_string</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/person_module/3</string>
</tuple>
</value>
</item>
<item>
<key> <string>configuration_form_id</string> </key>
<value> <string>Alarm_viewConsistencyCheckConfiguration</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>vifib_check_consistency</string> </value>
</item>
<item>
<key> <string>module_list</string> </key>
<value>
<tuple>
<string>organisation_module</string>
<string>currency_module</string>
<string>notification_message_module</string>
<string>person_module</string>
<string>query_module</string>
<string>internal_supply_module</string>
<string>component_module</string>
<string>sale_supply_module</string>
<string>purchase_supply_module</string>
<string>quantity_unit_conversion_module</string>
<string>product_module</string>
<string>service_module</string>
<string>transformation_module</string>
<string>purchase_trade_condition_module</string>
<string>returned_sale_packing_list_module</string>
<string>internal_order_module</string>
<string>returned_purchase_packing_list_module</string>
<string>purchase_packing_list_module</string>
<string>business_process_module</string>
<string>sale_order_module</string>
<string>sale_packing_list_module</string>
<string>internal_packing_list_module</string>
<string>purchase_order_module</string>
<string>inventory_module</string>
<string>sale_trade_condition_module</string>
<string>internal_trade_condition_module</string>
<string>service_report_module</string>
<string>item_module</string>
<string>support_request_module</string>
<string>event_module</string>
<string>meeting_module</string>
<string>sale_opportunity_module</string>
<string>campaign_module</string>
<string>glossary_module</string>
<string>bug_module</string>
<string>open_purchase_order_module</string>
<string>open_sale_order_module</string>
<string>open_internal_order_module</string>
<string>web_page_module</string>
<string>web_site_module</string>
<string>external_source_module</string>
<string>image_module</string>
<string>document_module</string>
<string>document_ingestion_module</string>
<string>knowledge_pad_module</string>
<string>accounting_module</string>
<string>account_module</string>
<string>computer_module</string>
<string>tax_module</string>
<string>discount_module</string>
<string>project_module</string>
<string>task_report_module</string>
<string>task_module</string>
<string>requirement_module</string>
<string>credential_request_module</string>
<string>credential_recovery_module</string>
<string>credential_update_module</string>
<string>system_event_module</string>
<string>software_publication_module</string>
<string>software_product_module</string>
<string>software_licence_module</string>
<string>software_release_module</string>
<string>free_fiber_request_module</string>
<string>software_instance_module</string>
<string>hosting_subscription_module</string>
</tuple>
</value>
</item>
<item>
<key> <string>periodicity_day_frequency</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple>
<int>0</int>
</tuple>
</value>
</item>
<item>
<key> <string>periodicity_hour_frequency</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple>
<int>0</int>
</tuple>
</value>
</item>
<item>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>1</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>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1230768000.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_week_day</string> </key>
<value>
<tuple>
<string>Sunday</string>
</tuple>
</value>
</item>
<item>
<key> <string>periodicity_week_frequency</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>report_method_id</string> </key>
<value> <string>Alarm_viewConsistencyCheckReport</string> </value>
</item>
<item>
<key> <string>solve_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Vifib Consistency Check</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,6 +2,9 @@
<portal_type id="Computer Partition">
<item>ComputerPartition</item>
</portal_type>
<portal_type id="Hosting Subscription">
<item>VariationRange</item>
</portal_type>
<portal_type id="System Preference">
<item>VifibSystemPreference</item>
</portal_type>
......
......@@ -60,7 +60,7 @@ for business_process in [\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>fixit, tag, params</string> </value>
<value> <string>*args, **kwargs</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
vifib_base
vifib_core
\ No newline at end of file
vifib_core
vifib_open_trade
\ No newline at end of file
489
\ No newline at end of file
495
\ No newline at end of file
portal_alarms/confirm_ordered_sale_order
portal_alarms/confirm_ordered_sale_order/**
portal_alarms/stop_planned_sale_invoice_transaction
portal_alarms/stop_planned_sale_invoice_transaction/**
portal_alarms/vifib_check_consistency
portal_alarms/vifib_trigger_build
portal_alarms/vifib_trigger_build/**
\ No newline at end of file
Computer Partition | ComputerPartition
Hosting Subscription | VariationRange
System Preference | VifibSystemPreference
Virtio Partition | ComputerPartition
\ No newline at end of file
......@@ -825,8 +825,15 @@ class SlapTool(BaseTool):
requested_software_instance, **query_kw)
if movement is None:
raise SoftwareInstanceNotReady
software_instance = SoftwareInstance(
**self._getSalePackingListLineAsSoftwareInstance(movement))
parameter_dict = self._getSalePackingListLineAsSoftwareInstance(movement)
software_instance = SoftwareInstance(**parameter_dict)
if shared:
slave_instance = parameter_dict.get("slave_instance_list")[0]
software_instance._parameter_dict = self._instanceXmlToDict(
slave_instance.pop('xml'))
software_instance._connection_dict = self._instanceXmlToDict(
slave_instance.pop('connection_xml'))
return xml_marshaller.xml_marshaller.dumps(software_instance)
####################################################
......
......@@ -28,7 +28,8 @@
##############################################################################
import transaction
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import newSecurityManager, \
getSecurityManager, setSecurityManager
from Products.ERP5Type.tests.utils import DummyMailHost
import os
from DateTime import DateTime
......@@ -76,6 +77,7 @@ class testVifibMixin(ERP5TypeTestCase):
'erp5_invoicing',
'erp5_ods_style',
'erp5_odt_style',
'erp5_rss_style',
'erp5_ooo_import',
'erp5_simplified_invoicing',
'erp5_legacy_tax_system',
......@@ -92,11 +94,11 @@ class testVifibMixin(ERP5TypeTestCase):
'vifib_mysql_innodb_catalog',
'vifib_core',
'vifib_base',
'vifib_open_trade',
'vifib_slap',
'vifib_crm',
'vifib_software_pdm',
'vifib_web',
'vifib_open_trade',
'vifib_l10n_fr',
'vifib_data',
'vifib_data_category',
......@@ -327,3 +329,51 @@ class testVifibMixin(ERP5TypeTestCase):
def stepLogout(self, **kw):
self.logout()
def stepTriggerBuild(self, **kw):
self.portal.portal_alarms.vifib_trigger_build.activeSense()
def stepCheckSiteConsistency(self, **kw):
self.portal.portal_alarms.vifib_check_consistency.activeSense()
transaction.commit()
super(testVifibMixin, self).stepTic(**kw)
self.assertEqual([], self.portal.portal_alarms.vifib_check_consistency\
.Alarm_getConsistencyCheckReportLineList())
self.assertFalse(self.portal.portal_alarms.vifib_check_consistency.sense())
def stepTic(self, **kw):
def build():
sm = getSecurityManager()
self.login()
try:
if 'vifib_trigger_build' in self.portal.portal_alarms.objectIds():
self.portal.portal_alarms.vifib_trigger_build.Alarm_buildVifibPath()
finally:
setSecurityManager(sm)
if kw.get('sequence', None) is None:
# in case of using not in sequence commit transaction
transaction.commit()
# trigger build before tic
build()
transaction.commit()
super(testVifibMixin, self).stepTic(**kw)
# retrigger build after tic
build()
transaction.commit()
# tic after build
super(testVifibMixin, self).stepTic(**kw)
# there shall be no divergency
current_skin = self.app.REQUEST.get('portal_skin', 'View')
try:
# Note: Worklists are cached, so in order to have next correct result
# clear cache
self.clearCache()
self.changeSkin('RSS')
self.assertFalse('to Solve' in self.portal.ERP5Site_viewWorklist())
finally:
self.changeSkin(current_skin)
......@@ -7,9 +7,6 @@ from testVifibOpenOrderSimulation import generateTimeFrameList
class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
def stepTriggerBuild(self, sequence, **kw):
self.portal.portal_alarms.vifib_trigger_build.activeSense()
def stepCheckSubscriptionSalePackingListCoverage(self, sequence, **kw):
hosting_subscription = self.portal.portal_catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
......@@ -673,6 +670,10 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
ConfirmPayment
Tic
CheckPayment
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......
......@@ -427,7 +427,11 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
\
LoginDefaultUser \
CheckComputerPartitionInstanceHostingSalePackingListStarted \
Logout \
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......
......@@ -144,6 +144,9 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
CheckComputerPartitionInstanceSetupSalePackingListConfirmed
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -257,6 +260,9 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
CheckComputerPartitionInstanceSetupSalePackingListConfirmed
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -326,6 +332,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
LoginDefaultUser
CheckComputerPartitionInstanceSetupSalePackingListConfirmed
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -373,6 +383,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
Tic
CheckNoRelatedSalePackingListLineForSoftwareInstance
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -419,6 +433,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
Tic
CheckNoRelatedSalePackingListLineForSoftwareInstance
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -492,6 +510,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
Tic
CheckRequestedComputerPartitionCleanParameterList
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -532,6 +554,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -637,6 +663,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
Tic
CheckRequestedComputerPartitionCleanParameterList
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -677,6 +707,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -717,6 +751,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -833,6 +871,10 @@ class TestVifibSlapAllocationScope(TestVifibSlapWebServiceMixin):
LoginDefaultUser
CheckComputerPartitionInstanceHostingSalePackingListStarted
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......
......@@ -207,6 +207,10 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -265,6 +269,10 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -283,6 +291,10 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
SlapLoginCurrentComputer
CheckSuccessComputerGe