diff --git a/addons/sale_project/static/src/components/project_right_side_panel/project_right_side_panel.js b/addons/sale_project/static/src/components/project_right_side_panel/project_right_side_panel.js index b3788d30540..bc3104fc77c 100644 --- a/addons/sale_project/static/src/components/project_right_side_panel/project_right_side_panel.js +++ b/addons/sale_project/static/src/components/project_right_side_panel/project_right_side_panel.js @@ -29,5 +29,27 @@ patch(ProjectRightSidePanel.prototype, '@sale_project/components/project_right_s formatValue(value, unit) { return unit === 'Hours' ? formatFloatTime(value) : formatFloat(value); - } + }, + + //--------------------------------------------------------------------- + // Handlers + //--------------------------------------------------------------------- + + /** + * @private + * @param {Object} params + */ + async onSaleItemActionClick(params) { + if (params.resId && params.type !== 'object') { + const action = await this.actionService.loadAction(params.name, this.context); + this.actionService.doAction({ + ...action, + res_id: params.resId, + views: [[false, 'form']] + }); + } else { + this.onProjectActionClick(params); + } + }, + }); diff --git a/addons/sale_project/static/src/components/project_right_side_panel/project_right_side_panel.xml b/addons/sale_project/static/src/components/project_right_side_panel/project_right_side_panel.xml index a05219d83ab..91ae7ba9ea9 100644 --- a/addons/sale_project/static/src/components/project_right_side_panel/project_right_side_panel.xml +++ b/addons/sale_project/static/src/components/project_right_side_panel/project_right_side_panel.xml @@ -24,7 +24,7 @@ - +