Commit Graph
153293 Commits
Author SHA1 Message Date
Julien Mougenot de0d409efc [IMP] web: Add params to useAutofocus
This commit introduces an object parameter to the "useAutofocus" hook,
that has 2 new optional keys:

- "refName": to override the ref "autofocus" (effectively allows to run
the hook multiple times)

- "selectAll": selects the whole value of the input/textarea (instead of
putting the cursor at the end).

Part-of: odoo/odoo#97411
2022-08-25 12:05:02 +02:00
aliya 338a974a2f [IMP] account: import cut-off entries labels
Current cut-off entry labels are always "Adjusting Entry", which is unclear, especially when viewing entries from General Ledger.
Adding the Invoice number and adjusting the % recognized within each entry will make the labels easier to understand.
The percentage will be calculated accordingly, the cut-off percentage for the adjusting entry and (100% - cut-off percentage) for the original entry.
Also, the percentage on labels should be rounded.

task-2897292

closes odoo/odoo#97045

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-08-25 12:04:57 +02:00
Brice bib Bartoletti 25de7d3193 [IMP] account: duplicated_ref_ids for in_document
The aim of this commit is to improve UX by helping the user to find duplicate
bills in a more convenient way.

With this commit, when a user create a bill or credit note on bill that might
be a duplicate, a warning banner is displayed on the Form view of the
account.move.
On this banner there is a button that leads to the list of the duplicate
bill/credit note.

The previous warning message on post is also replaced by a RedirectWarning

Context:
Previously, the warning for duplicated bills was thrown when the bill was
saved. This was changed with https://github.com/odoo/odoo/pull/81748
It made the blocking warning being delayed until the bill is posted.

Previous to this commit:
A duplicate bill can only be detected automatically when posting the bill with
a non convenient blocking warning preventing the user to post his bill(s).

After this commit:
- A warning banner is displayed on the bill form during the bill creation.
- The banner contains a button leading to the list of duplicates.
- The blocking warning is improved by providing redirections to the duplicate
move.

closes odoo/odoo#81765

Community-pr: https://github.com/odoo/odoo/pull/81765
Task: #2612299
Signed-off-by: William André (wan) <wan@odoo.com>
2022-08-25 12:04:51 +02:00
Daniel Blanco 38776b8714 [CLA] update signature Blanco Martin y Asociados
Add Jose Moreno Hanshing

closes odoo/odoo#98856

X-original-commit: 4a0761986b500d21d7757cf7ff2048f861a4cee4
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-25 10:32:19 +02:00
Xavier-Do a80af40d2c Cherry pick of b7699100eeb887954c772f97a8e7bdc21b9a7a44 failed
stdout:
On branch saas-15.3-15.0-test-and-profiler-imp-xdo-dOrY-fw
You are currently cherry-picking commit b7699100eeb8.

nothing to commit, working tree clean

stderr:
13:56:13.661715 git.c:344               trace: built-in: git cherry-pick b7699100eeb887954c772f97a8e7bdc21b9a7a44
13:56:17.415610 run-command.c:646       trace: run_command: git commit -n -F .git/MERGE_MSG --cleanup=verbatim
13:56:17.424741 git.c:344               trace: built-in: git commit -n -F .git/MERGE_MSG --cleanup=verbatim
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git reset'
----------
status:

closes odoo/odoo#98829

X-original-commit: a319efa28c596a7b212df39002e6808c34bf9071
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-08-25 10:32:15 +02:00
roen-odoo f373482b29 [FIX] account: correctly reconcile refund from PoS
Current behavior:
In the PoS if you use 2 differents payment methods (cash and customer
account), and that the cash amount given by the client require you to
give some money back, the amount due on the customer account would be
incorrect on the invoice.

Steps to reproduce:
- Start a PoS session
- Add the 750$ desk to the order
- Go in the payment screen
- Add customer account with 300$
- Add cash with 460$
- Click on invoice
- The invoice show that the client need to pay 290$ which is not
  correct

Before the fix calling `_prepare_reconciliation_partials()`
with the sorted lines we had 2 credit lines (750€ and 10€)
and 1 debit line (460€).

