Commit Graph
153303 Commits
Author SHA1 Message Date
Benoit Socias 375f4dff1c [FIX] web_editor, *: clean previously shown link in link popover
*: web_tour, test_website

Since [1] when the link popover was introduced, when the URL of a link
was made empty, an validation error appeared by the previously shown URL
did still appear inside the popover.

After this commit the previously shown link is replaced by a message
that indicates that no URL is specified.
The telephone and envelope icons are now also always removed when the
URL is change: they used to be only toggled, which made it possible to
make them appear and disappear by updating an email address or a phone
number.

Steps to reproduce:
- Add an image-text snippet to the page
- Select the image
- Add a link on the image
- Specify URL
- Click on image => link popup shows the entered URL
- Make the URL field empty
- Click on image
=> link popup still showed the previously entered URL

[1]: https://github.com/odoo/odoo/commit/8fcf930a6b6b7ffb0965b0a689c7a3117962ce7e

task-2765857

closes odoo/odoo#98845

X-original-commit: f212c56d73f5dad8eb5850b0b39cc92f55706ee2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-08-25 12:05:29 +02:00
Benoit Socias afe148341a [FIX] web_editor, website: not show link tools if link contains a media
Since [1] the link tools got created when the destroyed sub-elements of
the link were clicked on. This causes a problem when the element is a
media because upon destroy the tools reset the link to an incorrect
state.

After this commit the link tools is not touched anymore if the element
that was clicked on is a media.
Also, it reflects the changes done in the popup into the media link
options, and the ones done in the option into the popup.

Steps to reproduce:
- Add an image-text snippet in the page
- Click on the image
- Set up a link
- DO NOT click on the image again
- Click on the left of the image (to click on the snippet itself)
- Click on the image again
=> The image was removed instead and a text link remained

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

task-2765857

X-original-commit: 11ee7d5520c3a14a381b3f5b973114670f1e2edb
Part-of: odoo/odoo#98845
2022-08-25 12:05:29 +02:00
Bruno Boi c343318f93 [FIX] web: keydown traceback on empty m2m_tags(_avatar)_field
- Before this commit
On an empty m2m_tags(_avatar)_field, triggering a keydown event yields to a traceback due to an owl issue.
This will be fixed in owl later.

- After this commit
The 't-on-keydown' attribute on TagsList component has been moved into the tags themselves.

closes odoo/odoo#98840

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-25 12:05:24 +02:00
Bruno Boi d56468eb66 [FIX] web: disable browser autocompletion for AutoComplete component
- Before this commit
The browser autocompletion feature may conflict with
the AutoComplete component. First, the browser could
display its own autocompletion dropdown over our component's.
Secondly, selecting an item in the browser's autocompletion
dropdown simulates a keydown event with an undefined 'key' property,
leading to display traceback when the AutoComplete component
uses the keydown event (i.e. in getActiveHotkey).

- After this commit
The <input/> of our AutoComplete component now has the following attr
`autocomplete="off"`. This disables the browser's autocompletion feature
for this <input/>.

Part-of: odoo/odoo#98840
2022-08-25 12:05:24 +02:00
Demesmaeker 05a4c4ad0e [FIX] sale: ensure pricelist rule available
task-2961855

closes odoo/odoo#98808

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-08-25 12:05:19 +02:00
Julien Mougenot 1ab23b9467 [FIX] web: Prevent drag on kanban record dropdown
Before this commit, clicking on any part of a kanban record would
initiate a drag & drop sequence, this included its dropdown. This caused
2 issues:

- You could start to drag & drop records by dragging their still opened
dropdowns ;

- Said dropdowns would remain open when dragging their parent record.

This commit fixes both of these issues by hiding dropdowns during drag
sequences and preventing drag when clicking inside the dropdowns.

closes odoo/odoo#98791

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-08-25 12:05:15 +02:00
Julien Mougenot cf4a8f198f [IMP] web: Add 'ignore' param to useSortable
This commit adds a new parameter to the 'useSortable' hook that allows
HTML elements to prevent a drag sequence. This 'ignore' param can be a
string or a function returning a string, that will be a selector
targetting the elements that need to prevent drag & drop sequences.

Part-of: odoo/odoo#98791
2022-08-25 12:05:15 +02:00
Nicolas (vin) 3bac0f9d68 [FIX] account: Do not add tax grids for CABA taxes upon reversal
When using CABA and reversing a move, we expect the CABA move to
be the one impacting the tax grids, and not the reversed move.
Thus, we now avoid setting the tax grids for CABA taxes on
move lines created when making a reverse move.

Task id # 2895267

closes odoo/odoo#98789

X-original-commit: 5dd50ac1433be262ddd49d8b165e240afd16e675
Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-25 12:05:10 +02:00
Xavier-Do 5648cc9aa4 [FIX] base, l10n_*: set currency with existing lines
Since #96791 the currency is reset to USD when starting a test to be
less dependant of demo data when starting tests.

Unfortunatelly, some l10n_modules will add account.move.line demo data
leading to an error:

        You cannot change the currency of the company since some journal
        items already exist

An initial solution would be to delete the existing account.move.line

        cls.env['account.move.line'].search([('company_id', '=', company.id)]).unlink()

This is only possible passing some context flags in order to disable some checks

        existing = cls.env['account.move.line'].search([('company_id', '=', company.id)])
        existing = existing.with_context(dynamic_unlink=True, force_delete=True)
        existing.unlink()

Actually, unlinking account.move.line also creates other ones.

        existing = cls.env['account.move.line'].search([('company_id', '=', company.id)])
        existing = existing.with_context(dynamic_unlink=True, force_delete=True)
        existing.unlink()
        existing = cls.env['account.move.line'].search([('company_id', '=', company.id)])
        existing = existing.with_context(dynamic_unlink=True, force_delete=True)
        existing.unlink()

Finally, it looks easier to bypass all business logic leading to the proposed solution.

closes odoo/odoo#98736

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-08-25 12:05:06 +02:00
Julien Mougenot b8d4c41331 [FIX] web: Fix behaviors of ProgressBarField
This commit fixes behavior issues in the progress bar field:

- the progressbar would not write on a field if it was declared as
'readonly' on the server (it sounds counter-intuitive but this widget
was supposed to write on records unless given the 'readonly' flag in the
field options);

- the "isEditable" prop was incorrectly computed, resulting in the field
not being editable in kanban views when it should be;

- when editing a value in the field, the focus should be automatically
given to the first input.

These issues have been fixed in this commit.

closes odoo/odoo#97411

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-08-25 12:05:03 +02:00
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