Commit Graph
148 Commits
Author SHA1 Message Date
Prakash Prajapati bd7f6df4af [FIX] hr: fix the traceback when click on a resource
Steps to reproduce:
-Install planning
-Go to Gantt View
-Click on resource avatar

task-2960247

closes odoo/odoo#99551

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-06 21:23:55 +02:00
Louis Wicket (wil) 9fded39f48 [IMP] hr, mail: use Channel instead of Thread in getChat
Part of task-2948676.

closes odoo/odoo#99281

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-31 17:54:22 +02:00
Brieuc-brd bfe9792d45 [REF] hr: review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2892062

Part-of: odoo/odoo#96195
2022-08-30 17:10:14 +02:00
Kevin Baptiste 6d9ec56bd1 [IMP] hr: migrate widgets/views to Owl 2022-08-24 09:23:01 +02:00
Louis Wicket (wil) 5d43fad9e6 [IMP] mail, *: auto add implicit attributes of identifying fields
Automatically add `required` and `readonly` on identifying fields and
remove them from field definition.

Task-2955910.
* = calendar, hr, im_livechat, rating, snailmail, website_livechat

closes odoo/odoo#98283

Related: odoo/enterprise#30511
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-17 19:48:53 +02:00
Kevin Baptiste d3b9f2c443 [IMP] hr: properly show images on kanban/form
The avatars were not properly shown anymore on kanban and form views.

closes odoo/odoo#98264

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-17 18:38:08 +02:00
Sébastien Theys 60c87dd426 [IMP] mail, *: introduce identifyingMode and remove identifyingFields
* = calendar, hr, im_livechat, rating, snailmail, website_livechat

This simplifies definition and overrides and opens up new identification
opportunities.

Part of task-2741982

closes odoo/odoo#98166

Related: odoo/enterprise#30470
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-08-17 11:21:40 +02:00
tsm-odoo 75007b578e [MOV] bus, *: move startServer test helper to the bus module
*: calendar, hr, hr_holidays, im_livechat, note, rating, snailmail,
test_mail, test_mail_full, website_livechat, website_slides.

Part-of: odoo/odoo#97771
2022-08-10 14:43:41 +02:00
Michael (mcm) e181eb6dd6 [IMP] hr: convert field WorkPermitUpload
This commit rewrites WorkPermitUploadField using the new framework.

closes odoo/odoo#96783

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 13:26:34 +02:00
Kevin Baptiste ecf07e1043 [IMP] hr,hr_expense: adapt kanban views to OWL
task-2900536

closes odoo/odoo#95317

Related: odoo/enterprise#29116
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-12 13:21:07 +02:00
Romeo Fragomeli 9b5c9484fe [REF] *: BS5: adapt changes in media query mixin
> Media query mixins parameters have changed for a more logical approach

> media-breakpoint-down() uses the breakpoint itself instead of the next
> breakpoint (e.g., media-breakpoint-down(lg) instead of
> media-breakpoint-down(md) targets viewports smaller than lg).
> Similarly, the second parameter in media-breakpoint-between() also
> uses the breakpoint itself instead of the next breakpoint (e.g.,
> media-between(sm, lg) instead of media-breakpoint-between(sm, md)
> targets viewports between sm and lg).

https://getbootstrap.com/docs/5.1/migration/#sass

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Rahul Prajapati 71a68c5923 [IMP] *: remove support for empty create with pyenv
* hr, im_livechat, mail, sms, snailmail, test_mail_full, website_livechat,
  website_slides

PURPOSE:

Creating a record with no values has no sense but is sometimes useful during
tests.
The support should be dropped for `default` parameter in `create`.

SPECIFICATION:

All the occurrences of `create()` have been replaced by `create({})`.

Task-2869394

closes odoo/odoo#93917

Related: odoo/enterprise#28538
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-20 15:31:51 +02:00
tsm-odoo 3573a7fef4 [IMP] mail, *: use wowlEnv instead of the legacy one
*: bus, calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, project,
sms, snailmail, test_mail, web, website_livechat, website_slides.

task-2582313

closes odoo/odoo#83774

Related: odoo/enterprise#26493
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-30 19:40:53 +02:00
tsm-odoo 038e83e7aa [IMP] mail, *: replace target by document
*: hr, hr_holidays, im_livechat, test_mail.

The target returned by the mail's test utils start method is useless since it's
almost the same thing than querying document. Let's remove it and replace it by
document. This will reduce the diff in the PR introducing the new environment in
the discuss app.

task-2582313

closes odoo/odoo#92077

Related: odoo/enterprise#27670
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-24 11:43:57 +02:00
Leonardo Pavan Rocha 31bf4abcb3 [IMP] hr: improves department kanban view
The recruitment kanban view was redesigned and it looks good, so it was
decided to implement the same design on the department kanban view. This commit
adds the number of employees to the "Employees" button and makes the kanban
cards wider.

