Commit Graph
151539 Commits
Author SHA1 Message Date
stefanorigano (SRI) ee95f41dbf [FIX] web: o_searchview design consistency
Review 'o_searchview' menu entries design, improving consistency within
the overall UI.
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2800721

Part-of: odoo/odoo#87448
2022-05-05 14:00:35 +02:00
Brieuc-brd 46685507c2 [REF] mail: ThreadTextualTypingStatus, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2843495

closes odoo/odoo#90533

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-05 12:59:27 +02:00
tsm-odoo c77c49881b [FIX] web: remove unnecessary parameter in mocked method
The recordId parameter was not necessary in the _updateComodelRelationalFields method
of the legacy mock_server

closes odoo/odoo#90497

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-05 12:59:21 +02:00
Bruno Boi b7d6a56203 [FIX] web: close dropdown on capture outside click
Before this commit
An open dropdown stays opened if any other element stop a click event

closes odoo/odoo#90363

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-05 12:59:15 +02:00
Odoo's Mergebot b01f92ad8f [MERGE] web_editor: improve code to ease knowledge and new commands integration
# Preparatory work for the new Knowledge module (part 1)

## Contents

* Add contenteditable as a safe attribute for DOMPurify.sanitize

> Before this change, the function _safeSetAttribute would remove contenteditable
attributes in collaborative mode when it should not have.

* Add failsafe upon CTRL+BACKSPACE

> The /template command creates a block which will contain paragraphs. We don't
want to allow this block to not have children.
>
> This commit prevents the removal of a `<p>` element if it is empty and is the
last child of its parent.
>
> In other cases, allows the removal of the last node, but insert an empty `<p>`
if the parent is a block when it becomes empty because of a CTRL+BACKSPACE.

* Prevent command refocus when unnecessary

> When typing a command in a template block, the caret must stay in the
template.
>
> Since it is CONTENTEDITABLE=FALSE and has a CONTENTEDITABLE=TRUE element, the
editable context changes and calling `this.editable.focus` will force the caret
out. Instead, we only have to call the focus if the activeElement is not a child
of `this.editable`.

* Expand deleterange for uneditables

> In Chrome, it is possible to partially select the contents of a
CONTENTEDITABLE=FALSE element if it has a CONTENTEDITABLE=TRUE child.
>
> This commit prevents breaking such uneditables by expanding the range in a
deleterange to fully contain such elements.
>
> This will prevent removing only the toolbar of a /template block in
Knowledge.

closes odoo/odoo#86489

Task-id: 2794990
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-05 11:41:58 +02:00
abd-msyukyu-odoo f75462eeaf [IMP] web_editor: expand deleterange for uneditables
In Chrome, it is possible to partially select the contents of a
contenteditable=false element if it has a contenteditable=true child.

This commit prevents breaking such uneditables by expanding the range in a
deleterange to fully contain such elements.

It will be useful with the new blocks introduced with the Knowledge module.

Task-id: 2794990
Part-of: odoo/odoo#86489
2022-05-05 11:41:57 +02:00
abd-msyukyu-odoo f4d72dd1ed [IMP] web_editor: prevent command refocus when unnecessary
Currently, the focus is forced on this.editable when using a powerbox command.

Knowledge /template will introduce blocks which are contentEditable=False, but
contains sub-elements with contentEditable=True, which are allowed to use
powerbox commands. Those sub-elements have another editable context as
this.editable. As such, forcing a refocus on this.editable will remove the
caret from the sub-element.

Avoid doing the refocus if the currently focused element is a child of
this.editable and is contentEditable=true.

Task-id: 2794990
Part-of: odoo/odoo#86489
2022-05-05 11:41:56 +02:00
abd-msyukyu-odoo c007dafae8 [IMP] web_editor: add failsafe upon CTRL+BACKSPACE
Prevents the user to remove the last child (if it is an empty block) of an
editable, in order to avoid the case where the user can add text nodes directly
in a block where it should not be possible (i.e. directly under this.editable).

