From dc6dd912b22d55bc291b1f3bb2745aaf708155a8 Mon Sep 17 00:00:00 2001 From: Roque Porchetto <roque.porchetto@nexedi.com> Date: Tue, 15 Oct 2019 09:22:27 +0000 Subject: [PATCH] erp5_project: new portal domains, scripts and forms for project management views --- .../portal_domains/state_project_domain.xml | 128 ++++++++++++++++++ .../portal_domains/state_task_domain.xml | 128 ++++++++++++++++++ .../state_task_report_domain.xml | 93 +++++++++++++ .../Base_generateStateProjectDomain.py | 4 + .../Base_generateStateProjectDomain.xml | 62 +++++++++ .../Base_generateStateTaskDomain.py | 5 + .../Base_generateStateTaskDomain.xml | 62 +++++++++ .../Base_generateStateTaskReportDomain.py | 5 + .../Base_generateStateTaskReportDomain.xml | 62 +++++++++ .../ProjectModule_viewProjectList/listbox.xml | 24 ++++ .../TaskModule_viewTaskList/listbox.xml | 4 + .../listbox.xml | 4 + bt5/erp5_project/bt/template_path_list | 3 + 13 files changed, 584 insertions(+) create mode 100644 bt5/erp5_project/PathTemplateItem/portal_domains/state_project_domain.xml create mode 100644 bt5/erp5_project/PathTemplateItem/portal_domains/state_task_domain.xml create mode 100644 bt5/erp5_project/PathTemplateItem/portal_domains/state_task_report_domain.xml create mode 100644 bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateProjectDomain.py create mode 100644 bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateProjectDomain.xml create mode 100644 bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskDomain.py create mode 100644 bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskDomain.xml create mode 100644 bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskReportDomain.py create mode 100644 bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskReportDomain.xml diff --git a/bt5/erp5_project/PathTemplateItem/portal_domains/state_project_domain.xml b/bt5/erp5_project/PathTemplateItem/portal_domains/state_project_domain.xml new file mode 100644 index 0000000000..9a82a9a049 --- /dev/null +++ b/bt5/erp5_project/PathTemplateItem/portal_domains/state_project_domain.xml @@ -0,0 +1,128 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Base Domain" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Access_contents_information_Permission</string> </key> + <value> + <tuple> + <string>Anonymous</string> + <string>Assignee</string> + <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> + <string>Authenticated</string> + <string>Author</string> + <string>Manager</string> + <string>Member</string> + <string>Owner</string> + <string>Reviewer</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_View_Permission</string> </key> + <value> + <tuple> + <string>Anonymous</string> + <string>Assignee</string> + <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> + <string>Authenticated</string> + <string>Author</string> + <string>Manager</string> + <string>Member</string> + <string>Owner</string> + <string>Reviewer</string> + </tuple> + </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>Base_generateStateProjectDomain</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>state_project_domain</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>State Project Domain</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/PathTemplateItem/portal_domains/state_task_domain.xml b/bt5/erp5_project/PathTemplateItem/portal_domains/state_task_domain.xml new file mode 100644 index 0000000000..2655593c85 --- /dev/null +++ b/bt5/erp5_project/PathTemplateItem/portal_domains/state_task_domain.xml @@ -0,0 +1,128 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Base Domain" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Access_contents_information_Permission</string> </key> + <value> + <tuple> + <string>Anonymous</string> + <string>Assignee</string> + <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> + <string>Authenticated</string> + <string>Author</string> + <string>Manager</string> + <string>Member</string> + <string>Owner</string> + <string>Reviewer</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_View_Permission</string> </key> + <value> + <tuple> + <string>Anonymous</string> + <string>Assignee</string> + <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> + <string>Authenticated</string> + <string>Author</string> + <string>Manager</string> + <string>Member</string> + <string>Owner</string> + <string>Reviewer</string> + </tuple> + </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>Base_generateStateTaskDomain</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>state_task_domain</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>State Task Domain</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/PathTemplateItem/portal_domains/state_task_report_domain.xml b/bt5/erp5_project/PathTemplateItem/portal_domains/state_task_report_domain.xml new file mode 100644 index 0000000000..e488e9df24 --- /dev/null +++ b/bt5/erp5_project/PathTemplateItem/portal_domains/state_task_report_domain.xml @@ -0,0 +1,93 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Base Domain" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_folders_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Copy_or_Move_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Delete_objects_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </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>Base_generateStateTaskReportDomain</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>state_task_report_domain</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>State Task Report Domain</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateProjectDomain.py b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateProjectDomain.py new file mode 100644 index 0000000000..81e07f89d5 --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateProjectDomain.py @@ -0,0 +1,4 @@ +return [ + context.Base_generateDomain(parent, 'started', 'Started', 'validation_state', 'validated'), + context.Base_generateDomain(parent, 'not_started', 'Not Started', 'validation_state', ['draft', 'invalidated', 'suspended']) +] diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateProjectDomain.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateProjectDomain.xml new file mode 100644 index 0000000000..fe8e2ab135 --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateProjectDomain.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </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>_params</string> </key> + <value> <string>depth, parent, **kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Base_generateStateProjectDomain</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskDomain.py b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskDomain.py new file mode 100644 index 0000000000..a0498fb0ab --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskDomain.py @@ -0,0 +1,5 @@ +return [ + context.Base_generateDomain(parent, 'confirmed', 'Confirmed', 'simulation_state', 'confirmed'), + context.Base_generateDomain(parent, 'not_confirmed', 'Not Confirmed', 'simulation_state', ['planned', 'ordered', 'draft']), + context.Base_generateDomain(parent, 'cancelled', 'Cancelled', 'simulation_state', ['cancelled', 'deleted']) +] diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskDomain.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskDomain.xml new file mode 100644 index 0000000000..650e9a84c4 --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskDomain.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </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>_params</string> </key> + <value> <string>depth, parent, **kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Base_generateStateTaskDomain</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskReportDomain.py b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskReportDomain.py new file mode 100644 index 0000000000..93334bed6c --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskReportDomain.py @@ -0,0 +1,5 @@ +return [ + context.Base_generateDomain(parent, 'started', 'Confirmed', 'simulation_state', 'confirmed'), + context.Base_generateDomain(parent, 'not_started', 'Not Confirmed', 'simulation_state', 'draft'), + context.Base_generateDomain(parent, 'closed', 'Closed', 'simulation_state', ['delivered', 'stopped']) +] diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskReportDomain.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskReportDomain.xml new file mode 100644 index 0000000000..2e6c592026 --- /dev/null +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Base_generateStateTaskReportDomain.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </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>_params</string> </key> + <value> <string>depth, parent, **kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Base_generateStateTaskReportDomain</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_viewProjectList/listbox.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_viewProjectList/listbox.xml index 78d6757c56..abb8ffe86c 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_viewProjectList/listbox.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_viewProjectList/listbox.xml @@ -12,11 +12,14 @@ <list> <string>all_columns</string> <string>columns</string> + <string>domain_root_list</string> + <string>domain_tree</string> <string>editable_columns</string> <string>portal_types</string> <string>search_columns</string> <string>selection_name</string> <string>title</string> + <string>url_columns</string> </list> </value> </item> @@ -132,6 +135,21 @@ </list> </value> </item> + <item> + <key> <string>domain_root_list</string> </key> + <value> + <list> + <tuple> + <string>state_project_domain</string> + <string>Project Status</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>domain_tree</string> </key> + <value> <int>1</int> </value> + </item> <item> <key> <string>editable_columns</string> </key> <value> @@ -217,6 +235,12 @@ <key> <string>title</string> </key> <value> <string>Projects</string> </value> </item> + <item> + <key> <string>url_columns</string> </key> + <value> + <list/> + </value> + </item> </dictionary> </value> </item> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskModule_viewTaskList/listbox.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskModule_viewTaskList/listbox.xml index a2509166e3..55e1d919a3 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskModule_viewTaskList/listbox.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskModule_viewTaskList/listbox.xml @@ -197,6 +197,10 @@ <string>ledger</string> <string>Ledger</string> </tuple> + <tuple> + <string>state_task_domain</string> + <string>Task Status</string> + </tuple> </list> </value> </item> diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewTaskReportList/listbox.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewTaskReportList/listbox.xml index 297c88bd3f..583ca2e5a3 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewTaskReportList/listbox.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_viewTaskReportList/listbox.xml @@ -208,6 +208,10 @@ <string>ledger</string> <string>Ledger</string> </tuple> + <tuple> + <string>state_task_report_domain</string> + <string>Task Report Status</string> + </tuple> </list> </value> </item> diff --git a/bt5/erp5_project/bt/template_path_list b/bt5/erp5_project/bt/template_path_list index c3dd9d7577..448292ad83 100644 --- a/bt5/erp5_project/bt/template_path_list +++ b/bt5/erp5_project/bt/template_path_list @@ -8,6 +8,9 @@ portal_domains/project_project_domain portal_domains/project_project_task_report_domain portal_domains/project_projectline_domain portal_domains/project_report_monthly_domain +portal_domains/state_project_domain +portal_domains/state_task_domain +portal_domains/state_task_report_domain portal_domains/task_module_domain portal_domains/task_module_person_domain portal_domains/task_module_project_domain -- 2.30.9