summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/basic_view.js
diff options
context:
space:
mode:
authorqho <qho@odoo.com>2020-03-10 07:50:27 +0000
committerYannick Tivisse <yti@odoo.com>2020-06-29 11:56:36 +0000
commit1424a3839a6c304599bdeefcd74f29279ae75420 (patch)
treef78d9388f3dfd55ffdc8b24ac6aaa4304571fd94 /addons/mail/static/src/js/basic_view.js
parent78e2d2e2fb49814c2f51dd97d2ddba6ba533d2e1 (diff)
[IMP] hr_timesheet: Improve the usability of timesheet portal
1. Generic timesheets improvements - Portal /my/timesheets - Add a group bys task, date, employee - Add search in project, name, employee, task * The task column should not be visible if none of the timesheets have the Task field set - If a group by task, date, employee or project is applied, the corresponding column should not be visible 2. Timesheets from sub-tasks on parent tasks - Portal /my/tasks - Display the 'Total Hours' spent on a task at the end of the list of timesheets - Below the list of timesheets for the task, display another table detailing the respective timesheets (and total hours) of each sub-task linked to this task (= 1 table/list per sub-task) * Title should be: 'Timesheets for sub-task: xyz' * only visible if there are sub-tasks linked to this task * only visible if total hours > 0 3. Timesheets on Invoices - Portal /my/invoices - Add Project + task fields * Task field only visible if set on one of the timesheet entries * Project field only visible if there are at least 2 different projects in these timesheet entries 4. Correct visibility for the portal users - Portal users is allowed to see timesheets if the users are added in allowed portal users list in the project - When a portal user is added as the message follower of the project, the user is added to allowed portal users as well - When a portal user is removed from allowed portal users, the user is also removed from message followers closes odoo/odoo#47248 Taskid: 2201908 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/mail/static/src/js/basic_view.js')
-rw-r--r--addons/mail/static/src/js/basic_view.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/basic_view.js b/addons/mail/static/src/js/basic_view.js
index 042e0ded8e8..6d74903e19c 100644
--- a/addons/mail/static/src/js/basic_view.js
+++ b/addons/mail/static/src/js/basic_view.js
@@ -9,12 +9,14 @@ BasicView.include({
init: function () {
this._super.apply(this, arguments);
const post_refresh = this._getFieldOption('message_ids', 'post_refresh', false);
+ const followers_post_refresh = this._getFieldOption('message_follower_ids', 'post_refresh', false);
this.chatterFields = {
hasActivityIds: this._hasField('activity_ids'),
hasMessageFollowerIds: this._hasField('message_follower_ids'),
hasMessageIds: this._hasField('message_ids'),
hasRecordReloadOnAttachmentsChanged: post_refresh === 'always',
hasRecordReloadOnMessagePosted: !!post_refresh,
+ hasRecordReloadOnFollowersUpdate: !!followers_post_refresh,
isActivityBoxVisible: this._getFieldOption('message_ids', 'open_attachments', false),
};
const fieldsInfo = this.fieldsInfo[this.viewType];