Replaces any empty block other than `<P>` by an empty `<P>` which is the default
block for the editor.

Task-id: 2794990
Part-of: odoo/odoo#86489
2022-05-05 11:41:55 +02:00
abd-msyukyu-odoo e82e96f173 [IMP] web_editor: set contenteditable as a safe attribute
Add the attribute 'contenteditable' to the frozen list for html elements of
DOMPurify, so that this attribute is not sanitized in collaborative mode when
using _safeSetAttribute.

Task-id: 2794990
Part-of: odoo/odoo#86489
2022-05-05 11:41:54 +02:00
Alexandre Kühn e1ee05ae47 [IMP] mail: introduce view models (step 6)
This commit introduces models that define records being 1:1 map with components,
as a step to move further to having essentially all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2831082

closes odoo/odoo#90569

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-05 00:49:43 +02:00
Dharmraj Jhala d3777682cc [FIX] website: prevent inconsistent state of the navbar publish toggle
Currently, if a page is loading and someone quickly clicks exactly on
the input checkbox within publish management button of website navbar,
the checkbox (input) is toggled but the string does not change.
This happens because the checkbox is toggled before the click event on
`js_publish_btn` is bound. Ideally, the checkbox should be toggled only
based on the state of the object (whenever it's changed after a
successful RPC call) so that the information we see is correct.

This commit fixes the issue by disabling the input checkbox so that
it is toggled only after the state is changed by RPC call and not
when user simply clicks on the input. Apart from that, now we toggle
`css_published` and `css_unpublished` based on the state of RPC so that
the button strings are always consistent with the checkbox.

task-2819345

closes odoo/odoo#90550

X-original-commit: 86225a7f00ae90463570221e87ace5212fb71dba
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-04 23:22:00 +02:00
Brieuc-brd 59373295c0 [IMP] web: increase $border-radius-lg value
Before this commit, the gap between `$border-radius` and
`$border-radius-lg` was too small and couldn't be differentiated easily.

After this commit, the value of `$border-radius-lg` is higher and can be
used for elements that need larger rounded corners
(e.g. Discuss components).

enterprise: https://github.com/odoo/enterprise/pull/25737
task-2810274

closes odoo/odoo#87521

Related: odoo/enterprise#25737
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-05-04 23:21:49 +02:00
Brice bib Bartoletti 48d6015125 [FIX] account: tax details mapping with misc entry
Goal:
Fix the tax details results when interacting with misc entry containing 2
opposite lines with the same tax.

The bug:
Wrong mapping in tax details query results in wrong amount in the global tax
report.

reproduction step pre-requisite:
- a simple sale tax A
- miscellaneous contains 2 lines,
	- amount X debit with sale tax A
	- amount Y credit with purchase tax A
- 2 tax lines gets automatically created

Before this commit:
The global tax report will display a base amount of 2*(X-Y)
which is wrong.

After this commit:
The global tax report will display a base amount of (X-Y)
which is correct.

Context:
When the tax details was made, it wasn't taken into account that there
could be 2 tax line (account_move_line) for the same tax in the same
account_move if the move is a miscellaneous entry (move_type = 'entry').
As a misc can contain both refund and invoice line at the same time (Due to a
PoS order for example), there could be tax_line created by the
invoice_repartition_line and another one created by the refund_repartition_line.
This results in a mapping in which there are some wrong results that should have
been filtered out.
The wrong results are the following match:
invoice_base_line -> refund_tax_line
refund_base_line -> invoice_tax_line

Solution:

1) To avoid the confusion we just need to filter out the wrong results.
2) In a misc entry, what makes a tax considering the base line as an invoice or
a refund is its balance.
3) In a misc entry, the sign of the tax line balance is the result of a
transformation of the base line sign.

