Commit Graph
167464 Commits
Author SHA1 Message Date
MerlinGuillaume cdcdee40f4 [FIX] base: error when setting a too big default value for integer
Setting a default value for an integer that is greater than that allowed
by a 32-bit integer raises an error when we save a new record so it
isn't clear that the issue comes from the default value

Steps to reproduce:
1. Install Contacts and Studio
2. Go to Contacts and open any contact
3. Toggle Studio and add an integer field in the view
4. In the Studio sidebar, set the default value to 3 000 000 000
5. Save and close Studio
6. Create a new contact, give it a name and try to save the record
7. An error is thrown

Solution:
Raise an error if we set an integer field's default value out of the
bounds of a 32-bit integer

opw-3360160

closes odoo/odoo#141339

X-original-commit: 85978e4c6fb1199f5e6ec4dce5c45b9f09be9b77
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-11-09 14:51:21 +00:00
Michael (mcm) 6a30ab1353 [FIX] web: mount on detached element
Before this commit, a component couldn't be mounted on a public widget
that wasn't yet attached in the dom.

closes odoo/odoo#141665

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-11-09 13:38:43 +00:00
Josse Colpaert af2b0eb73f [IMP] l10n_es, l10n_es_edi_sii: add DUA taxes + some cleanout of taxes
We have 2 different invoices for importation: The trasitoria from
let's say the customs (through the transport company) and the
importation invoice coming from the vendor.

For SII and the register, nothing needs to be sent for the importation,
but for the trasitoria we also need to register the base amount from
the viewpoint of the customs.

That is why we added a tax that is actually a group of taxes composed
of undoing the base amount and adding the tax, so the line will just
have the tax amount, but we are still informed about its base.

We also added the products with those taxes by default, so the user
can easily encode the trasitoria that way.

By default the extra-community fiscal position will not map to import
taxes anymore, but to nothing and the

We also updated some other taxes:
- The term included was put in the csv, while the tax is not, so we
just removed it
- We split the exempt taxes, so the user has the different cases
by default.
- The Exempt not subject case, handled a total corner case, so we
added a new tax to handle the case of Exempt Non Deductible
- Modify tax grid for account_tax_template_s_iva_e to mod303[120]

We also changed the name of the fiscal position Reglas de Localizacion (TAI)
as it has nothing to do with Canary Islands in itself, but with services/goods.

opw-3395186

closes odoo/odoo#139514

Signed-off-by: William André (wan) <wan@odoo.com>
2023-11-09 11:10:54 +00:00
Josse Colpaert 78c745c84d [IMP] account: do not override demo product taxes already set
This way we can more easily define products in demo or data
that need specific taxes.

We needed to filter out the taxes not belonging to this company
as the many2many does not filter them out.

Part-of: odoo/odoo#139514
2023-11-09 11:10:54 +00:00
Odoo Translation Bot 593ac17031 [I18N] Update translation terms from Transifex 2023-11-09 11:30:34 +01:00
Louis (wil) 68b4dfc2bb [I18N] *: import translations
closes odoo/odoo#141655

Related: odoo/enterprise#50484
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-08 20:48:14 +00:00
Rodolpho LimaandNicolas Bayet 049a0edbba [FIX] web_editor: dependency errors in iframe bundle
Before this commit, some assets of the
"web_editor.wysiwyg_iframe_editor_assets" bundle could not be loaded
because of unmet dependencies.

The loading of such modules failed silently because the module loader
waits for the "DOMContentLoaded" event in order to replace the DOM's
content by the error report, and such event is not triggered by the
wysiwyg's iframe.

This commit removes unnecessary assets from the mentioned bundle and
solves the dependency errors.

closes odoo/odoo#141591

Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
2023-11-08 15:39:48 +00:00
Aaron Bohy 1983ec11d0 [FIX] web: kanban: disallow to quick create if cannot create
Before this commit, a grouped kanban view with create="0" on the
root node would still allow to quick create record in columns (i.e.
the "+" icon would still be displayed). However, clicking on it
would most likely raise an AccessError as the user isn't allowed to
create records.

