Commit 28330ce7 authored by Paul Graydon's avatar Paul Graydon

wendelin_telecom_base: Update and add new actions

parent faf06cd1
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_fast_input</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_fast_input</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>fast_input_archive_ors_ingestion</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Manage portal</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>5.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>(!!!) Archive ORS Ingestions</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DataAcquisitionUnitModule_viewArchiveOrsIngestionFastInputDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -46,7 +46,7 @@
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
<string>Add portal content</string>
</tuple>
</value>
</item>
......@@ -73,7 +73,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DataAcquisitionUnitModule_viewFastInputOrsUpdateDialog</string> </value>
<value> <string>string:${object_url}/DataAcquisitionUnitModule_viewOrsUpdateFastInputDialog</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_fast_input</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_fast_input</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>refresh_ors_kpi_data_analysis</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Manage portal</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>(!!!) Refresh ORS KPI Data Analyses</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DataAnalysisModule_viewRefreshOrsKpiDataAnalysisFastInputDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -48,7 +48,7 @@
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
<string>Add portal content</string>
</tuple>
</value>
</item>
......@@ -88,7 +88,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:portal.Base_checkPermission(\'project_module\', \'Add portal content\')</string> </value>
<value> <string>python:portal.Base_checkPermission(\'person_module\', \'Add portal content\')</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -82,6 +82,7 @@
<string>my_dialog_mode_email</string>
<string>my_view_mode_listbox_reference</string>
<string>my_view_mode_listbox_title</string>
<string>my_view_mode_listbox</string>
</list>
</value>
</item>
......
......@@ -9,14 +9,12 @@
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
</list>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_title</string> </value>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -63,17 +61,13 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>The name of the object.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_title</string> </value>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWendelinTelecomFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
......
......@@ -11,7 +11,6 @@
<value>
<list>
<string>description</string>
<string>items</string>
<string>title</string>
</list>
</value>
......@@ -66,16 +65,10 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -109,12 +102,6 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
......@@ -141,19 +128,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>context/Base_getDialogDestinationProjectItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
......
from datetime import datetime
portal = context.getPortalObject()
now_date_str = datetime.today().strftime('%Y%m%d-%H%M%S')
archived_reference_suffix = 'ARCHIVED-%s' % now_date_str
archived_title_suffix = 'ARCHIVED %s' % now_date_str
def updateItemReference(item):
item_reference = item.getReference()
archived_item_reference = '%s-%s' % (item_reference, archived_reference_suffix)
item.setReference(archived_item_reference)
def updateItemTitle(item):
item_title = item.getTitle()
if item_title != item.getReference():
archived_item_title = '%s %s' % (item_title, archived_title_suffix)
item.setTitle(archived_item_title)
def invalidateItem(item):
if item.getValidationState() == 'validated':
item.invalidate()
def deliverDataSimulation(data_simulation_item):
if data_simulation_item.getSimulationState() == 'started':
data_simulation_item.deliver()
selected_listbox = [
listbox_item for listbox_item in listbox \
if listbox_item.get('listbox_selected', False)
]
for selected_item in selected_listbox:
if 'listbox_key' in selected_item:
data_acquisition_unit_url = selected_item['listbox_key']
data_acquisition_unit = portal.restrictedTraverse(
data_acquisition_unit_url
)
data_supply = data_acquisition_unit.DataAcquisitionUnit_createOrsDataSupply(batch=1)
# Non-standard Data Acquisition Unit or error
if data_supply is None:
continue
data_ingestion = None
for line in data_acquisition_unit.getAggregateRelatedValueList(
portal_type='Data Ingestion Line'
):
data_ingestion = line.getParentValue()
data_stream = None
for line in data_acquisition_unit.getAggregateRelatedValueList(
portal_type='Data Ingestion Line'
):
data_stream = line.getAggregateValue(portal_type='Data Stream')
data_analysis = None
if data_supply is not None:
data_analysis_list = data_supply.getSpecialiseRelatedValueList(
portal_type='Data Analysis'
)
if len(data_analysis_list) == 1:
data_analysis = data_analysis_list[0]
progress_indicator = None
if data_analysis is not None:
for line in data_analysis.contentValues(portal_type="Data Analysis Line"):
if line.getResourceValue().getPortalType() == "Data Product" \
and line.getQuantity() == -1:
progress_indicator = line.getAggregateProgressIndicatorValue()
data_array_list = []
if data_analysis is not None:
for line in data_analysis.contentValues(portal_type='Data Analysis Line'):
data_array = line.getAggregateValue(portal_type='Data Array')
if data_array is not None:
data_array_list.append(data_array)
# Archive Data Acquisition Unit and Data Supply first
invalidateItem(data_acquisition_unit)
updateItemReference(data_acquisition_unit)
updateItemTitle(data_acquisition_unit)
invalidateItem(data_supply)
updateItemReference(data_supply)
# Stop ongoing Data Ingestion and Data Analysis next
if data_ingestion is not None:
deliverDataSimulation(data_ingestion)
updateItemReference(data_ingestion)
if data_analysis is not None:
deliverDataSimulation(data_analysis)
updateItemReference(data_analysis)
# Finally, invalidate Data Stream, Data Arrays and Progress Indicator
if data_stream is not None:
invalidateItem(data_stream)
updateItemReference(data_stream)
for data_array in data_array_list:
invalidateItem(data_array)
updateItemReference(data_array)
if progress_indicator is not None:
invalidateItem(progress_indicator)
# This does not work for some reason
# updateItemReference(progress_indicator)
return context.Base_redirect('view', keep_items={
'portal_status_message': 'Selected Data Acquisition Units and related data ingestion successfully archived.'
})
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataAcquisitionUnitModule_updateFastInputOrsConfigurationList</string> </value>
<value> <string>DataAcquisitionUnitModule_archiveOrsIngestionFastInputList</string> </value>
</item>
</dictionary>
</pickle>
......
data_acquisition_unit_list = context.contentValues(portal_type='Data Acquisition Unit')
portal = context.getPortalObject()
data_acquisition_unit_list = portal.data_acquisition_unit_module.contentValues(
portal_type='Data Acquisition Unit'
)
listbox_item_list = []
for data_acquisition_unit in data_acquisition_unit_list:
# Non-validated item: skip it
if data_acquisition_unit.getValidationState() != 'validated':
continue
destination_project = None
for related_data_supply_line in data_acquisition_unit.Base_getRelatedObjectList(portal_type='Data Supply Line'):
for related_data_supply_line in data_acquisition_unit.Base_getRelatedObjectList(
portal_type='Data Supply Line'
):
related_data_supply = related_data_supply_line.getParentValue()
if related_data_supply:
destination_project = related_data_supply.getDestinationProject()
context_obj = data_acquisition_unit.asContext(destination_project=destination_project)
context_obj = data_acquisition_unit.asContext(
destination_project=destination_project
)
listbox_item_list.append(context_obj)
return listbox_item_list
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataAcquisitionUnitModule_getFastInputOrsConfigurationList</string> </value>
<value> <string>DataAcquisitionUnitModule_getOrsConfigurationFastInputList</string> </value>
</item>
</dictionary>
</pickle>
......
portal = context.getPortalObject()
archived_reference_marker = 'ARCHIVED'
data_acquisition_unit_list = portal.data_acquisition_unit_module.contentValues(
portal_type='Data Acquisition Unit'
)
listbox_item_list = []
for data_acquisition_unit in data_acquisition_unit_list:
# Already archived or non-validated item: skip it
if archived_reference_marker in data_acquisition_unit.getReference() \
or data_acquisition_unit.getValidationState() != 'validated':
continue
destination_project = None
for related_data_supply_line in data_acquisition_unit.Base_getRelatedObjectList(
portal_type='Data Supply Line'
):
related_data_supply = related_data_supply_line.getParentValue()
if related_data_supply:
destination_project = related_data_supply.getDestinationProject()
context_obj = data_acquisition_unit.asContext(
destination_project=destination_project
)
listbox_item_list.append(context_obj)
return listbox_item_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>lines_num=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataAcquisitionUnitModule_getOrsIngestionFastInputList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -8,16 +8,21 @@ for listbox_item in listbox:
data_acquisition_unit = portal.restrictedTraverse(data_acquisition_unit_url)
data_acquisition_unit.setTitle(title)
for related_data_supply_line in data_acquisition_unit.Base_getRelatedObjectList(portal_type='Data Supply Line'):
for related_data_supply_line in data_acquisition_unit.Base_getRelatedObjectList(
portal_type='Data Supply Line'
):
related_data_supply = related_data_supply_line.getParentValue()
if related_data_supply:
related_data_supply.setDestinationProject(destination_project)
else:
portal_status_message = "No related Data Supply found for %s." % data_acquisition_unit.getReference()
portal_status_message = "No related Data Supply found for %s." \
% data_acquisition_unit.getReference()
kw['keep_items'] = dict(
portal_status_message=portal_status_message,
portal_status_level='error'
)
return context.Base_redirect('view', **kw)
return context.Base_redirect('view', keep_items={'portal_status_message': 'Data Acquisition Units successfully updated.'})
return context.Base_redirect('view', keep_items={
'portal_status_message': 'Data Acquisition Units successfully updated.'
})
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listbox=(), **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataAcquisitionUnitModule_updateOrsConfigurationFastInputList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>DataAcquisitionUnitModule_archiveOrsIngestionFastInputList</string> </value>
</item>
<item>
<key> <string>action_title</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>multipart/form-data</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_destination_project</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>warning</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>DataAcquisitionUnitModule_viewArchiveOrsIngestionFastInputDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DataAcquisitionUnitModule_viewArchiveOrsIngestionFastInputDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</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>Archive ORS Ingestions</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>columns</string>
<string>list_method</string>
<string>search</string>
<string>select</string>
<string>title</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>
</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>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_project</string>
<string>Client Project</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWendelinTelecomFieldLibrary</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>1</int> </value>
</item>
<item>
<key> <string>select</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Data Acquisition Units</string> </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>DataAcquisitionUnitModule_getOrsIngestionFastInputList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,6 +11,7 @@
<value>
<list>
<string>description</string>
<string>items</string>
</list>
</value>
</item>
......@@ -48,6 +49,10 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -56,6 +61,12 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
......@@ -75,6 +86,12 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewWendelinTelecomFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
......@@ -92,4 +109,17 @@
</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>context/Base_getDialogDestinationProjectItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string>DataAcquisitionUnitModule_updateFastInputOrsConfigurationList</string> </value>
<value> <string>DataAcquisitionUnitModule_updateOrsConfigurationFastInputList</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
......@@ -73,8 +73,6 @@
<value>
<list>
<string>listbox_destination_project</string>
<string>listbox_reference</string>
<string>listbox_title</string>
</list>
</value>
</item>
......@@ -95,7 +93,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataAcquisitionUnitModule_viewFastInputOrsUpdateDialog</string> </value>
<value> <string>DataAcquisitionUnitModule_viewOrsUpdateFastInputDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -103,7 +101,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DataAcquisitionUnitModule_viewFastInputOrsUpdateDialog</string> </value>
<value> <string>DataAcquisitionUnitModule_viewOrsUpdateFastInputDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......
<?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>
</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>
</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>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_project</string>
<string>Client Project</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_project</string>
<string>Client Project</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWendelinTelecomFieldLibrary</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>1</int> </value>
</item>
<item>
<key> <string>select</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>data_acquisition_unit_update_fast_input_selection</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Data Acquisition Units</string> </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>DataAcquisitionUnitModule_getOrsConfigurationFastInputList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,13 +11,13 @@
<value>
<list>
<string>description</string>
<string>editable</string>
<string>items</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_reference</string> </value>
<value> <string>listbox_destination_project</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -49,6 +49,10 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -57,6 +61,12 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
......@@ -66,24 +76,50 @@
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>The internal reference of the object.</string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <string>The project to which the corresponding Data Supply is related on the client side.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_reference</string> </value>
<value> <string>my_view_mode_listbox_destination_project_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWendelinTelecomFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>Project</string>
<string>Project</string>
</tuple>
</list>
</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>context/Base_getDialogDestinationProjectItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -8,7 +8,10 @@ Otherwise, the user is redirected to the Data Supply's view page.
'''
if not context.getReference():
return context.Base_redirect('view', keep_items={'portal_status_message': 'Reference is not defined.', 'portal_status_level': 'error'})
return context.Base_redirect('view', keep_items={
'portal_status_message': 'Reference is not defined.',
'portal_status_level': 'error'
})
reference = context.getReference()
......@@ -20,7 +23,9 @@ data_supply = context.portal_catalog.getResultValue(
if data_supply:
if batch:
return data_supply
return data_supply.Base_redirect('view', keep_items={'portal_status_message': 'Data Supply already exists.'})
return data_supply.Base_redirect('view', keep_items={
'portal_status_message': 'Data Supply already exists.'
})
data_supply = context.data_supply_module.newContent(
portal_type='Data Supply',
......@@ -53,4 +58,6 @@ data_supply.validate()
if batch:
return data_supply
return data_supply.Base_redirect('view', keep_items={'portal_status_message': 'Data Supply successfully created.'})
return data_supply.Base_redirect('view', keep_items={
'portal_status_message': 'Data Supply successfully created.'
})
portal = context.getPortalObject()
data_analysis_list = portal.data_analysis_module.contentValues(
portal_type='Data Analysis'
)
listbox_item_list = []
for data_analysis in data_analysis_list:
# Only allow to refresh analyses that are
# still ongoing and not still refreshing
if data_analysis.getSimulationState() == 'started' \
and data_analysis.getRefreshState() == 'current':
listbox_item_list.append(data_analysis)
return listbox_item_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listbox=(), **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataAnalysisModule_getOrsKpiDataAnalysisFastInputList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
selected_listbox = [
listbox_item for listbox_item in listbox \
if listbox_item.get('listbox_selected', False)
]
for selected_item in selected_listbox:
if 'listbox_key' in selected_item:
data_analysis_url = selected_item['listbox_key']
data_analysis = portal.restrictedTraverse(
data_analysis_url
)
data_analysis.planRefresh()
return context.Base_redirect('view', keep_items={
'portal_status_message': 'Selected Data Analyses have been successfully planned to refresh.'
})
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listbox=(), **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataAnalysisModule_refreshOrsKpiDataAnalysisFastInputList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>DataAnalysisModule_refreshOrsKpiDataAnalysisFastInputList</string> </value>
</item>
<item>
<key> <string>action_title</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>multipart/form-data</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/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>warning</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>DataAnalysisModule_viewRefreshOrsKpiDataAnalysisFastInputDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DataAnalysisModule_viewRefreshOrsKpiDataAnalysisFastInputDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</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>Refresh ORS KPI Data Analyses</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>columns</string>
<string>list_method</string>
<string>search</string>
<string>select</string>
<string>selection_name</string>
<string>title</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>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </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>list_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>search</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>select</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>selection_name</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>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>refresh_state_title</string>
<string>Refresh State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWendelinTelecomFieldLibrary</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>1</int> </value>
</item>
<item>
<key> <string>select</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>refresh_ors_kpi_data_analysis_selection</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Data Analyses</string> </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>DataAnalysisModule_getOrsKpiDataAnalysisFastInputList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -59,7 +59,12 @@ client_user = portal.person_module.newContent(
reference=client_user_reference,
default_email_text=client_email
)
client_user.newContent(portal_type='Assignment', destination_project=destination_project, function=client_function).open()
client_user.newContent(
portal_type='Assignment',
title='User for %s' % project_title,
destination_project=destination_project,
function=client_function
).open()
client_user.newContent(portal_type='ERP5 Login', reference=client_email, password=client_init_password).validate()
client_user.validate()
......
Data Acquisition Unit Module | fast_input_archive_ors_ingestion
Data Acquisition Unit Module | fast_input_ors_update
Data Acquisition Unit | create_ors_data_supply
Data Acquisition Unit | view_e_rab_accessibility_kpi
Data Acquisition Unit | view_e_utran_ip_throughput_kpi
Data Analysis Module | refresh_ors_kpi_data_analysis
Project Module | register_ors_client_project
\ No newline at end of file
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