This transformation is just a multiplication by the sign of the tax rate and
the sign of the factor_percent of the tax line repartition line.
This means that we can re apply this transformation to the base_line or the
inverse of it to the tax_line and check if it matches.
If it doesn't, we can confidently discard the match because the tax_line balance
can't be the result of a transformation applied to this base_line balance.

This is only valid for misc entry. In misc entry, negative base_line and
positive base_line are segragated for their tax line creation.

Additional notes:
A test is added to the enterprise repository to check the global tax report
result.

closes odoo/odoo#90563

Ticket: 2832745
Community-pr: https://github.com/odoo/odoo/pull/90399
Enterprise-pr: https://github.com/odoo/enterprise/pull/26827
X-original-commit: 690ef4e526b26911678ca872e7eb481215017f1c
Related: odoo/enterprise#26961
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
2022-05-04 21:24:40 +02:00
Pierre Rousseau aee53b0d48 [FIX] web: ensure realpath is installed
With this commit, if realpath is not available (for exemple on macos),
the script is directly stopped.

closes odoo/odoo#90522

X-original-commit: 7857c577948d55842a5697ca6d91bb6ea656ef6e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-05-04 19:17:45 +02:00
Pierre Rousseau 9e65c6a00b [FIX] web: fix tooling for enterprise repo
Since fcf2e2210a639adfcdb9236c24cfb31046b6dead, the path of enterprise
is derived from the tooling path instead of the community path.

X-original-commit: 4ff8f62aa1e10d27189ebbdd22a01711c700ea32
Part-of: odoo/odoo#90522
2022-05-04 19:17:44 +02:00
David Monjoie f3372799ae [FIX] web_editor: fix traceback on paste
When fakeEl is empty, firstChild and lastChild both equal null.

task-2842638

closes odoo/odoo#90523

X-original-commit: 626caa89cf290f226b19dfa73bc4ab41c7f95fc0
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-04 17:46:41 +02:00
Sébastien Geelen (sge) d8fd724cb3 [FIX] web_editor: transform orphan LI into P
Avoid living `<li>` tags without a `<ul>` or `<ol>` parent
in the editable html.

task-2842638

closes odoo/odoo#90518

X-original-commit: c6660d9ae1c931da3ad442b30f610db463ede894
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-04 17:46:35 +02:00
roen-odoo f48da4335b [FIX] point_of_sale: prevent multiple click on print invoice
Current behavior:
When clicking multiple times on the print invoice button of an order
the customer rank would not update correctly

Steps to reproduce:
- Have PoS installed
- Start a PoS session, and select customer A
- Create an order, make the payment
- Go in the order tab and select the order you just made
- Click on the Print invoice button multiple times
- Customer rank isn't updated correctly

opw-2813512

closes odoo/odoo#90515

X-original-commit: 695c3dfd46d4e421a06f6dd33861e42bdb03efe0
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-05-04 17:46:27 +02:00
Julien Van Roy a3473ae7d6 [FIX] l10n_za: tax report, fix missing line in computation
The field 19 (Total Input Tax) should be equal to:
14 + 14A + 15 + 15A + 16 + 17 + 18 as specified in:
https://www.sars.gov.za/wp-content/uploads/Ops/Guides/GEN-ELEC-04-G01-Guide-for-completing-the-Value-Added-Tax-VAT201-Declaration-External-Guide.pdf,
page 26, but 15A was missing.

opw-2832895
task-2841115

closes odoo/odoo#90507

X-original-commit: 0da6980b1bfcfb38ddbc2d0f63bd1986ae277609
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-05-04 17:46:19 +02:00
Odoo's Mergebot 9ad47e6be2 [MERGE][IMP] base,website_profile: improve the rank layout
Currently if a user is having huge number of karma/xp (for example
10000), when viewing the website profile, these numbers overlap the
design of a next rank layout card.