This commit restores the pre 16.0 behavior, which is to disallow
quick creation if the user can't create.

Task 3559638

closes odoo/odoo#141631

X-original-commit: 775475aaed6ea88f54a6530b81f35f3114431716
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-11-08 14:36:29 +00:00
abd-msyukyu-odoo 708573b0f5 [FIX] web: prevent command palette deadlock
Impacted versions:
16.0+

How to reproduce:
- create a lot of articles in Knowledge (i.e. 3000+)
- click twice on the `Search Articles` fake search bar in the Knowledge Form
  view

Current behavior:
- the command palette does not open
- the command palette is broken and won't open again (even with the `CTRL+K`
  shortcut)

Expected behavior:
- the command palette open once and should not break even if the user clicks
  multiple times.

Technical explanation:
- The promise given to the `onWillStart` hook of the `command_palette` can
  sometimes never be resolved by design (see `KeepLast`). i.e.:
  - `setCommandPaletteConfig` is called `onWillStart`
  - `setCommandPaletteConfig` is then called as a result of the `SET-CONFIG`
    bus event
  - the first promise will never be resolved since it uses a `KeepLast`,
    therefore `onWillStart` will never be resolved either.
- In `command_service`, the variable `isPaletteOpened` is set to `true` before
  the command palette dialog is actually mounted.
- If `onWillStart` is never resolved, the component will never be mounted, and
  as such the dialog can never be closed, therefore `isPaletteOpened` stays
  `true` forever resulting in a deadlock preventing any further opening of the
  command palette.

The issue can be resolved by adding all `KeepLast` promises in a race, which is
what `onWillStart` should actually be waiting for, since it will be resolved as
soon as any `KeepLast` promise is resolved.

task-3554068

closes odoo/odoo#141613

X-original-commit: 6b5fc71e67569b93b699090b225eea147ef463d2
Related: odoo/enterprise#50466
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
2023-11-08 14:36:27 +00:00
aliya cb10615fd2 [FIX] account_peppol: fix peppol ready view
Currently, it's not possible to open invoices from the peppol ready list view. This commit fixes that, adding form in the view_mode.

closes odoo/odoo#141258

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-11-08 14:36:26 +00:00
aliya 0899e069bc [FIX] l10n_*: add partner bank demo data
When trying to send a demo peppol invoice,
a user gets an error about the missing recipient bank.
The user then needs to set the invoice back to draft,
create the bank, save changes, before being able to send the invoice via Peppol.
To make the demo process smoother, this commit adds a `res.partner.bank` record
for every demo company that is eligible for peppol.
However, it can be useful in general, so these are added in the community l10n modules.

Part-of: odoo/odoo#141258
2023-11-08 14:36:26 +00:00
aliya 098939b20a [FIX] account_peppol: peppol_move_state
One flow wasn't considered in the PR that added a ready state:
- A user unchecks BIS3 XML generation and sending via Peppol in the send & print wizard
- `peppol_move_state` is set to `ready`, even though it's not possible to send it without the XML file, so it queues forever

This commit adds a `skipped` state. If the XML file is not generated, the `peppol_move_state`
is changed to `skipped` and the user needs to manually regenerate attachments to send the invoice via Peppol.
Also, the BIS3 checkbox shouldn't be deselected automatically when peppol checkbox is deselected.

Part-of: odoo/odoo#141258
2023-11-08 14:36:26 +00:00
Martin Trigaux 3135699792 [IMP] *: update links to 17.0
closes odoo/odoo#141622

Related: odoo/enterprise#50472
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-11-08 13:34:06 +00:00
hungbui 8ed44d4767 [IMP] *loyalty: using free product display name
** before commit:
When create a free product reward, reward and sale order line
description use product's name so if many reward are variants of others,
the description will be the same. It make portal user confusing when
they chose reward in portal
**after commit:
the description will include display of product so that will contain
name of variants's attributes