task-2849418

closes odoo/odoo#91293

Related: odoo/enterprise#27324
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-24 09:41:24 +02:00
tsm-odoo 9c1cf242c0 [IMP] mail, *: replace widget el by target
*: hr, test_mail.

This PR prepares the ground for the one introducing the new environment in the
discuss app. Indeed, the createWebClient helper will be used instead of createView/Widget
thus the returned value won't be a Widget anymore but a DOM element. This change impacts
they way the tests were written: JQuery functions have to be transformed to native JavaScript
ones. In order to reduce the noise in the main PR, those changes are done now.

task-2582313

closes odoo/odoo#91290

Related: odoo/enterprise#27313
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-13 18:11:00 +02:00
tsm-odoo bd02fcc8f6 [IMP] mail, *: remove useless widget destroy
*: calendar, hr, note, test_mail.

Since community#86338, widget destruction is registered in the start method. Thus,
explicit calls to widget.destroy during tests are useless. This PR prepares the ground
for the one introducing the new environment in the discuss app. Indeed, the former PR
will use createWebClient instead of createView/Widget constructor thus, we won't be able
to call destroy on the returned value anymore. In order to reduce the noise in the main PR,
all the calls to widget.destroy have been removed.

task-2582313

closes odoo/odoo#91082

Related: odoo/enterprise#27192
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-11 16:00:41 +02:00
Alexandre Kühn 23962f3d4b [IMP] mail, *: remove this.async()
*: calendar, hr, snailmail

Task-2837854

closes odoo/odoo#90230

Related: odoo/enterprise#26790
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-04 15:38:25 +02:00
tsm-odoo 7e5a71ab71 [IMP] mail, *: always mount discuss/chatWindow/dialog during tests
*: hr, im_livechat, snailmail, website_livechat.

This PR prepares the ground for  the one introducing the new environment in the
discuss app. Indeed, tests will now use the mainComponentRegistry in order to mount
those components. Doing so, the parameters has{Discuss/Dialog/ChatWindow} will become
obsolete. Removing those parameters now helps reducing the noise in the main PR.

task-2582313

closes odoo/odoo#90120

Related: odoo/enterprise#26759
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-03 13:31:08 +02:00
sofiagvaladze be49740169 [IMP] hr: make Launch Plan multi-employee action
Purpose:
    Increase usability of the Plan feature

This change implies changing 'hr.plan.wizard' m2o employee_id
field into m2m employee_ids field.

task - 2797331

closes odoo/odoo#88119

Related: odoo/enterprise#26264
Related: odoo/upgrade#3439
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-03 06:44:51 +02:00
Alexandre Kühn 3a8b0ee923 [IMP] mail, *: replace link commands to replace
*: hr, hr_holidays, im_livechat, website_livechat

This commit turns some `link`/`unlink`/`unlinkAll` to `replace`/`clear`.
The commands `replace`/`clear` are easier to understand, and also clearly tells what’s the expected resulting value of this field.

This change will help turning big and imperative code into smaller declarative code.

Task-2834598

closes odoo/odoo#89852

Related: odoo/enterprise#26673
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-29 19:23:49 +02:00
tsm-odoo 54a25b32b3 [IMP] mail: add notify to messaging
This PR prepares the ground for the one introducing the new env in discuss.
The signature of the notify function has changed a lot from the one in the old env.
In order to ease the transition and reduce the noise, the discuss models now
rely on the messaging's notify function.

task-2582313

closes odoo/odoo#89877

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-29 11:01:25 +02:00
tsm-odoo 0b60725288 [IMP] mail, *: add rpc to messaging
*: calendar, hr, im_livechat, mail, mail_bot, snailmail, website_slides.

This PR prepares the ground for the one introducing the new env in discuss.
The signature of the rpc function has changed a lot from the one in the old env.
In order to ease the transition and reduce the noise, the discuss models now
rely on the messaging's rpc function.

task-2582313

closes odoo/odoo#89858

Related: odoo/enterprise#26676
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-29 11:01:18 +02:00
tsm-odoo 848e8d7ee4 [IMP] mail, *: adapt remaining tests data seeding
*: calendar, hr, hr_holidays, im_livechat, mail, note, sms, snailmail,
test_mail, website_livechat, website_slides.

task-2792108

closes odoo/odoo#87700

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-04 17:48:39 +02:00
tsm-odoo a1f7ca7895 [IMP] hr: register m2x avatar employee fake model
In preparation of test adaptation after introducing a new way to
seed test data, the fake model present on the m2x avatar employee test
has been registered to the model definitions instead of being
declared on it's test.

task-2792108