Debit lines     |   Credit lines
460€            |   750€
                |   10€

The function would reconcile the 2 first lines and stop after that
because the only debit line was fully reconciled

After the fix we have this

Debit lines     |   Credit lines
460€            |   10€
                |   750€

After reconciling the 2 first lines we have this

Debit lines     |   Credit lines
450€            |   750€

And after reconciling the 2 last lines we have the correct amount left
to pay by the customer (300€)

opw-2857064

closes odoo/odoo#98828

X-original-commit: 1201123e272012b7b5ab65eebfd12a911ecc6c1a
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-08-25 10:32:12 +02:00
Josse Colpaert 55b5f3d7d9 [FIX] l10n_latam_invoice_document: add document type and number below the journal
The account_move view was changed in master and that way
the document type and number were not visible anymore or in
a weird way.  If we just put it after the journal_div, everything
seems fine.

closes odoo/odoo#98810

Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-08-25 10:32:08 +02:00
FrancoisGe c200b0cc8a [FIX] web: many2one close "No records"
Before this commit, when a many2one's input shows the choice
"No records", the dropdown does not close.

Cause:
When blurring, the many2one will select its first item. In our case,
"No records" is not selectable and it will not close the dropdown.

How to reproduce:
- go to a form view with a many2one field
- insert a non-existent value in the many2one ("No records" is displayed)
- leave the many2one input ("blur" event)

Result before:
The dropdown containing "No records" is still open.

Result after:
The dropdown containing "No records" is closed.

closes odoo/odoo#98799

Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-08-25 10:32:04 +02:00
Joseph Caburnay c836967a71 [FIX] point_of_sale: large canvas is sent to the printer
In screen with high dpi, scale of the canvas generated by html2canvas
is larger than normal (defaulting to scale 2). Apparently, receipt
printers don't recognize this so in this fix, we force the scale
to 1.

closes odoo/odoo#98796

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-08-25 10:32:01 +02:00
Odoo's Mergebot 4ac4096e8f [MERGE][MOV] mail, various: split and move mail code by model
[MOV] various

Move code, views and data of mail / rating models into their own files.
Purpose is to have one file / model, easier when searching for inherited parts
of the code and see at a glance various usage of those models.

[FIX] in ir_cron

Trigger methods are defined as api.model but actually use self. Those are
therefore not model. Smart.

LINKS

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

closes odoo/odoo#98661

Related: odoo/upgrade#3805
Related: odoo/enterprise#30663
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-25 10:31:57 +02:00
Thibault Delavallée d13d251a2f [MOV] various: move and split mail data
Just doing the summer file cleaning. Move mail data into files named based on
their model, easing maintenance and searching for those data.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
Thibault Delavallée 0419de7ff2 [MOV] various: move / rename rating files
Just doing the summer file cleaning. Move rating code into files named based on
their model, easing maintenance and searching for those data.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
Thibault Delavallée 36239e1594 [MOV] calendar: move activity (type) code and views
Purpose is to have one file / model, easier when searching for inherited parts
of the code and see at a glance various usage of those models.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
Thibault Delavallée 1515170639 [FIX] base: ir_cron trigger methods are not model
Trigger methods are defined as api.model but actually use self. Those are
therefore not model. Smart.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
FrancoisGe 15a032e84a [FIX] web: placeholder in required SelectionField
This commit adds the possibility of having a placeholder in a
required SelectionField.

Solution:
We always add a false option with the placeholder but it is "display:none"
if the field is required.

How to reproduce:
- create a new record in a form view with a required selection field

Result before:
    The first option of the selection field will be selected

Result after:
    The placeholder of the selection field will be selected

When editing the selection field, the selection field does not propose
the placeholder.

closes odoo/odoo#98823

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-25 09:06:30 +02:00
Nshimiyimana Séna ff6f8b29e3 [FIX] account: ignore non-posted invoices when computing an account's balance
Currently, computing an account's current balance takes canceled and
draft invoices into account. Only posted invoices should be considered.

opw-2896728

closes odoo/odoo#98843