closes odoo/odoo#141551

X-original-commit: 5619e8ce6b543c2b639860e8822f5d1bb4fcbeb0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-08 13:34:05 +00:00
Saurabh Choraria 90f235fcef [FIX] base: raise ValueError when user enters wrong path
When the user tries to add properties field in domain of a model
without property name the error occurs.

To reproduce the issue:
- Install knowledge module.
- Go to Settings > Technical > User Defined Filters.
- Enter a name, add 'Knowledge Article' as model and then add domain
[('article_properties', '!=', False)].
- Click on save button and then on refresh button below code editor of domain.
- The traceback will be generated

Error: IndexError: list index out of range

The issue is occurring because we are getting single element
in path over here -
https://github.com/odoo/odoo/blob/f4e60765db57fe3612f267e8fa44d10ccf5ff107/odoo/osv/expression.py#L649
but we are trying to access path[1] due to which IndexError is occurring
over here -
https://github.com/odoo/odoo/blob/f4e60765db57fe3612f267e8fa44d10ccf5ff107/odoo/osv/expression.py#L683
and here -
https://github.com/odoo/odoo/blob/f4e60765db57fe3612f267e8fa44d10ccf5ff107/odoo/osv/expression.py#L687

The condition is also wrong over here -
https://github.com/odoo/odoo/blob/f4e60765db57fe3612f267e8fa44d10ccf5ff107/odoo/osv/expression.py#L683-L684
in which we are checking length of path is not equals to 2 and then also
we are trying to access path[1], due to which ValueError becomes a dead code.

To fix this issue 'and' is replaced with 'or' in that condition.

sentry-4499339271

closes odoo/odoo#141533

X-original-commit: da41853fc93a60a0a05083d79f0bb08f429cded9
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
2023-11-08 12:14:50 +00:00
Renilkumar Kajavadra b706dbc29a [FIX] product: prevent traceback on removing quantity of product in quotation
When user removes the quantity of product and tries to confirm the product
in configure wizard,
a traceback will appear.

Steps to reproduce the error:
- Go to Sales > Configuration > Settings
  > Product Catalog > enable Variant Grid Entry
  > Pricing > enable Pricelists (Advanced price rules)
- Go to products > pricelist > open any pricelist > Add a line
  > set value of Min. Quantity
- Create new Quotation > Select that pricelist > Add a product
  > Select a product that has variants (ex. Conference Chair)
  > In configure wizard, remove quantity > Confirm

Error: A traceback appears:
"TypeError: '<' not supported between instances of 'NoneType' and 'float' "

https://github.com/odoo/odoo/blob/fe79e1b5fdc408d55bbb3ac11209163436c1fa2c/addons/product/models/product_pricelist_item.py#L319
Here, when user removes quantity of product,
qty_in_product_uom will be None.
So it will lead to above traceback.

sentry-4547178082

closes odoo/odoo#141523

X-original-commit: 09ff54f1d90be5ef5f2e76deaa481f263c6c75c9
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-08 12:14:49 +00:00
Jorge Pinna Puissant 174301ef0f [FIX] web: scroll to selected tab in settings page
Before this commit, in the settings page on mobile mode, when swiping
between the different apps, on the app selector the current app stay
selected on the right corner. The selected app will stay on top of the
other apps, and the app selector itself didn't move.

Now, when swiping between the different apps, the app selector moves to
force the current app to be in the center of the selector.

closes odoo/odoo#141524

Task-id: 3489756
X-original-commit: d35bddfc2cab706d19d33c3335bbae54acd27fbf
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-11-08 08:54:11 +00:00
Hugo Carlier (Huca) 1220b3e6f8 [FIX] timesheet: avoid traceback at timesheet install if missing uom
This commit avoids a traceback when trying to install hr_timesheet post
to "hours" uom deletion.

