diff options
| author | qho <qho@odoo.com> | 2020-03-10 07:50:27 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-06-29 11:56:36 +0000 |
| commit | 1424a3839a6c304599bdeefcd74f29279ae75420 (patch) | |
| tree | f78d9388f3dfd55ffdc8b24ac6aaa4304571fd94 /addons/mail/static/src/models/thread/thread.js | |
| parent | 78e2d2e2fb49814c2f51dd97d2ddba6ba533d2e1 (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/models/thread/thread.js')
| -rw-r--r-- | addons/mail/static/src/models/thread/thread.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/mail/static/src/models/thread/thread.js b/addons/mail/static/src/models/thread/thread.js index 2267d170f10..9bedc8096bc 100644 --- a/addons/mail/static/src/models/thread/thread.js +++ b/addons/mail/static/src/models/thread/thread.js @@ -1045,6 +1045,7 @@ function factory(dependencies) { * @param {boolean} [param0.mail_invite_follower_channel_only=false] */ _promptAddFollower({ mail_invite_follower_channel_only = false } = {}) { + const self = this; const action = { type: 'ir.actions.act_window', res_model: 'mail.wizard.invite', @@ -1061,7 +1062,10 @@ function factory(dependencies) { this.env.bus.trigger('do-action', { action, options: { - on_close: () => this.refreshFollowers(), + on_close: async () => { + await this.async(() => this.refreshFollowers()); + this.env.bus.trigger('mail.thread:promptAddFollower-closed'); + }, }, }); } |