X-original-commit: d3a7115feab9ca1bd8372f4450d3abc3eb52cdb0
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2022-08-25 04:21:31 +02:00
Sébastien Theys f8c2689f3b [FIX] im_livechat: avoid writing on computed field correspondent
closes odoo/odoo#98836

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-25 04:21:24 +02:00
Samuel Degueldre 3f7f361d5f [FIX] web: stop crashing on concurrent update of field wrapper
Previously, if you updated a legacy field widget in a new view twice in
quick succession, it may be that the first update recrates the widget,
but the second update doesn't wait for that widget to be created by the
previous update, even though the second update may rely on the widget's
$el to be defined, which can result in a crash.

This commit fixes that by making sure the widget has finished starting
before attempting to recreate it with the new params.

closes odoo/odoo#98822

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-25 04:21:21 +02:00
William Braeckman e1b32bcc8b [IMP] website_sale: migrate video_preview field to owl
This commit migrates the `video_preview` field to owl.

closes odoo/odoo#98819

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-25 04:21:17 +02:00
MerlinGuillaume 719e028640 [FIX] web: number format in exported group header for float values
Exporting data incorrectly formats the float values of group headers

Steps to reproduce:
1. Install Planning
2. Open Planning and trigger the list view
3. Remove the default filter and add a group_by on employees
4. Export the data
5. The file produced doesn't have the same format for Allocated Hours in
   the group headers and in the line details

Solution:
Create formats for float and monetary values using the user's
preferences in decimal separator and decimal precision. For monetary
format, we use the biggest decimal precision used in the company
currencies.

opw-2864273

closes odoo/odoo#98813

X-original-commit: 718e8eea7862ad307479190336baf5b5e7092ae4
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-08-25 04:21:14 +02:00
roen-odoo 6dc0d6976d [FIX] stock: add tooltip for lot.label.layout quantity to print
Current behavior:
If the UoM of a product is not 'units' (e.g 'kg') and tracked by lot.
When trying to print labels 'per unit', some users except one label printed
per 'kg'. But it will actually print one label per lot.

This is not a bug so we are just adding a tooltip to make it clear that only
one label will be printed for lots using UoM different from 'units'

Steps to reproduce:
- Create a product tracked by lots with 'kg' as UoM
- Create a purchase order for 5kg of this product
- Validate the PO and receive the products in 2 lots
- Print the labels "Lot/SN Labels" > "One per unit"
- Confirm, the PDF shows 2 labels

opw-2941942

closes odoo/odoo#98812

X-original-commit: 5b2eb07d3831406146d70150e3a9f61fa3aca7c3
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-08-25 04:21:10 +02:00
Younn Olivier a0a184fdf6 [FIX] web_editor, website: update invisible elements panel on undo
Before this commit, after:
- Drop a popup,
- Click on the undo button,
=> The invisible elements panel was still displayed, with the popup
entry.

To fix that, the panel visibility is updated on the
'historyUndo'/'historyRedo' events alongside refreshing the snippets
editors.

task-2687506

closes odoo/odoo#98807

X-original-commit: 76704f47db46ac7e71a894f620d8061a3eb594a7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-25 04:21:07 +02:00
Alexandre Kühn 34c88157a6 [IMP] im_livechat, *: Refactor JS Public Livechat (step 14)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2961782

closes odoo/odoo#98798

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-25 04:21:01 +02:00
Kevin Baptiste 5d4aa927f1 [FIX] hr_contract: properly position first_contract_date
Properly position the field first_contract_date by using a more explicit
xpath, as the previously used field was added as invisible in odoo/odoo#95729.

closes odoo/odoo#98777

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-25 04:20:55 +02:00
tsm-odoo 5b5052a774 [IMP] mail: remove follower subtype local id in tests
Using local ids in test is cumbersome: we need to retrieve the mail
record associated with the server record to get it while the message
id is more than enough and available. This PR replaces follower subtype
local id data attribute by its subtype id.

task-2959366

closes odoo/odoo#98776

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-25 04:20:48 +02:00
Simon Genin (ges) cc6c1e5d92 [FIX] web: kanban dropdown should close on click
With the current implementation of the kanban dropdowns, clicking on a
element doesn't drop the dropdown.
Often it's not a problem as the clicked element initiates a new action.
However, on some occasions (like with a color picker), we want it to
close.