Steps
=====
- Install module sale_management
- In Settings > Sales > Product Catalog section, activate the option
Units of Measure
- Go to Units of Measure configuration menu
- Remove the unit of measure "Hours"
- Install hr_timesheet

Issue
=====
A traceback appears indicating: "Cannot update missing record
'uom.product_uom_hour'"

Cause
=====
Since
https://github.com/odoo/odoo/commit/ab76c421c279b26195396b61e66b3e8853785226,
deletion of system uom is prohibited. An exception exists for uom
"Hours" that can be deleted without warning. This exception is removed
inside hr_timesheet as this uom is needed in this module. However, it
can still be deleted prior to hr_timesheet installation.

When it is deleted, the installation of hr_timesheet raises a traceback
as the data file hr_timesheet_data tries to access and update this
record.

Fix
===
Before updating the record uom "hours" in the data file, a call to a
method ensure_iom_hours is made. This method recreate this uom if it
does not exist in the database anymore.

task-3551315

closes odoo/odoo#141572

X-original-commit: 0d520e5e7c4b8b17ab1865a3010bbce87a71ec62
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-08 05:31:20 +00:00
Bruno Boi 50288f848d [REV] web: revert fix overlaping overlays
This reverts commit 9682cfa174fb39ec9d9874951ea9ee2884058d96.

The reverted commit introduced more issues than it resolved.

The original issue [1] will still be present but
we will take time to fix it properly after the OXP2023 event.

[1]: https://github.com/odoo/odoo/assets/1159815/8d4c75c7-cb5f-4a84-8333-389971ab436d

closes odoo/odoo#141550

X-original-commit: a07e3c6aeacbfea6da249b794c05295461d20036
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-11-08 05:31:16 +00:00
Victor Feyens eb4d6ad0b6 [FIX] website_sale: address updates
Added test for recent fix 495a5090a5
Also fixes a wrong recordset vs id comparison

closes odoo/odoo#141496

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-08 05:31:12 +00:00
Jérémy Hennecart (jeh) 05681c6f79 [FIX] mass_mailing: do not raise a traceback for unsupported domain
With the mailing filter widget, a traceback was raised when unfocussing
the domain editor. We now check if the format is correct and return
early without raising a traceback. It is also now no longer possible
to try to save the unsupported domain in the favorite.

task-3569969

closes odoo/odoo#141490

X-original-commit: f2f3b185e9f2d069e3fb3975b20ba2a1002e20ca
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
2023-11-08 05:31:11 +00:00
Youssef Bashandy 593db9bc1f [FIX] l10n_fr: Account 607 french translation edited
Current behavior before PR:
In chart of accounts in french localization the accounts with 607 was named 'Ventes de marchandises' where it should be named 'Achats de marchandises'

Desired behavior after PR is merged:
The translation has been updated and now it is named correctly

opw-3536801

closes odoo/odoo#141483

X-original-commit: d6b99af8912573970e6a848719f80d11c22b5041
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Youssef Bashandy (yoba) <yoba@odoo.com>
2023-11-08 05:31:08 +00:00
Romeo Fragomeli 99372adeeb [FIX] web: avoid moving fullscreen dialog on small screen
On "small screen" (especially on Mobile), all dialogs are in fullscreen,
so we don't allow moving the dialog as there is no enough space
available on the screen.
This commit disallows the use of `useDialogDraggable` on "small screen".

