Commit Graph
8 Commits
Author SHA1 Message Date
Kevin Baptiste 60728a63db [IMP] hr_holidays: convert dashboard and widget to OWL
Convert the `leave_stats` widget and the leaves dashboard to OWL.

closes odoo/odoo#80397

Taskid: 2675380
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-06 16:49:20 +00:00
Sébastien Theys 4cd70f164e [IMP] mail, hr, hr_holidays, *: batch mail partner format
* = test_discuss_full

Overall less queries.

Changes:

- Batch `mail_partner_format`.
- Batch `user.employee_id` compute.
- Remove query for current leave state, use fields (and prefetch) instead.
- Move current leave state in partner format instead of channel info.

Part of task-2622462

closes odoo/odoo#73174

Related: odoo/enterprise#20186
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-08-12 15:22:59 +00:00
Xavier Morel 053285afdc [FIX] web: momentjs warnings
* Without an explicit format string, moment() should be called with
  ISO date(times).
* Correctly destroy all test locales (`zz` was not destroyed at all,
  and `englishForTest` was double-destroyed instead of destroying
  `frenchForTests`).
* Avoid creating a moment object from the value `false` in date(time)
  fields.
* Disable the warning entirely in dates_tests, the contents are super
  messy and weird.
2021-06-29 05:34:16 +00:00
Didier (did) 6240617358 [IMP] mail, *: use explicit export instead of default
* = hr, hr_holidays, im_livechat, sms, snailmail, website_livechat,
    website_slides

Exporting directly on the line of the class or variable definition is less lines
of code and less repetition (and risk or mistake).

Exporting with a name instead of default allows to catch typos more easily when
importing and ensures the same name is used for consistency (and ease of grep).

closes odoo/odoo#72597

Related: odoo/enterprise#19224
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-25 14:56:52 +00:00
Qiuyu (QHO) bd67479316 [REF] mail, mail_bot, im_livechat, *: convert JS files to ES6 modules
task id: 2487514

closes odoo/odoo#69376

Related: odoo/enterprise#17749
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-19 13:33:35 +00:00
Michael Mattiello (mcm)andged-odoo 7086488064 [REF] web, *: remove patchMixin + imp utils.patch
* hr, hr_holidays, im_livechat, mail, snailmail, website,
  website_livechat

This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.

`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.

closes odoo/odoo#65967

Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
2021-02-26 10:39:21 +00:00
Xavier Dubuc de638c3f18 [FIX] hr_holidays: bring back the out of office panel in threads
task-2277511

closes odoo/odoo#62638

X-original-commit: d9aa362914945e6cb095b04fa94cfb3469abd907
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-02 11:03:39 +00:00
Lucas Lefèvre 2b9aec2415 [IMP] hr_holidays: Add leave stats widget
When approving a leave, to make an informed decision, it might
be needed to check leaves already taken by the employee or leaves
of its collaborators. This commit adds a widget displaying some stats
in a leave form view. Stats displayed are:
   - the number of days taken
   by the employee this year, grouped by leave type
   - Leaves taken by employees in the same department in the month
   of the leave.
This widget is only displayed in the context of the action leading
to leaves to approve.
2019-05-17 11:22:10 +02:00