Waiting for a kanban card refactoring, we need to find a bit of a hack:
we wrap the content comming from the arch inside a small component that
only listen for clicks and close the parent dropdown.

closes odoo/odoo#98773

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-08-25 04:20:45 +02:00
Stanislas Sobieski 31de6e8454 [FIX] web: fix database manager test
Skip test on database manager rendered page when option
--no-database-list is used

closes odoo/odoo#98771

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-08-25 03:12:01 +02:00
Romeo Fragomeli 259e564a3c [FIX] website: s_product_list: buttons are not at the right position
In Bootstrap 5 the `.col-X` classes don't have position relative anymore
and the button use position absolute (relative to its parent) to
position themselves.

> Columns no longer have position: relative applied, so you may have to
> add .position-relative to some elements to restore that behavior.

Ref:
https://getbootstrap.com/docs/5.1/migration/#grid-updates

Note: we have set the position relative in CSS to avoid doing a
migration script.

closes odoo/odoo#98768

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-25 03:11:54 +02:00
tsm-odoo bf9ae3bbc8 [FIX] bus: pop unused channels from channel map
When a websocket is disconnected, its subscription is removed.
Each channel leads to a set of subscribed websockets. When no
more sockets are listening to a channel, this channel should be
pop from this mapping or the map will keep growing.

closes odoo/odoo#98766

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-25 03:11:51 +02:00
tsm-odoo ae97357675 [FIX] bus: websocket module import
The websocket client library  is used during tests but is not in
requirements.txt.  Therefore, imports are usually wrap into a try/except.
An import present in `websocket_rate_limiting` is not wrapped leading to
errors for those who have not the library installed. This PR fixes this
issue by wrapping this import in a try/except block.

closes odoo/odoo#98763

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-25 03:11:48 +02:00
Samuel Degueldre f00df383ea [FIX] web: correctly compute colspan of empty line in list renderer
Previously, the colspan of empty lines in list view did not account for
the fact that the column with the delete action is not always present,
resulting in incorrect colspan on empty lines when it is not.

This commit fixes that by accounting for it, and also fixes the size of
the header of that column, which is supposed to be fixed at 32px but
wasn't in some circumstances.

closes odoo/odoo#98711

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-25 03:11:45 +02:00
Aaron Bohy 545e2378ab [FIX] web: render label with empty string to preserve layout
Previously, when a label in a form arch had an empty string attribute,
we would not render it at all as it seemed useless. In practice, some
existing form arch rely on empty labels being rendered for layout
reasons, and the corresponding views are now broken.

This commit fixes that by instead rendering an empty label, just as
legacy views used to.

Part-of: odoo/odoo#98711
2022-08-25 03:11:45 +02:00
Samuel Degueldre a6dd7075b3 [FIX] *: remove display: contents from field widgets and adapt code
With the conversion of the views to owl, we added an extra div around
fields that represents the whole field, and wraps potentially multiple
elements that may be rendered by a field widget. This changes the DOM
structure, and to allow concrete fields to control everything about the
way they are displayed, we decided to use the css rule "display:
contents" for that div. As it turns out, while this does give more
control to the field widget, it breaks a lot of existing css rules, and
also prevents classes that are applied on that div from the arch from
affecting any css property related to layout (such as margin, position
or padding).

Because of that, we decided to revert this change, and set this div's
display property to inline-block (the same as legacy field widgets) and
adapt the few fields where this does not work out of the box, which
fixes many issues.

Part-of: odoo/odoo#98711
2022-08-25 03:11:45 +02:00
Simon Genin (ges) c8de959617 [FIX] sms: fix sms button in phone field
The sms field extension had been badly converted.
The button didn't do anything cause the action wasn't properly
configured.

closes odoo/odoo#98646

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-25 01:54:07 +02:00
Bruno Boi a7fb02e3fa [FIX] web: autocomplete should keep input value on search more
# Before this commit
When searching more in an autocomplete component,
the input value is emptied before opening the Search More dialog.

# After this commit
The input value keeps its content when the Search More dialog opens.