Steps to reproduce:
* Open Odoo in "small screen"
* Go to Sale App
* Create a new SO
* Click on the Customer field
* Use the mouse to move the fullscreen dialog (modal's header) => BUG

closes odoo/odoo#141482

X-original-commit: c5f2bd38a3175d7a4ce471dbb91a54f0c3378d10
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-11-08 04:09:56 +00:00
xmo-odoo fc7804b14e [FIX] onboarding: dependencies
When onboarding was updated to override web assets in 518a4e4c43 it should also have been updated to *depend* on web.

closes odoo/odoo#141474

X-original-commit: 76907e3b34d8e33943024772e373fd0c3228b1f8
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-11-08 04:09:56 +00:00
Chong Wang (cwg) 1a7978e509 [FIX] base: fix update translations for base field
in #124402
`update_field_translations` will call `write` to trigger all override logics.
But for ir.model.fields, write will call init_model which may remove all
translations. This commit fix the issue by adding a bypass for translate_only
`write`.
(this commit is the merge of #141126 and #140695)

opw-3575512

closes odoo/odoo#141472

X-original-commit: 33f08c40c92429ada6c5b0387f36d32d4825fcb6
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Chong Wang (cwg) <cwg@odoo.com>
2023-11-08 04:09:54 +00:00
Rodolpho Lima 9728715bdb [FIX] web_editor: remove tooltip in HtmlField
Since [1] the behavior for double-clicking an image in an html field is
displaying it "full-screen", and no longer opening the Media Dialog to
edit it. But, when an image is (single) clicked, a tooltip is displayed
with the misleading "Double-click to edit" message.

This commit makes sure the tooltip is no longer displayed in HtmlField,
while keeping its original behavior for other forms of use of the
Wysiwyg component, like in website.

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

task-3542766

closes odoo/odoo#141471

X-original-commit: 7cf2896ccb47c7832663cd42b9f22899f4eb5d3c
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) <rcdl@odoo.com>
2023-11-08 04:09:53 +00:00
Julien Carion (juca) 52fb449f90 [FIX] web: domain selector: fix reset domain button style
Styling for domain selector's reset domain button was lost in
https://github.com/odoo/odoo/pull/128680. This commit simply brings it
back.

closes odoo/odoo#141470

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-11-08 04:09:52 +00:00
william-andre 3529e11ab2 [IMP] account: order by payment date in amounts to settle
Better usability, we want to reconcile the later invoices first.
Also removing the group by partner because most people will only have a
few lines per partner, so reducing noise. It also doesn't make sense
because we are not displaying credit notes anymore (separate action)

closes odoo/odoo#141457

Signed-off-by: William André (wan) <wan@odoo.com>
2023-11-08 04:09:51 +00:00
william-andre 32c2c5378c [FIX] account: filter due date
The filter was considering the Accounting date, which has nothing to do
with the due date.

Part-of: odoo/odoo#141457
2023-11-08 04:09:51 +00:00
william-andre 072c7ee50f [FIX] account: group by payment date
Reproduce:
* Accounting > Vendor > Amounts to Settle
* Group By: Due Date (any)

There is an error because `payment_date` is not stored.

We also allow more operators in `_search_payment_date` because the
`read_group` will use `<=` and `>=` to open the groups. We still
transform `=` to `<=` to enable the quick search.

Part-of: odoo/odoo#141457
2023-11-08 04:09:51 +00:00
Xavier Bol (xbo) 349915dfc3 [FIX] project: hide name field in project list view
The name field has been to be able to order on it but it is added
and just invisible instead of completely hide the column.

This commit changes `invisible` attribute to `column_invisible` to
completely hide that field in the project list view.

closes odoo/odoo#141455

X-original-commit: 62f49331ba
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-08 04:09:50 +00:00
Anh Thao Pham (pta) 466d0188db [FIX] account: fix foreign taxes creation with group-type taxes
Steps to reproduce:
- Install Accounting
- Create a fiscal position for a foreign country:
  * Country: [Any country that has group-type taxes] (e.g. Italy)
  * Foreign Tax ID: [any tax ID for that country] (e.g. IT12345670017)
- Click on the "here" button appearing in the banner
(Click "here" to create the taxes for this country.)

=> A ValueError is raised.
"External ID not found in the system: account.1_22vsp"

Cause:
During the creation of the taxes, the xml_id of each tax is prefixed
with the chart template code to avoid collision.
However, when linking a group-type tax to its children taxes, it cannot
find them because they are prefixed but the group-type tax is using their
unprefixed value.

opw-3518213

closes odoo/odoo#141448

X-original-commit: 3c22a2d4766e2401e25f2fe8eb0aadc0e9f77524
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-11-08 04:09:49 +00:00
Rodolpho Lima 8ccaf36d10 [FIX] web_editor: abort rpc on ChatGPT dialog close
Before this commit, when the ChatGPT prompt dialog was closed while
waiting for a response, the "loading" overlay would be present until
such response was complete.

Moreover, in certain occasions, the rpc callback, called after the
component was destroyed, could lead to a traceback due to reading a
property of a no longer existing reference to the prompt input element
(namely, in the `_unfreezeInput` method).

This commit improves the user experience by unfreezing the UI on dialog
close, even if a response is pending, and prevents the rpc callbacks
from running after the component is destroyed.

task-3586380

closes odoo/odoo#141442

Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
2023-11-08 04:09:47 +00:00
Benjamin Vray 180c0c043d [FIX] web_editor: fix toolbar buttons alignment
This commit fixes the layout of icons and labels in the "AI",
"Animate", "Highlight" buttons of the text toolbar in Website edit mode.

Before this commit, there was too much space between the icon and the
label of the "AI" button and not enough space between the icon and the
label of the "Animate" and "Highlight" buttons.

task-3586280

closes odoo/odoo#141440

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-08 04:09:46 +00:00
sofiagvaladze 755a3aae1b [FIX] resource: do not update attendance_ids when there is no company
On the 'resource.calendar', attendance_ids is a computed field and
computation is triggered when company_id is changed.

Now, if we remove company_id, attendance_ids are left empty.
Instead, attendance_ids should be updated only when there is a new company set.

task - 3451264

closes odoo/odoo#141433

X-original-commit: af3bff0c578fdbd47a3584cf9e25f3e558cdefc0
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-11-08 04:09:45 +00:00
Paolo Gatti (pgi) 81675e9400 [IMP] l10n_it_edi: new translations
The new refactorings of the Italian EdI require updated translations.

Task link: https://www.odoo.com/web#model=project.task&id=3263708
task-3263708

closes odoo/odoo#141428

Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-11-08 04:09:44 +00:00
Bruno Boi ea83d3eb57 [REV] website: revert UrlAutocomplete displayed behind modal
This reverts commit 6c749a4b0d.

This commit was fixing an issue raised after a fix [1]
that is about to get reverted [2].

We will make a proper fix after the OXP2023 event.

[1]: https://github.com/odoo/odoo/commit/9682cfa174fb39ec9d9874951ea9ee2884058d96
[2]: https://github.com/odoo/odoo/pull/141401

closes odoo/odoo#141405

Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-11-08 03:00:13 +00:00
snd 5f85596621 [FIX] stock: remove show_reserved from picking type view
The field is now readonly and computed, so there's no reason keeping it.

closes odoo/odoo#141390

Related: odoo/enterprise#50346
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-08 03:00:11 +00:00
Sébastien Geelen (sge) 0605d9357e [FIX] web_editor: handle empty history patch
Change the history diff_util to be able to handle
empty patch without crashing.

Add unit tests accordingly.

task-3583986

closes odoo/odoo#141387

Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
2023-11-08 03:00:10 +00:00
Nicolas Bayet d041044dbb [IMP] web_editor: prevent behaviors when an element is protected
In order to be able to create dynamic widgets to the editor, this
commit reinforce the concept of data-oe-protected by preventing the
default behavior for _applyRawCommand, on paste, on input and on
keydown.

closes odoo/odoo#141385

Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-11-08 01:22:01 +00:00
Nicolas Bayet 06bfcfff9a [IMP] web_editor: add oe_movable to move elements in the editor
In order to let third party code set a node to be movable, this commit
adds a class to set a node to be movable in the OdooEditor.

closes odoo/odoo#141384

Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-11-08 01:22:01 +00:00
Mahamadasif Ansari ef5ca752de [REM] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Ref-https://github.com/odoo/odoo/pull/130467

task-3508331

closes odoo/odoo#141383

Related: odoo/enterprise#50344
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-08 01:21:59 +00:00
Didier (did) bcf64fa885 [FIX] mail: mark as read can ignore 404 error
404 means that the thread was deleted

Task-3577083

closes odoo/odoo#141372

X-original-commit: 6aeb00d7e3b60f9eb0cb968fe16ba1a333076ec3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-11-08 01:21:58 +00:00
Didier (did) b160005840 [FIX] mail: reset bus notification before testing
Before this PR, bus notification was not reset before testing the bus
notification of link previews.

https://runbot.odoo.com/web/#id=28333&view_type=form&model=runbot.build.error&menu_id=405&cids=1

closes odoo/odoo#141419

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-07 23:57:47 +00:00
Guillaume-gdi 2f3219c08f [FIX] web_editor, website: hide some text style outside the website app
This commit removes some text style options when the editor is used in
the backend. In the website it makes sense to have all the options but
in the other apps, it is not necessary to have all the options.

task-1958098

closes odoo/odoo#141412

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-07 23:57:46 +00:00
Arnaud Joset 080688868e [FIX] calendar: test was trying to send mails for past events
Before this commit, the test was trying to send mail for a past event.
It would fail with the following error:

```
FAIL: TestCalendar.test_event_creation_mail
Traceback (most recent call last):
  File "/data/build/odoo/addons/calendar/tests/test_calendar.py", line 329, in test_event_creation_mail
    _test_one_mail_per_attendee(self, partners)
  File "/data/build/odoo/addons/calendar/tests/test_calendar.py", line 311, in _test_one_mail_per_attendee
    self.assertEqual(len(mail), 1)
AssertionError: 0 != 1
```

https://runbot.odoo.com/web/#id=29871&view_type=form&model=runbot.build.error&menu_id=405&cids=1

closes odoo/odoo#141411

X-original-commit: 2b0bedf5a57ca2733501359fb8cc8e5bc743a4fa
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-11-07 23:57:45 +00:00
william-andre a5f00ac011 [FIX] analytic: plan column not created
Reproduce:
* create a sub-plan (with parent_id)
* make that plan a main plan (void parent_id)
* open the analytic line view

Result:
Traceback because the dynamic field was not created

closes odoo/odoo#141409

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-11-07 23:57:44 +00:00
Brieuc-brd 2057fdb2e1 [FIX] web: reintroduce text-effect UI icon
Commit 70f853aab9 introduces `oi-smile-add` UI icon but it also
removes by mistake `oi-text-effect` icon.

This commit reintroduces `oi-text-effect` icon.

task-3586386

closes odoo/odoo#141408

Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-11-07 23:57:43 +00:00
Antoine Vandevenne (anv) 1fb7571afb [FIX] *: retarget documentation links to 17.0
closes odoo/odoo#141406

Related: odoo/enterprise#50357
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-11-07 23:57:41 +00:00
Mathieu Duckerts-Antoine fe9b2a8a71 [FIX] web: model field selector: communicate path in debug input
Have the model field selector popover open, modify the path in the
debug input (bottom input available when isDebugMode=true), then close
the popover by clicking away. The model field selector is correctly
updated but its parent does not receive the right path. This happens
because onClose is called before the function update passed to the
popover is called.
Here we make the popover communicate its current path on each input
event so that if the popover has to be closed, the model field selector
knows which path to communicate to its parent.

closes odoo/odoo#141362

X-original-commit: 6a4e4221a1daa474217070f6a78602a962bbcf65
Related: odoo/enterprise#50337
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-11-07 21:02:33 +00:00