From 71d56cc3982467218cbec5251e04ff295925af00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Wed, 9 Aug 2017 14:10:15 +0200 Subject: [PATCH] [REM] website_project_timesheet: move to hr_timesheet Since project depends on portal, this module can be removed. --- addons/hr_timesheet/__manifest__.py | 1 + .../security/hr_timesheet_security.xml | 15 +++++++ .../hr_timesheet/security/ir.model.access.csv | 3 +- .../views/project_portal_templates.xml} | 2 +- addons/website_project_timesheet/__init__.py | 0 .../website_project_timesheet/__manifest__.py | 17 -------- addons/website_project_timesheet/i18n/es.po | 41 ------------------ addons/website_project_timesheet/i18n/fr.po | 42 ------------------- addons/website_project_timesheet/i18n/hu.po | 40 ------------------ addons/website_project_timesheet/i18n/nl.po | 39 ----------------- .../website_project_timesheet/i18n/pt_BR.po | 41 ------------------ .../i18n/website_project_timesheet.pot | 37 ---------------- .../website_project_timesheet/i18n/zh_CN.po | 40 ------------------ .../account_analytic_line_security.xml | 18 -------- .../security/ir.model.access.csv | 2 - 15 files changed, 19 insertions(+), 319 deletions(-) rename addons/{website_project_timesheet/views/account_analytic_line_templates.xml => hr_timesheet/views/project_portal_templates.xml} (90%) delete mode 100644 addons/website_project_timesheet/__init__.py delete mode 100644 addons/website_project_timesheet/__manifest__.py delete mode 100644 addons/website_project_timesheet/i18n/es.po delete mode 100644 addons/website_project_timesheet/i18n/fr.po delete mode 100644 addons/website_project_timesheet/i18n/hu.po delete mode 100644 addons/website_project_timesheet/i18n/nl.po delete mode 100644 addons/website_project_timesheet/i18n/pt_BR.po delete mode 100644 addons/website_project_timesheet/i18n/website_project_timesheet.pot delete mode 100644 addons/website_project_timesheet/i18n/zh_CN.po delete mode 100644 addons/website_project_timesheet/security/account_analytic_line_security.xml delete mode 100644 addons/website_project_timesheet/security/ir.model.access.csv diff --git a/addons/hr_timesheet/__manifest__.py b/addons/hr_timesheet/__manifest__.py index 51eb66b03ae..8295c7bd025 100644 --- a/addons/hr_timesheet/__manifest__.py +++ b/addons/hr_timesheet/__manifest__.py @@ -27,6 +27,7 @@ up a management by affair. 'views/hr_timesheet_views.xml', 'views/hr_timesheet_config_settings_views.xml', 'views/project_views.xml', + 'views/project_portal_templates.xml', 'report/hr_timesheet_report_view.xml', 'report/report_timesheet_templates.xml', 'views/hr_views.xml', diff --git a/addons/hr_timesheet/security/hr_timesheet_security.xml b/addons/hr_timesheet/security/hr_timesheet_security.xml index 23d20ea4fd4..2a8b9743d2f 100644 --- a/addons/hr_timesheet/security/hr_timesheet_security.xml +++ b/addons/hr_timesheet/security/hr_timesheet_security.xml @@ -51,6 +51,21 @@ + + Project/Task Timesheets: frontend access + + [ + '|', + '&', + ('task_id.project_id.privacy_visibility', '=', 'portal'), + ('task_id.project_id.message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]), + '&', + ('task_id.project_id.privacy_visibility', '=', 'portal'), + ('task_id.message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]), + ] + + + \ No newline at end of file diff --git a/addons/hr_timesheet/security/ir.model.access.csv b/addons/hr_timesheet/security/ir.model.access.csv index e9f8ce09b30..661b02a5a3c 100644 --- a/addons/hr_timesheet/security/ir.model.access.csv +++ b/addons/hr_timesheet/security/ir.model.access.csv @@ -1,8 +1,9 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_account_analytic_line_user,analytic.account.analytic.line.timesheet.user,analytic.model_account_analytic_line,hr_timesheet.group_hr_timesheet_user,1,1,1,1 +access_account_analytic_line_portal,access_timesheets_portal,analytic.model_account_analytic_line,base.group_portal,1,0,0,0 access_account_analytic_user,analytic.account.analytic.timesheet.user,analytic.model_account_analytic_account,hr_timesheet.group_hr_timesheet_user,1,1,0,0 access_product_product_user,product.product.timesheet.user,product.model_product_product,hr_timesheet.group_hr_timesheet_user,1,1,1,0 access_product_template_timesheet_user,product.template.timesheet.user,product.model_product_template,hr_timesheet.group_hr_timesheet_user,1,1,1,0 access_product_uom_hr_timesheet,product.uom.timesheet.user,product.model_product_uom,hr_timesheet.group_hr_timesheet_user,1,0,0,0 access_project_project,project.project.timesheet.user,model_project_project,hr_timesheet.group_hr_timesheet_user,1,0,0,0 -access_project_task,project.task.timesheet.user,model_project_task,hr_timesheet.group_hr_timesheet_user,1,1,0,0 \ No newline at end of file +access_project_task,project.task.timesheet.user,model_project_task,hr_timesheet.group_hr_timesheet_user,1,1,0,0 diff --git a/addons/website_project_timesheet/views/account_analytic_line_templates.xml b/addons/hr_timesheet/views/project_portal_templates.xml similarity index 90% rename from addons/website_project_timesheet/views/account_analytic_line_templates.xml rename to addons/hr_timesheet/views/project_portal_templates.xml index f48b0739794..cb0ed74e25c 100644 --- a/addons/website_project_timesheet/views/account_analytic_line_templates.xml +++ b/addons/hr_timesheet/views/project_portal_templates.xml @@ -1,7 +1,7 @@ -