closes odoo/odoo#98639

Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-08-25 01:54:04 +02:00
Nicolas (vin) 35e107bcbd [FIX] account: fix accounting dates
Fix the accounting date in a few scenarios, such as exchange difference
or CABA moves reversal.
Also avoid updating the currency rate when reversing exchange difference
moves.

closes odoo/odoo#98543

X-original-commit: 2b8df0c111a785a9e51dc2f528ac5b00cb0eadb9
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-08-25 01:54:01 +02:00
Thanh Dodeur 3723b222b3 [IMP] mail: Call settings menu as right sidebar
This commit changes layout of call settings menu.

Before this commit, it was available in call action list
while in a call, as a dialog, in More > Settings.

With this commit, it's now available as an button in
thread topbar and chat window header, next to member
list button (`fa-cog`). It can be accessed even while
not in a call.

Task-2929713

closes odoo/odoo#96954

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-25 01:53:50 +02:00
Daniel Blanco 14b960239b [FIX] l10n_cl: update withholding 2nd category tax percentage with different values for each year beginning in 2020 until 2026
There is a gradual table already defined for this tax till year 2028
l10n_cl: add withholding second category taxes until 2026 and disabled previous years' withholding taxes

closes odoo/odoo#96075

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-25 01:53:47 +02:00
Alexandre de Pape (alpa) 4ae197cc77 [IMP] website_sale_stock_wishlist: prevent user adding to cart item out of stock
This commit greys out the add to cart button on the wishlist page when a product of type product is out of stock

task-id 2907659

closes odoo/odoo#97914

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-25 00:21:53 +02:00
Romain Derie cb80c15d3d [IMP] web_editor, website: warn restricted editor about forbidden change
See previous commit(s) for more details about the new sanitize feature.

This commit implement a solution in the website builder to warn
restricted users when they can't edit a field due to the sanitizer
restriction.

Long story short: a HTML field can be flag as `sanitize_overridable`
which will allow users with the `base.group_sanitize_override` group to
not go through the sanitize process.
It means that such users can write some content which is not sanitize
friendly. A restricted user trying to add content in such fields would
then break the original content as the sanitizer would remove part of
the DOM.
In such cases, the field in the website builder is not detected as an
editable part and clicking on it will warn the user about it.

closes odoo/odoo#97398

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-24 23:03:24 +02:00
Romain Derie 44ae3f38da [IMP] *: bypass sanitize for full editor users on frontend fields
The previous commit allows the sanitizer to be bypassed by some users if
those users are part of one of the `base.group_sanitize_override` group
and if the HTML field is declared as `sanitize_overridable`.

This commit flag frontend HTML fields as `sanitize_overridable`.
See the main commit of this PR for more details.
It also gives the `base.group_sanitize_override` group to the "Editor &
Designer" group.

Part-of: odoo/odoo#97398
2022-08-24 23:03:23 +02:00
Romain Derie cf844e34dd [IMP] core: allow some users to bypass the sanitize of HTML field
Add the possibility to flag a HTML field as `sanitize_overridable`.
The sanitizer will then be bypassed if the user doing the operation is
part of the new group `base.group_sanitize_override`.
The "Settings" users are part of that new group.

If such a user wrote some HTML that would have normally been removed by
the sanitizer, then users without the right to bypass the sanitizer
won't be able to write on that field anymore.
Otherwise, it would sanitize the previously written data.
Such cases are detected, and the modification prevented by the system,
which will warn the user about it.

For instance, with a `field.html(sanitize_overridable=True)`: one being
part of `group_sanitize_override` could write `<script></script>`.
Then, someone not part of the group trying to add an element inside that
field like appending a `<p/>` -> `<script></script><p>New Content</p>`
would not be able to because it would go through the sanitizer and
ultimately, removing part of the original value:
`<p>New Content</p>` (`<script></script>` would be removed).

== Real use case ==
In the website builder, there is 2 editor rights:
- group_website_publisher: restricted editor
- group_website_designer: editor & designer

The designer editor can edit pages and views, while the restricted
editor can't do anything unless he is part of other groups.
In edit mode, the restricted editor will only be able to edit fields of
record he has access to.
For instance, being a sales manager allows you to edit a product
description on the website.
Being an event manager -> edit event. Slide manager -> Slides etc.
As those restricted editor are able to edit those fields, they are
(almost) always sanitized to prevent them to introduce malicious code.

