summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorLaurent Stukkens (LTU) <ltu@odoo.com>2020-12-18 16:34:10 +0100
committerXavier BOL (xbo) <xbo@odoo.com>2020-12-21 15:35:21 +0100
commit3f3d2b257c7f0ee156bf7439ea807f422970a278 (patch)
tree85c9453c9838713828474c4657f6e910bce1e172 /addons
parent69c7d96e1671266e939163bde05afe684f907606 (diff)
[FIX] sale_timesheet: Only open SO for salesman on project overview
Purpose ======= People should be able to see it, but not to open it, as it would result into a access error (Obviously as the user hasn't the right to read a SO/SOL). task-2409761
Diffstat (limited to 'addons')
-rw-r--r--addons/sale_timesheet/views/hr_timesheet_templates.xml9
1 files changed, 7 insertions, 2 deletions
diff --git a/addons/sale_timesheet/views/hr_timesheet_templates.xml b/addons/sale_timesheet/views/hr_timesheet_templates.xml
index 6a44f41789b..1715f3c2735 100644
--- a/addons/sale_timesheet/views/hr_timesheet_templates.xml
+++ b/addons/sale_timesheet/views/hr_timesheet_templates.xml
@@ -404,9 +404,14 @@
<span t-if="foldable" t-att-class="('fa fa-caret-down' if row_type == 'sale_order' else 'fa fa-caret-right') + (' project_overview_foldable' if foldable else '')"
style="cursor: pointer;" t-att-data-model="row[0].get('res_model')" t-att-data-res-id="row[0].get('res_id')"/>
<t t-if="row_type == 'sale_order'">
- <a type="action" t-att-data-model="row_value['res_model']" t-att-data-res-id="row_value['res_id']" t-att-class="'o_timesheet_plan_redirect' if row_value['res_id'] else ''">
+ <t t-if="env.user.has_group('sales_team.group_sale_salesman')">
+ <a type="action" t-att-data-model="row_value['res_model']" t-att-data-res-id="row_value['res_id']" t-att-class="'o_timesheet_plan_redirect' if row_value['res_id'] else ''">
+ <t t-esc="row_value.get('label')"/>
+ </a>
+ </t>
+ <t t-else="">
<t t-esc="row_value.get('label')"/>
- </a>
+ </t>
<span t-if="row_value.get('canceled')" class="badge badge-pill o_canceled_tag">
Cancelled
</span>