This commit formats the karma/xp into decimal number (allowing up
to two decimal points so that the information is meaningful) and
thus reducing the space being occupied by large numbers.

task-2792149

closes odoo/odoo#87996

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-05-04 17:46:14 +02:00
MAHAMADASIF ANSARI 1e2d8cf44a [IMP] base: website_profile: improve the rank layout
Currently if a user is having huge number of karma/xp (for example
10000), when viewing the website profile, these numbers overlap the
design of a next rank layout card.

This commit formats the karma/xp into decimal number (allowing up
to two decimal points so that the information is meaningful) and
thus reducing the space being occupied by large numbers.

task-2792149

Part-of: odoo/odoo#87996
2022-05-04 17:46:12 +02:00
MAHAMADASIF ANSARI e246bf1448 [IMP] base: allow to specify decimal points with format_decimalized_number
Currently, we can format the number into decimal points with help of
the `format_decimalized_number` option of `ir.qweb.field.integer`
class. However, sometimes we need to decide how many decimal points
we need to display, which is not possible with current implementation.

This commit improves the above option and now allows to pass the number
of decimal points, with a new option `precision_digits`, which defaults
to one decimal point.

task-2792149

Part-of: odoo/odoo#87996
2022-05-04 17:46:12 +02:00
Alexandre Kühn 5c1e7a6f5d [IMP] mail: introduce view models (step 5)
This commit introduces models that define records being 1:1 map with components,
as a step to move further to having essentially all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2831082

closes odoo/odoo#90427

Related: odoo/enterprise#26928
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-04 16:43:44 +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
Nicolas (vin) 1ff279f11c [FIX] account_facturx: make factur-x xml compliant
The xml we generate for factur-x is no longer compliant with all
the latest standards. With these changes, we are providing the tools
to make it work once again and make sure it is validated by the
factur-x and zugferd validators in all aspect (PDFA/3, XMP, XML)
It should also be valid to be sent to Chorus pro if applicable.

This adds a mapping to the UNECE unit of measure codes for uom, that
are required for factur-x.

It will also calculate a category for each taxes as such:
    - If the tax is an export from EU to outside EU, G.
    - If the supplier and customer are both in EU but different country,
        K
    - If both are in EU, in the same country but the tax amount is 0, E
    - Otherwise, it will be S.
See https://unece.org/fileadmin/DAM/trade/untdid/d16b/tred/tred5305.htm

opw-2714544

closes odoo/odoo#90105

X-original-commit: e1bfb363bccd7b84f660d1e6c5b1e4d4fe02d398
Signed-off-by: Laurent Smet <las@odoo.com>
2022-05-04 13:53:42 +02:00
Pablo Montenegro 075152d1a0 [FIX] l10n_ar: Delete “Unified Book” option on sale journals
Before this change, we bringed to the user the posibility to select the option “Unified Book” (boolean) on journals with type “Sales” and Pre-printed Invoice “AFIP POS System”. This allowed all documents with the same letter document to use the same sequence, and it does not matter if they are invoices, credit notes or debit notes for example.
Now that functionality is deleted and all documents will have their own sequence regardless of the letter document of each receipt.

closes odoo/odoo#88129

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-05-04 11:53:45 +02:00
Benoit Socias af5bf85d34 [FIX] web_editor, website: increase stability of ace test tour
This is an attempt at fixing a runbot race condition.
It was executed succesfully without any error on Multi build around
200 times on runbot.

Since [1] the reset button could be clicked before the HTML editor was
reloaded.
The `MutationObserver` in `tour_service.js` is debounced. Because of
this the states used to detect tour steps triggers might differ between
executions.
With the Reset button of the HTML editor not being hidden in the
rendered template, it might be detected before it gets hidden during
the `start` of `ace.js`.

This commit makes sure the the editor is both closed then reopened with
the Reset button visible before clicking on it, and also makes sure the
Reset button is not visible by default upon rendering.