Since those fields are sanitized, even admins / designer editor are not
able to fully use the website builder in such fields.

Some clients don't really care about that sanitation, they'd prefer to
avoid it as they trust their manager and would prefer to have the full
builder capability instead.
This is typically the case in small project (butcher, hairdresser,
reseller etc) and in SMEs.

With the new `sanitize_overridable` feature, they will be able to do
that, as the "Designer & Editor" group now also receive the group
`base.group_sanitize_override` (done in next commit).

Part-of: odoo/odoo#97398
2022-08-24 23:03:23 +02:00
Sarika Shekhada 2be526b295 [FIX] web: fix the traceback on schedule activity view
Before this commit, when we open activity view and click on schedule
activity >> select a record there is a trackback due to the
invalid default_res_id passed in context.

So in this commit, fixes the issue by passing the valid res_id in
instead of object with id and display_name.

task-2927335

closes odoo/odoo#96999

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-24 21:06:55 +02:00
mafo-odoo 6e9e7d32cc [FIX] mail, test_mail: decode_message_header and email_split_tuples format modification
Steps to reproduce:
1.) Create a custom email domain and incoming email server on a database, set the
Actions to Perform on Incoming Mails to Create a new record: Helpdesk Ticket.
2.) Set an email alias for a Helpdesk team, set the assignment method to
balanced/random, assign some users to the team.
3.) Set another email address to forward emails to the alias for the Helpdesk team.
4.) Emails received directly by the email alias will create tickets and assign
properly, emails that are forwarded to the email alias will fall back on assignment
defaults.

Explanation:
When we get the "Delivered-To" field for the message dictionnary we use
decode_message_header and the message.get_all() function, this function
returns a list with two addresses but it is transformed back into a string
in decode_message_header with a space as separator. This create an issue
when we use email_split_and_format on this string as it uses
email.utils.getaddresses that expects a list of headers field or a text
where addresses are separated with a comma instead of a string with the
header fields separated by " ". Because of that getaddresses fails to get
the right addresses and the recipients field of the message dictionnary is
missing the right address. Hence when we check if the alias is in this
values it does not find it and use the default fall back.

Solution:
To solve the issue we set the separator as a comma in decode_message_header.

opw-2917543

closes odoo/odoo#98761

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-24 19:54:02 +02:00
luvi f1ce90f158 [FIX] project: fix the style of icon
This commit fixes the style of the lightbulb icon
present in the settings of a project.
After this commit, the icon is now displayed
inline with the text.

closes odoo/odoo#98755

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-24 19:53:59 +02:00
luvi ca3f1e2d56 [FIX] im_livechat: fix style of livechat_colors
This commit fixes the style of the color selectors
in a livechat view. New classnames have been added
to revert to the intended appearance of the field
in the view.

Part-of: odoo/odoo#98755
2022-08-24 19:53:58 +02:00
tsm-odoo e91c0728fc [IMP] mail: remove message local id in tests
Using local ids in test is cumbersome: we need to retrieve the mail
record associated with the server record to get it while the message
id is more than enough and available. This PR replaces message local id
data attribute by message id.

task-2959366

closes odoo/odoo#98728

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-24 19:53:54 +02:00
Alexandre Kühn 561409683d [FIX] im_livechat: properly guard inside debounced scroll
Task-2960982

closes odoo/odoo#98721

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-24 18:39:03 +02:00
Alexandre Kühn df6a4a7e10 [FIX] im_livechat: properly call chatbotRestoreSession
Task-2960978

closes odoo/odoo#98720

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-24 18:38:59 +02:00
FrancoisGe 145234749a [FIX] web: create="0" in a grouped kanban view
This commit is to remove the "Create" button in a grouped kanban view
with create="0".

Problem:
In a kanban view with create="0", the "Create" button should never be
displayed.

How to reproduce :
- go to a kanban view with create="0"
- group the view

Result before:
The "Create" button is displayed

Result after:
The "Create" button is not displayed

closes odoo/odoo#98691

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-08-24 18:38:53 +02:00