closes odoo/odoo#87665

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-31 18:18:14 +02:00
Louis Wicket (wil) ee9759a144 [MOV] mail, *: move utils files up
* = calendar, hr, hr_holidays, im_livechat, note, sms, snailmail,
test_mail, website_livechat, website_slides
Task-2759586

closes odoo/odoo#86791

Related: odoo/enterprise#25491
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 13:39:56 +01:00
stefanorigano (SRI) c9d58ecca4 [IMP] web,*: o_cursor_default utility-class
This commit is part of v16 overall restyle, task-2704984.

task-2797245

closes odoo/odoo#86626

Related: odoo/enterprise#25365
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-03-21 14:01:03 +01:00
Louis Wicket (wil) e16976ddfc [IMP] mail, *: move up model files
Move model definition files from `models/thing/thing.js` to
`models/thing.js` and remove the now empty intermediate directory.

Task-2759582
 * = calendar, crm_livechat, hr, im_livechat, mail_bot, sms, snailmail,
     website_livechat, website_slides

closes odoo/odoo#86464

Related: odoo/enterprise#25291
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-17 11:27:59 +01:00
tsm-odoo b15959cd95 [IMP] mail, *: make start method handle cleanup
*: calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, sms, snailmail,
website_livechat, website_slides.

This commit prepares the removal of beforeEach function in the
mail test suite. Cleanup was relying on beforeEach adding widgets,
components, unpatch method 'this'. We need to clean things up without
using either beforeEach or 'this'.

task-2792108

closes odoo/odoo#86526

Related: odoo/enterprise#25326
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-16 16:07:58 +01:00
tsm-odoo 1e828a14ec [IMP] mail: get closer from python model definition in test setup
*: hr, hr_holidays, im_livechat, mail, snailmail, test_mail, website_livechat,
website_slides.

This commit will remove the need to duplicate models definition for
test purposes. Indeed, for now, we need to mock the model definitions
on the client side. Those models definitions are often very different
from the ones found on the server.

This approach will allow us :
	- to ease model definitions during tests
	- to get closer from the real models

task-2767820

closes odoo/odoo#84828

Related: odoo/enterprise#24486
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-10 18:19:59 +00:00
Philippe Wauthy 08a5bf761f [IMP] hr_*, sms: improve ux
Reorder smart buttons on the hr_employee to have them in the following order:
1. Documents
2. Holiday status
3. Time Off
4. Planning
5. Timesheets
6. Equipments
7. Cars
8. Contracts
9. Appraisal
10. Work Entries
11. Payroll
12. Attendance
13. Extra Hours

- Log in the chatter the name of the plan that has been started via the button "Launch Plan"

- When on mobile, open the Time Off Calendar in month view

- When sending a sms without any message, only display Message once in the invalid fields

- Avoid the sms-help info disappearing when clicking on it and there are characters in the body of the message

- Update the tooltip of phone number in the send sms wizard

- Avoid the employee name to be displayed on two lines on mobile if the name is too long. Reduce the font size instead

task-2735679

closes odoo/odoo#83745

Related: odoo/enterprise#23886
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-02 18:45:59 +00:00
tsm-odoo 0862f2fab0 [IMP] mail, *: make mail module's beforeEach functions async
*: calendar, hr, hr_holidays, im_livechat, note, sms, snailmail,
website_livechat, website_slides.

This commit prepares the ground for the model definitions PR.
In order to reduce the noise, all mail module's beforeEach
functions will be made async.

task-2767820

closes odoo/odoo#84845

Related: odoo/enterprise#24489
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-18 13:26:49 +00:00
Samuel Degueldre 07bbe4e8dc [IMP] test_lint, *: activate no-duplicate-imports eslint rule
*: base_automation, hr, mail, web, web_tour, website_payment

Previously, some modules were imported twice, this increases duplication
and can make refactoring more difficult. This commit enables the
no-duplicate-imports eslint rule and fixes offending modules to remove
duplicates.

closes odoo/odoo#84530

Related: odoo/enterprise#24319
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-02-15 09:26:54 +00:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Sébastien Theys 611046040b [IMP] mail, *: avoid repetition in inverse relation type (js)
* = hr, im_livechat, website_livechat

task-2741386

closes odoo/odoo#83059

Related: odoo/enterprise#23616
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-20 13:29:04 +00:00
Julien Mougenot db63ff2259 [REF] web: Owl imports adaptation
In the next version of Owl, all exported terms are directly available
from the top level `owl` object. This commit aims to adapt existing
imports to this new system. This is done by importing any Owl property
used in files at the top, right after the `import` or `require`
statements.

closes odoo/odoo#82736