[1]: https://github.com/odoo/odoo/commit/d20468c3463927a54c34688769a22b3949c5c465

runbot-3674

closes odoo/odoo#90453

X-original-commit: b35f127c86c1d271a76dae7186a96190e8558c73
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-04 10:55:59 +02:00
Julien Castiaux d9608b1932 [FIX] core: skip debugger for JSON-RPC in --dev=werkzeug
When started with the CLI option --dev=werkzeug, errors in controllers
are caught by a friendly web debugger. This debugger should not be
started in case of error in a JSON-RPC controller.

closes odoo/odoo#90420

Task: 2837457
X-original-commit: 711a29e76f55e87d73dad89ddbef889dd5c7af10
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-05-04 10:55:55 +02:00
thcl-odoo b6e08d662d [FIX] google_calendar: add show_as on sync
Current behavior :
When a Google Agenda event is created with "Show as" set to Available,
Show as (`show_as`) isn't set accordingly

Steps :
- Install Calendar
- setup and activate Google Calendar sync
- Create an event and set "Show as" on Available
- Refresh Odoo calendar to sync it
-> Created event "show as" is set to Busy

OPW-2805096

closes odoo/odoo#90261

X-original-commit: ff56f8126e105f2196843fed1646a3081f25aff3
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2022-05-04 10:55:47 +02:00
thcl-odoo a784ddab33 [FIX] google_calendar: add Meeting URL on sync
Current behavior :
When a Google Agenda event is created with a meeting, the Meeting URL
(`videocall_location`) isn't set at creation.

Steps :
- Install Calendar
- setup and activate Google Calendar sync
- Create an event with a meeting via Google Calendar
- Refresh Odoo calendar to sync it
-> Created event doesn't contains a Meeting URL

OPW-2805096

X-original-commit: f85dfa2b3cb1fa03dcaa10b93fc5309b3a04eae6
Part-of: odoo/odoo#90261
2022-05-04 10:55:46 +02:00
clesgow 4468d18615 [FIX] stock_picking_batch: fix cancel in batch
As done with the "done" state, if a single picking in a batch is
cancelled while the other pickings aren't, this picking is removed from
the batch, as it would create inconsistencies between the states of the
pickings in a single batch.

closes odoo/odoo#90449

X-original-commit: 1f2813e59970cd2eb078b514cd7d563837f175a1
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2022-05-04 10:02:24 +02:00
Lucas Perais (lpe) 53fc6ea691 [FIX] web: owlCompatibility: standaloneAdapter can trigger DOM events
Before this commit, when spawning a LegacyWidget with the standaloneAdapter,
the legacyWidget couldn't re-trigger an OdooEvent (trigger_up) in the DOM
forbidding any attempts to, for instance, execute an action button (a stat button in form view)

After this commit, not only standaloneAdapter takes an optional owl ref to trigger onto
(defaults to document.body), but the last resort legacy_provider handles execute-action
DOM event.

closes odoo/odoo#90172

X-original-commit: 616d0761a8e15dfe49db9bacdfa6f7df75587dff
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-04 09:02:04 +02:00
Julien Mougenot 88aada39e9 [FIX] web: Datepicker uses static date format
The current datepicker implementation uses Luxon to send and receive
dates from the client and Moment to create and communicate with the
bootstrap datepicker.

Before this commit: the current database date/time format was used to
convert dates from one system to the other. However there are
inconsistencies in notation for some formats, for which the conversion
could not be made properly.

Now: a static format is used to translate dates and the actual database
format is applied only after both systems have been notified of a date
change.

Tasks 2794506, 2797949

closes odoo/odoo#90422

X-original-commit: 174bc1dfa7b2894f35c288373f5130ec2992a8e8
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-04 08:07:00 +02:00
Xavier Morel f0fe59dcf7 [FIX] web/lib: backport jquery bugfixes
opw-2793379

closes odoo/odoo#90463

