diff --git a/bt5/erp5_project/PathTemplateItem/portal_domains/project_projectline_domain.xml b/bt5/erp5_project/PathTemplateItem/portal_domains/project_projectline_domain.xml new file mode 100644 index 0000000000000000000000000000000000000000..5612cffc276a2c12496e039a5c0b6798ede302f7 --- /dev/null +++ b/bt5/erp5_project/PathTemplateItem/portal_domains/project_projectline_domain.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="BaseDomain" module="Products.ERP5Type.Document.BaseDomain"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_identity_criterion</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_range_criterion</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>domain_generator_method_id</string> </key> + <value> <string>Project_generateProjectLineDomain</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>project_projectline_domain</string> </value> + </item> + <item> + <key> <string>last_id</string> </key> + <value> <string>187</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Base Domain</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Project Line Domain</string> </value> + </item> + <item> + <key> <string>uid</string> </key> + <value> + <none/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_generateProjectLineDomain.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_generateProjectLineDomain.xml new file mode 100644 index 0000000000000000000000000000000000000000..34f18bf8318e3ec2bda3a5fc99a55c98bac43277 --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_generateProjectLineDomain.xml @@ -0,0 +1,197 @@ +<?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>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 +\n +project_line_portal_type = \'Project Line\'\n +domain_list = []\n +\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 +\n +domain_list = []\n +\n +if depth == 0:\n + category_list = [context.project_module.restrictedTraverse(object_path)]\n + \n +else:\n + category_list = []\n + parent_category_list = parent.getMembershipCriterionCategoryList()\n + for parent_category in parent_category_list:\n + parent_category = \'/\'.join(parent_category.split(\'/\')[1:])\n + category_list.extend(context.restrictedTraverse(parent_category).contentValues(portal_type=project_line_portal_type))\n +\n +i=0\n +for category in category_list:\n + domain = parent.generateTempDomain(id = \'%s_%s\' % (depth, i))\n + domain.edit(title = category.getTitle(),\n + membership_criterion_base_category = (\'source_project\', ), \n + membership_criterion_category = (category.getRelativeUrl(),),\n + domain_generator_method_id = script.id,\n + uid = category.getUid())\n + i += 1\n + domain_list.append(domain)\n +\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>project_line_portal_type</string> + <string>domain_list</string> + <string>object_path</string> + <string>None</string> + <string>_getitem_</string> + <string>category_list</string> + <string>parent_category_list</string> + <string>_getiter_</string> + <string>parent_category</string> + <string>i</string> + <string>category</string> + <string>domain</string> + <string>script</string> + <string>_inplacevar_</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>Project_generateProjectLineDomain</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/Project_getPlanningBoxReportList.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_getPlanningBoxReportList.xml index 9f52fab4bba086060f8dc2fb39ff38839f001e0d..e3c52bfd7ac2556f98f6a3bb029ec9919ebab926 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_getPlanningBoxReportList.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_getPlanningBoxReportList.xml @@ -87,7 +87,7 @@ if selection is not None:\n kw[\'portal_type\'] = [\'Task Report\']\n return context.getSourceProjectRelatedValueList(**kw)\n \n - if selection.report_path in [\'project_project_domain\']:\n + if selection.report_path in [\'project_projectline_domain\']:\n return getSourceProjectRelatedValueList()\n \n if selection.report_path in [\'project_project_task_report_domain\']:\n @@ -111,6 +111,12 @@ return context.searchFolder(**kw)\n <none/> </value> </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> <item> <key> <string>_params</string> </key> <value> <string>**kw</string> </value> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_viewPlanning/planning_box.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_viewPlanning/planning_box.xml index 29656bfaba018c60c35c1e405b6b38320d16b219..d5c5d0053e40df712c33f4c0f59dd83298d8555d 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_viewPlanning/planning_box.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_viewPlanning/planning_box.xml @@ -90,13 +90,13 @@ <value> <string>Base_viewFieldLibrary</string> </value> </item> <item> - <key> <string>list_method</string> </key> + <key> <string>list_method</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </value> </item> <item> - <key> <string>portal_types</string> </key> + <key> <string>portal_types</string> </key> <value> <list> <tuple> @@ -115,7 +115,7 @@ </value> </item> <item> - <key> <string>report_root_list</string> </key> + <key> <string>report_root_list</string> </key> <value> <list> <tuple> @@ -131,7 +131,7 @@ <string>Task Report per Person</string> </tuple> <tuple> - <string>project_project_domain</string> + <string>project_projectline_domain</string> <string>Tasks per Project Lines</string> </tuple> <tuple> @@ -146,7 +146,7 @@ <value> <string>Click to edit the target</string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>title</string> </key> <value> <string>Project Planning</string> </value> </item> </dictionary> diff --git a/bt5/erp5_project/bt/revision b/bt5/erp5_project/bt/revision index b1eab89dbc94ec2b1d30843dbc5a7f61343a7350..6efca19ea0b6814902678d61d3b643d78797c000 100644 --- a/bt5/erp5_project/bt/revision +++ b/bt5/erp5_project/bt/revision @@ -1 +1 @@ -477 \ No newline at end of file +481 \ No newline at end of file diff --git a/bt5/erp5_project/bt/template_path_list b/bt5/erp5_project/bt/template_path_list index f25f745113c27074ea29730bdf5ea90b5748d9c0..5161a343ae751c662d4588e8aa49f48590fd356a 100644 --- a/bt5/erp5_project/bt/template_path_list +++ b/bt5/erp5_project/bt/template_path_list @@ -4,6 +4,7 @@ portal_domains/project_person_domain portal_domains/project_person_task_report_domain portal_domains/project_project_domain portal_domains/project_project_task_report_domain +portal_domains/project_projectline_domain portal_domains/task_module_domain portal_domains/task_module_person_domain portal_domains/task_module_project_domain