diff --git a/bt5/erp5_project/ActionTemplateItem/portal_types/Person%20Module/planningbox_report.xml b/bt5/erp5_project/ActionTemplateItem/portal_types/Person%20Module/planningbox_report.xml new file mode 100644 index 0000000000000000000000000000000000000000..d8e58b341d1dd2df1d10315f825b962704ab03c0 --- /dev/null +++ b/bt5/erp5_project/ActionTemplateItem/portal_types/Person%20Module/planningbox_report.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.ActionInformation</string> + <string>ActionInformation</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_button</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>planningbox_report</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>30.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Tasks</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/PersonModule_viewTaskPlanning</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <tuple> + <string>Products.CMFCore.Expression</string> + <string>Expression</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${portal_url}/images/planningbox.png</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_generateDomain.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_generateDomain.xml new file mode 100644 index 0000000000000000000000000000000000000000..e561c7f49c97e5da3dfa7d6286749567f50d0824 --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_generateDomain.xml @@ -0,0 +1,190 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.PythonScripts.PythonScript</string> + <string>PythonScript</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </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>request = context.REQUEST\n +object_path = request.get(\'object_path\')\n +if object_path is None:\n + # Sometimes the object_path not comes with the request, when you edit for example.\n + object_path = context.REQUEST.get(\'URL1\').split(\'/\')[-1]\n +domain_list = []\n +\n +if depth == 0:\n + category_list = context.portal_selections.getSelectionValueList(context=context,\n + selection_name= \'person_module_selection\')\n +\n +else:\n + #url = category.getProperty(\'membership_criterion_category\')\n + #category_list = url.searchFolder()\n + return domain_list\n +\n +for category in category_list:\n + domain = parent.generateTempDomain(id = category.getId())\n + domain.edit(title = category.getTitle(),\n + membership_criterion_base_category = (\'source\', \'destination\'), \n + membership_criterion_category = (category.getRelativeUrl(),),\n + domain_generator_method_id = script.id,\n + uid = category.getUid())\n + \n + domain_list.append(domain)\n +\n +context.log("%s on %s" % (script.getId(), context.getPath()), "%d objects domain" % len(domain_list))\n +return domain_list\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>depth, parent, **kw</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>2</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>depth</string> + <string>parent</string> + <string>kw</string> + <string>_getattr_</string> + <string>context</string> + <string>request</string> + <string>object_path</string> + <string>None</string> + <string>_getitem_</string> + <string>domain_list</string> + <string>category_list</string> + <string>_getiter_</string> + <string>category</string> + <string>domain</string> + <string>script</string> + <string>len</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PersonModule_generateDomain</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_getMovementHistoryList.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_getMovementHistoryList.xml new file mode 100644 index 0000000000000000000000000000000000000000..dab0cf9b00d2ae7a5390765464d796ae4f2e3a9a --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_getMovementHistoryList.xml @@ -0,0 +1,218 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.PythonScripts.PythonScript</string> + <string>PythonScript</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </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>node = context.portal_selections.getSelectionUidList(context=context, REQUEST=context.REQUEST, \n + selection_name=\'person_module_selection\')\n +context.log("on %s" % context.getPath(), "%d uids at node." % len(node))\n +\n +# Select only the usabe part\n +main_axis_begin = context.REQUEST.get(\'list_start\', 0)\n +form = getattr(context, \'PersonModule_viewTaskPlanning\')\n +planning_box = form.get_field(\'planning_box\')\n +main_axis_end = main_axis_begin + planning_box.get_value(\'main_axis_groups\')\n +\n +node_uid_list = node[main_axis_begin:main_axis_end]\n +context.log("on %s" % context.getPath(), "%d uids at node uid list." % len(node_uid_list))\n +\n +acceptable_state_list = context.getPortalFutureInventoryStateList() + \\\n + context.getPortalReservedInventoryStateList() + \\\n + context.getPortalTransitInventoryStateList() + \\\n + context.getPortalCurrentInventoryStateList()\n +\n +movement_list = context.portal_simulation.getMovementHistoryList(\n + node_uid=node_uid_list,\n + portal_type=portal_type,\n + simulation_state=acceptable_state_list, \n + to_date=to_date, \n + from_date=from_date,\n + omit_mirror_date=0,\n +)\n +\n +#return movement_list\n +\n +# XXX It is a bad idea to return order_value or delivery_value,\n +# because same object can be displayed multiple time in some cases\n +\n +return_list = []\n +\n +# XXX This part is an approximtion for sevran\n +# Normally, simulation movement should only have 1 order value\n +for mvt_obj in movement_list:\n + # XXX Can\'t we use a brain instead ?\n + if mvt_obj.portal_type == "Simulation Movement":\n + obj = mvt_obj.getOrderValue() \n + if obj is not None:\n + mvt_obj = obj\n + return_list.append(mvt_obj)\n +\n +context.log("on %s" % context.getPath(), "%d objects returned." % len(return_list))\n +return return_list\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>to_date=None, from_date=None, portal_type=None, **kw</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>to_date</string> + <string>from_date</string> + <string>portal_type</string> + <string>kw</string> + <string>_getattr_</string> + <string>context</string> + <string>node</string> + <string>len</string> + <string>main_axis_begin</string> + <string>getattr</string> + <string>form</string> + <string>planning_box</string> + <string>main_axis_end</string> + <string>_getitem_</string> + <string>node_uid_list</string> + <string>acceptable_state_list</string> + <string>movement_list</string> + <string>return_list</string> + <string>_getiter_</string> + <string>mvt_obj</string> + <string>obj</string> + <string>None</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <none/> + <none/> + <none/> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PersonModule_getMovementHistoryList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_viewTaskPlanning.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_viewTaskPlanning.xml new file mode 100644 index 0000000000000000000000000000000000000000..81b29cfb591d2e457fe85f97bb4e466d6c69ea3d --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_viewTaskPlanning.xml @@ -0,0 +1,156 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.ERP5Form.Form</string> + <string>ERP5Form</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </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/> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> <string>Base_editUnrestricted</string> </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>planning_box</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/> + </value> + </item> + <item> + <key> <string>right</string> </key> + <value> + <list/> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>PersonModule_viewTaskPlanning</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>PersonModule_viewTaskPlanning</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>form_report</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>Tasks</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> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_viewTaskPlanning/planning_box.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_viewTaskPlanning/planning_box.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ac02f530c57ec43c8f41df97861969559ad1d51 --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/PersonModule_viewTaskPlanning/planning_box.xml @@ -0,0 +1,261 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.ERP5Form.ProxyField</string> + <string>ProxyField</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>title</string> + <string>js_enabled</string> + <string>report_root_list</string> + <string>selection_name</string> + <string>portal_types</string> + <string>list_method</string> + <string>round_script</string> + <string>info_center</string> + <string>info_topleft</string> + <string>info_topright</string> + <string>info_tooltip</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>planning_box</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>info_center</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>js_enabled</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>report_root_list</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>second_layer_list_method</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </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> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>planning_box</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>info_center</string> </key> + <value> <string>getParentTitle</string> </value> + </item> + <item> + <key> <string>info_tooltip</string> </key> + <value> <string>Movement_getToolTip</string> </value> + </item> + <item> + <key> <string>info_topleft</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>info_topright</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>js_enabled</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>list_method</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> + <item> + <key> <string>portal_types</string> </key> + <value> + <list> + <tuple> + <string>Simulation Movement</string> + <string>Simulation Movement</string> + </tuple> + <tuple> + <string>Task Line</string> + <string>Task Line</string> + </tuple> + <tuple> + <string>Task Report Line</string> + <string>Task Report Line</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>report_root_list</string> </key> + <value> + <list> + <tuple> + <string>person_module_tasks_domain</string> + <string>Tasks</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>round_script</string> </key> + <value> <string>Planning_roundBoundToMinute</string> </value> + </item> + <item> + <key> <string>selection_name</string> </key> + <value> <string>person_module_planning_tasks_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>Planning of Task and Task Reports</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.TALESField</string> + <string>TALESMethod</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.portal_selections.getSelectionFor(\'person_module_planning_tasks_selection\').getParams().get(\'zoom_level\', 30) in [1, 7]</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.TALESField</string> + <string>TALESMethod</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.PersonModule_getSecondaryLayerListMethodName()</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.MethodField</string> + <string>Method</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>method_name</string> </key> + <value> <string>PersonModule_getMovementHistoryList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/bt/revision b/bt5/erp5_project/bt/revision index 5f1a9f39c27866e19c2665f899cec7d843660ad4..f9c94c8318066ba562fd1ce1e14753071396ea54 100644 --- a/bt5/erp5_project/bt/revision +++ b/bt5/erp5_project/bt/revision @@ -1 +1 @@ -324 \ No newline at end of file +325 \ No newline at end of file