X-original-commit: 684e3fc983e91168dfaef8536fcd1f71ce7f7fdc
2022-05-04 00:05:02 +02:00
Xavier Morel 9ac8050de8 [REV] web/lib: Revert: backport jquery bugfixes
This reverts commit 0dd7c78b06726543825008a48d3dc004d2af4557.

X-original-commit: b50cd480d3f40ab084689587e6cbed311c09fb2f
Part-of: odoo/odoo#90463
2022-05-04 00:05:01 +02:00
Zelong Lin 97ef347724 [IMP] mail, im_livechat: remove public check for anonymous sending
task-2841797

closes odoo/odoo#90424

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-03 17:54:09 +02:00
Raphael Collet 68aa10fc24 [FIX] base: do not load translations twice
This fixes former pull request odoo/odoo#78287.

The language installation wizard was invoking toggle_active() on the
target languages, which loads translations for those languages (with
overwrite=False), and then loading translations again (with expected
parameter overwrite).

Simply don't use toggle_active(), and directly set the active field
instead, in order to load translations once with the expected parameter
overwrite.

closes odoo/odoo#90421

X-original-commit: 3e4733859fbe2465c386ec65b7be995b152c8c48
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-03 17:53:58 +02:00
Kartik Chavda c0da9d934c [IMP] (sale_,)project,hr_timesheet: improve generic ux of project
Purpose of this commit to improve generic usage of project
app.

So, in this commit done following changes:

- add 'my department' filter in project search view.
- add 'my department's tasks' and 'my department's projects filter
  in task search view.
- add quick search, filter and groupby in task analysis report search view
  to make task analysis report search view same as task's search view.
- improve portal template of my/tasks page.
- project.task form view > timesheets: display the employee avatar
  on mobile.
- make 'Task: Rating Request' template auto_delete false.
- settings: make following features disabled by default: sub-tasks,
  task dependencies, recurring tasks.
- project.update kanban list: align the stat buttons with the kanban
  list cards.
- add sample data to the project stages > list view.
- project.task quickcreate: enable the creation of new users on the
  fly.
- move tags quick search below project.
- add title to show  project full name on hover of project name in kanban
  view of project.
- copy user_ids for task in recurrence.
- improve UI visibility of planned_hours and subtask_planned_hours field in
  timesheet page of task form view.
- improve project sharing wizard and project.collaborator tree
  view.
- add grid,kanban,pivot and graph views to 'hours spent on
  sub-tasks' button's action.

closes: #83482
task-2742725

Related: odoo/enterprise#23788
Related: odoo/upgrade#3480
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-03 17:53:45 +02:00
Nicolas Bayet a05874f808 [FIX] web_editor: prevent loading toolbar twice in translate mode
task-2802733

closes odoo/odoo#90416

X-original-commit: ee62ad02875fa79e4f91186d73b969e138419eab
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-03 16:55:05 +02:00
tsm-odoo 4549de3b61 [IMP] mail_bot: don't use session for odoobot initialization
This PR prepares the ground for the one introducing the new environment in the
mail module. Indeed, the mail_bot messaging_initializer relies on the session
in order to known when to initiaze odoobot. With the new env, we won't be able
to access the session but will instead override init_messaging to automatically
initialize odoobot. Doing this first reduces the noise in the main PR.

task-2582313

closes odoo/odoo#90291

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-03 16:55:00 +02:00
Mitul Shah 1061109f8c [IMP] sms: sms composer promenade
Before this Commit,
There is an extra space at the top of the SMS composer.

After this Commit,
we have improved the UX of the SMS composer.

1/ Remove additional space on top of the SMS composer.
2/ Remove the additional space below the validation message.
3/ Improve the validation message of the invalid phone number.

Task-2710478

