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 @@ -