Related: odoo/enterprise#23609
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-01-20 11:03:01 +00:00
Alexandre Kühn b2d2b78fbc [IMP] mail: rename user model
Rename javascript model mail.user to User in order to distinguish
javascript models from python models.

Task-2701674

closes odoo/odoo#81471

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-15 15:50:44 +00:00
Louis Wicket (wil) db0afd3760 [IMP] mail, *: rename partner model
Rename javascript model `mail.partner` to `Partner` in order to
distinguish javascript models from python models.

Part of task-2701674.
 * = hr, hr_holidays, im_livechat, website_livechat

closes odoo/odoo#81406

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 11:12:47 +00:00
Louis Wicket (wil) 5ce76d3af8 [IMP] hr: rename employee model
Rename javascript model 'hr.employee' to 'Employee' in order to
distinguish javascript model from python model.

Part of task-2701674.

closes odoo/odoo#80561

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 11:11:51 +00:00
Louis Wicket (wil) a43d662017 [IMP] mail, *: rename thread model
Rename javascript model `mail.thread` to `Thread` in order to
distinguish javascript models from python models.

Part of task-2701674.
 * = hr, hr_holidays, im_livechat, website_livechat

closes odoo/odoo#81433

Related: odoo/enterprise#22910
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 01:59:16 +00:00
Louis Wicket (wil) deb12bc032 [IMP] hr, mail, snailmail: rename messaging model
Rename javascript model `mail.messaging` to `Messaging` in order to
distinguish javascript models from python models.

Part of task-2701674.

closes odoo/odoo#81386

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 00:10:48 +00:00
Kartik Chavda 17e58758de [IMP] sale,sale_(project,timesheet): improve the UI
Purpose of the commit is to do the generic improvement for the
project:

So in this commit, done the following changes:
- duplicating a project, copy all milestone of project and
set is_reached and deadline field as 'False'.
- chanage the order of the state button in sale order form view.
- pass mail body as default description value in message_new
method of project task.

task-2652943

closes odoo/odoo#77065

Related: odoo/enterprise#21199
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-26 13:37:58 +00:00
Louis Wicket (wil) 2cb3f774a1 [IMP] mail,*: change model declaration syntax
* = calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot, sms,
     snailmail, website_livechat

This commit will change the declaration of the models with the aim of
getting closer to a plain JSON-object. It allows us to eliminate a wide
portion of boilerplate code, making the declaration shorter, more
declarative, and less redundant, but mainly, it prepares the ground for
further changes.

Task-2695223

closes odoo/odoo#79259

Related: odoo/enterprise#22042
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-23 17:53:46 +00:00
Kevin Baptiste 60d62a1d9d [REF] hr*: misc cleanup
*: hr_expense, hr_holidays, hr_work_entry_holidays

- Remove unused template;
- Remove unused fields (hr_expense);
- Rename group_days_allocation to convey proper meaning;
- Remove deprecated method.

closes odoo/odoo#78128

Related: odoo/upgrade#2907
Taskid: 2665866
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-20 15:15:03 +00:00
Sébastien Theys 3a87aaf914 [IMP] mail, *: clean up message component by introducing view model
* = hr, hr_holidays, sms, snailmail, website_livechat

Message model incorrectly contained data related to a specific component (only
one) even though there can be multiple message components per message model.

This cascaded to adapting related component/models to the same principle.

closes odoo/odoo#76718

closes odoo/odoo#77779

Related: odoo/enterprise#20964
Related: odoo/enterprise#21426
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-05 15:40:49 +00:00
Kevin Baptiste 2012a9d205 [FIX] hr: bring back "My Profile"
Since the merge of 0573aca the override was no longer working.

closes odoo/odoo#77097

Taskid: 2651838
X-original-commit: 947194644a09f186899f2b2526cf0b0675af7304
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-09-24 05:50:48 +00:00
Zelong Lin 51ff8b09db [REF] *: convert JS files to ES6 modules
* = hr, hr_holidays, sms, snailmail, website_livechat, account_invoice_extract,
approvals, documents, mail_enterprise, calendar, crm, mrp, note, website_slides,
crm_enterprise, sign, social, voip

task-2510656

closes odoo/odoo#72712

Related: odoo/enterprise#19241
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-08-24 14:31:55 +00:00
Sébastien Theys 41445f2ae6 [IMP] mail, hr: access messaging without env in remaining places
Part of task-2582313
2021-08-19 13:55:28 +00:00
Sébastien Theys 1a98248155 [IMP] mail, *: access models without env in models
* = hr, im_livechat, website_livechat

Part of task-2582313
2021-08-19 13:34:59 +00:00
Sébastien Theys 166999e725 [IMP] mail, *: access messaging without env in models
* = hr, hr_holidays, im_livechat, sms, snailmail, website_livechat

Part of task-2582313
2021-08-18 14:56:50 +00:00