closes odoo/odoo#83062

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-03 16:54:51 +02:00
Hiral Bhavsar 5f9ba2435b [FIX] web_editor: reverted useful code which had been put as a comment by mistake at https://github.com/odoo/odoo/commit/344d82ca251bbba8f54e85d6b881cc92f8823f13
closes odoo/odoo#90401

X-original-commit: 6e990b6d13699e347275383b703dec34ddac3197
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-03 15:44:23 +02:00
Deepak Shah 223491036a [FIX] web_editor: traceback after clicking crop button.
Before this commit:

After selecting an image and clicking on crop button, crop widget displays and
vanish immediately and crop does not work. After clicking on screen, it raises
an error (Cannot read properties of null (reading 'removeChild').

After this commit:

The crop button works fine without raising any traceback.

Task-2804892

X-original-commit: 1ab1c15386f778b04eb78f26b1e0934f3329c6af
Part-of: odoo/odoo#90401
2022-05-03 15:44:22 +02:00
Nicolas Bayet ef14f80790 [FIX] web_editor: set max-height on header logo
task-2727617

closes odoo/odoo#90394

Forward-port-of: #81064
X-original-commit: f20596963f232f70cba18b1490284028a3c60528
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-03 14:38:48 +02:00
Nicolas Bayet b23c9217e5 [FIX] mass_mailing: use the company logo
Task-2678999

Forward-port-of: #81064
X-original-commit: f1ffd49998e963e687cb6621b78ddbdfd1b3e939
Part-of: odoo/odoo#90394
2022-05-03 14:38:47 +02:00
Nicolas Bayet 260a57684f [FIX] mass_mailing: enable background color on bigBox div
As the "Big Box" snippet contain two divs that have a background
it is invisible to change the background of the "Big Box"
Instead of choosing a background for the "Big Box", choose a background
for it's child divs.

Task-2678999

Forward-port-of: #81064
X-original-commit: e495544722a5d96f390d84452d0c84869a34391c
Part-of: odoo/odoo#90394
2022-05-03 14:38:46 +02:00
Nicolas Bayet 007368e50b [FIX] mass_mailing: set the background of footer center equivalent as the layout
Task-2678999

Forward-port-of: #81064
X-original-commit: b2fc0e6222d5f4c5f9c257c97819f52b55bebc42
Part-of: odoo/odoo#90394
2022-05-03 14:38:46 +02:00
Christophe Monniez 00e210396a [FIX] web: let clickbot properly find modal dialogs
When clickbot opens a modal dialog, it should be detected and closed
properly. The `open` attribute was removed from the modal dialogs but
the clickbot test were successful by accident. Even though the modal was
not found, the script was still able to continue by clicking on other
elements.

By disabling the ability to click on other elements while a dialog is
open , this 590fa18cafe2c commit revealed the truth.

closes odoo/odoo#90393

X-original-commit: c5e2300cbb89519e002cf1784a8d6c6f68197742
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-05-03 14:38:34 +02:00
Dossogne Bertrand 605a3c1e44 [IMP] hr_*: uniformize group category
*:
approvals
hr_apprasaisal
hr_payroll
hr_referral
fleet
hr
hr_attendance
hr_holidays
hr_recruitment
lunch

Change various access rights names to improve understandability for users.
Addition of an officer role in fleet with intermediate accesses

TaskID 2742855

closes odoo/odoo#87545

Related: odoo/enterprise#25741
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-03 14:38:19 +02:00
Samuel Degueldre c032acbcea [FIX] web: set componentRef in onRendered instead of onPatched
Previously, we were setting the ref to a component on ComponentWrapper
inside the onPatched hook, however, when mounting a component outside
the document (eg in a fragment) the patched hook is not supposed to be
called, but we need the ref to be set.

This commit fixes the issue by setting the componentRef in onRendered so
that it's available even when the component is mounted in a fragment.

closes odoo/odoo#90375

X-original-commit: 3013d89bcfe04be0207932b237d0e8ff8fb1d52b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-03 13:31:40 +02:00