diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_getMovementedSectionItemList.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_getMovementedSectionItemList.xml new file mode 100644 index 0000000000000000000000000000000000000000..47fa6c6b99f0ae8d35f44b8a8274b58f22ae8a36 --- /dev/null +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_getMovementedSectionItemList.xml @@ -0,0 +1,146 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </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>"""Returns an item list of all mirror sections that have been used in movements with this resource.\n +"""\n +\n +item_list = [(\'\', \'\')]\n +portal = context.getPortalObject()\n +getobject = portal.portal_catalog.getobject\n +\n +for x in portal.portal_simulation.getInventoryList(\n + resource_uid=context.getUid(),\n + group_by_mirror_section=1):\n + mirror_section_uid = x.mirror_section_uid\n + if mirror_section_uid:\n + mirror_section = getobject(mirror_section_uid)\n + item_list.append((mirror_section.getTitle(),\n + mirror_section.getRelativeUrl()))\n +\n +item_list.sort(key=lambda x:x[0])\n +return item_list\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></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>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>item_list</string> + <string>_getattr_</string> + <string>context</string> + <string>portal</string> + <string>getobject</string> + <string>_getiter_</string> + <string>x</string> + <string>mirror_section_uid</string> + <string>mirror_section</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>Resource_getMovementedSectionItemList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewInventoryChartDialog/your_node.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewInventoryChartDialog/your_node.xml index 8f11d41e6927884984c5574c1cd5d7bae1cc8d40..59d27e84d6afb9ef61de5334770c0181f4cdcc76 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewInventoryChartDialog/your_node.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewInventoryChartDialog/your_node.xml @@ -133,7 +133,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python: [(\'\',\'\')] + [(x.getTitle(),x.getRelativeUrl()) for x in context.portal_catalog(portal_type=\'Organisation\',sort_on=((\'title\',\'ascending\'),))]</string> </value> + <value> <string>here/Resource_getMovementedSectionItemList</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewInventoryVariationChartDialog/your_node.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewInventoryVariationChartDialog/your_node.xml index 8f11d41e6927884984c5574c1cd5d7bae1cc8d40..59d27e84d6afb9ef61de5334770c0181f4cdcc76 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewInventoryVariationChartDialog/your_node.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Resource_viewInventoryVariationChartDialog/your_node.xml @@ -133,7 +133,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python: [(\'\',\'\')] + [(x.getTitle(),x.getRelativeUrl()) for x in context.portal_catalog(portal_type=\'Organisation\',sort_on=((\'title\',\'ascending\'),))]</string> </value> + <value> <string>here/Resource_getMovementedSectionItemList</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_pdm/bt/revision b/bt5/erp5_pdm/bt/revision index 65de5029b4afb206606ec98c33d2935131081e28..3d9983adabb1c1a26961874f9121d56002ea2e09 100644 --- a/bt5/erp5_pdm/bt/revision +++ b/bt5/erp5_pdm/bt/revision @@ -1 +1 @@ -294 \ No newline at end of file +295 \ No newline at end of file