Commit Graph
166098 Commits
Author SHA1 Message Date
Michal Kolodziej 0463551083 [CLA] signature for mikolodz
closes odoo/odoo#138280

X-original-commit: 290d15518238609136020a2bd930b8bece25807e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-10-12 13:16:47 +00:00
Antoine Vandevenne (anv) 3ef9310ec3 [FIX] (account_)payment, sale: check document access in payment routes
Commit 4d1a1f1c introduced a systematic check on the kwargs passed to
transaction routes of modules integrating with online payments, but
failed to check the access token of documents whose ID is passed to
payment routes. This allowed retrieving the access token of such
documents by visiting a route that did not check the document access
(e.g., /my/payment_method) and passing an arbitrary document ID
(e.g, sale_order_id=123). The route's controller would reroute the
payment flow to the document's portal page and render the landing route
of the flow on the payment form, with the access token included.

This commit makes sure that we always check the access token of a
document before reading rerouting a payment flow.

closes odoo/odoo#138238

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-10-12 13:16:46 +00:00
Florian Charlier cc06529746 [CLN] remove classes only used in tour
We removed CSS styling for these classes in
854083f70a,
but these were only used in the survey tour, and not
instrumental, so we can remove them.

Task-3525225

closes odoo/odoo#138095

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-12 13:16:45 +00:00
FrancoisGe c5b87e130b [FIX] web: update properties field
The purpose of this commit is to resolve two issues relating to the properties field:

Issue 1:
========
In a list view, when you edit a property and then select another field
in the same record, the edition disappears.

How to resolve:
--------------
Do not delete the changes linked to the property in record.update.

How to reproduce:
----------------
- Go to a list view with a properties field containing a property char
- Insert a value in the char property
- Click on another field in the same record

Before this commit:
    The inserted value disappears

After this commit:
    The inserted value is still present

Issue 2:
========
The fields/activeFields only take into account properties received
during the initial web_read and not those added by an update or an onChange.

How to resolve:
--------------
Generate property fields and activeFields during parseServerValue
(web_read and onChange) and during an update.

How to reproduce:
----------------
- Go to a form view with a properties field
- Editing a field with an onChange
- The onChange returns a new property for the properties field

Before this commit:
    A crash is displayed

After this commit:
    The new property is displayed correctly

closes odoo/odoo#137989

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-12 13:16:44 +00:00
Nicolas Bayet b2faa9ea8c [FIX] base,web_editor,website: pregenerate lazyloaded bundles
Prior to this commit, lazy-loaded bundles weren't pregenerated,
potentially causing non-deterministic test failures when the
generation process took too long. Plus, each Python test loading these
bundles necessitated their regeneration.

With this commit, the lazy-loaded bundles are now included in the
pregenerated bundles.

task-3493014
runbot-24842

closes odoo/odoo#134464

Related: odoo/enterprise#46985
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-12 13:16:42 +00:00
Nicolas Bayet fac09ae974 [IMP] web_editor,mass_mailing,website: lazy load wysiwyg
In order to improve the loading time of the odoo backend, only load
the wysiwyg before starting an html_field.

task-3493014

Part-of: odoo/odoo#134464
2023-10-12 13:16:42 +00:00
Bastien (bvdn) 94fbc58c1b [IMP] sale_stock: adapt product_catalog for stock module
When the stock module is installed some conditions changes in the sale orders
Here's the list and the implementation made to help this

Patched the kanban_record so that the asked_qty of a product cannot go below the delivered_qty

the delivered_qty is added in the productCatalogData of the record through the _get_catalog_info() hook in the following PR:
https://github.com/odoo/odoo/pull/132341/commits

Patched the sale_order_line xml to disabled removeProduct and decreaseProduct buttons when the quantity is equal to the
delivered quantity

if the user tries to remove an already delivered product it'll set to the delivered quantity instead of 0
if the user tries to set a quantity that is below the delivered quantity it'll set it to the delivered quantity

Added action action_product_forecast_report to the menuitem of the products

Task-3343547

closes odoo/odoo#127161

Related: odoo/enterprise#43469
Related: odoo/upgrade#4887
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-12 13:16:39 +00:00
VAN BOSSUYT Nicolasandqsm-odoo 569421ca8c [IMP] website, *: add a warning in the html/css editor
*: web_editor

This warning redirects users to the code snippets block and footer/body
code injection. We want to avoid editing the XML code for no good reason
because it complicates upgrades to the next version.

task-3229205

closes odoo/odoo#117051

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-10-12 13:16:38 +00:00
qsm-odoo b535de4344 [FIX] web_editor: remove ace editor files from the frontend bundle
The JS + XML and related lib JS files are only used by the website
editor and by studio. So it should only part of the backend bundle.

Recently these assets were put there by [1] as a first step towards a
potential deletion of the assets_common bundle, which was later removed
by [2], they should however never been in common.

[1]: https://github.com/odoo/odoo/commit/08dcbc8f1def06476d025b110049ee596e906816
[2]: https://github.com/odoo/odoo/commit/6f95be6884a59665ca7d8a809e7aaa17695fa9b0

task-3229205

Part-of: odoo/odoo#117051
2023-10-12 13:16:38 +00:00
Xavier Morel 57984131f7 [REM] web: pwa registration success log
odoo/odoo#136944 removed the log from website_event_track, but despite
noting the discontinuity I missed that *a new instance of the log line
had been added in 16.1* and that is likely why 16.1 was suddently
spammed with that: website_event_track (likely) only installs its PWA
when opening an event on website, but since odoo/enterprise#35322 the
web client tries to install its PWA *every time it's loaded*, which
can be up to once per test for qunit tests (if they need a webclient).

In odoo/odoo#133560 this registration was moved from enterprise to
community, so needs to be nuked here as well.

Follows the removal of this log line in odoo/enterprise#48831.

closes odoo/odoo#138469

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-12 11:20:36 +00:00
Louis Baudoux c059341d2b [IMP] iap: improve IAP accounts deactivation
Setting IAP sandbox as the endpoint for IAP doesn't really neutralize
the IAP services, it only prevents buying credits for it.
The existing credits could still be consumed by mistake.

In this new version, the account is kept as is, but the "+disabled"
suffix is appended to it. This will effectively disable the service by
raising a `InsufficientCreditError` for every IAP transactions.

This solution has multiple advantages:
- It's easy to revert, removing the "+disabled" suffix will re-activate
  the account.
- It's retrocompatible as it doesn't require a new field on the IAP
  account model.
- It's safer as the "disabled" information is directly part of the
  token, its logic is handled on the IAP side and thus common to all
  services.

In this new version, the tokens need to be transformed as follows:

 original token     | neutralized token
--------------------|-------------------
 abcd1234           | acbd1234+disabled
 my_token+suffix123 | my_token+disabled
 abc+disabled       | abc+disabled

closes odoo/odoo#138455

X-original-commit: 550595d84b9689f3fcc00f840e9d9d6d521c5ea9
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2023-10-12 11:20:35 +00:00
MerlinGuillaume af73206892 [FIX] web: add help tooltip from form view on fields
The help defined on a field via Studio is only visible when debug mode
is enabled

Steps to reproduce:
1. Install Contacts and Studio
2. Go to Contacts, open a contact and toggle Studio
3. Add a field in the form view and add a message in the Help Tooltip of
   the field
4. Close Studio
5. Without debug mode, the small question mark is not displayed next to
   the field so we cannot see the help tooltip

Solution:
First use the help defined on the field in the view, then the help
defined on the field in the model

Problem:
The tooltip help can also come from the view

opw-3511121

closes odoo/odoo#138416

X-original-commit: a70639b790471aec781c50274abbda78bf5bea7d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-10-12 11:20:34 +00:00
MerlinGuillaume 3463c48cad [FIX] web: limit width of search bar favorites
With long favorite names, the search menu overflows to the left of the
screen

Steps to reproduce:
1. Install any app with a search bar (e.g. CRM)
2. Open the app and save the current search as a favorite, enter a
   really long name (200 characters or more)
3. The search left side of the search bar is not visible anymore

Solution:
Limit the width of the search bar menu and of the favorite menu. The
purpose of the maximum width on the search bar menu is for a correct
display in mobile view. We also take into account the comparison menu
(that can be displayed if you add a filter on creation date)

opw-3442705

closes odoo/odoo#138415

X-original-commit: 107f496b5e67ca3293e2c63a273cf8c491187fb5
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-10-12 11:20:33 +00:00
tsm-odoo 7bab1cfde1 [IMP] bus: make bus tests more robust
This commit makes bus tests more robust by implementing
functions that wait for some events instead of relying
on `nextTick` that might or not be sufficient.

fixes runbot-23097

closes odoo/odoo#138221

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-12 09:49:46 +00:00
tsm-odoo 621668e53b [IMP] bus: clean bus tests
This commit cleans the bus tests by:
- flattening the tests structure by putting tests outside
of the `QUnit.module` function.
- removing unnecessary `assert.expect` calls.
- adding an helper to add common bus service to the registry

Part-of: odoo/odoo#138221
2023-10-12 09:49:46 +00:00
Julien Carion (juca) f99efb0173 [IMP] web: domain field: Add condition in folded domain field
This commit adds the recently removed add condition button to the folded
domain field so the user can unfold the domain and add a new rule in one
click.

Task-3525269

closes odoo/odoo#137663

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-10-12 09:49:45 +00:00
Antoine Dupuis (andu) 64e45fe1f1 [IMP] l10n_mn: Convert VAT report to use tax_tags engine
- Moved VAT report to Community repo
- Re-numbered XMLids of the report lines so that they correspond to the
  tag names
- Changed the tax repartition line templates to use the new tax tags
  defined in the VAT report
- Removed the obsolete tax tags and account tags

closes odoo/odoo#134590

Related: odoo/enterprise#47033
Related: odoo/upgrade#5122
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-10-12 09:49:42 +00:00
Andrea Grazioso (agr-odoo) 5f5b1b5074 [FIX] account_edi: avoid reset electronic invoicing settings on update
With Mexican, Colombian, or Ecuadorian localization installed
Open a journal (example Customer Invoices)
In 'Advanced Settings' tab, edit Electronic invoicing (uncheck some options)
Update the account_edi module

Issue: The configuration of the journals is lost
It occurs that when updating the module we call the `account.edi.format`
create, which will call the compute method on all journals
This it not necessary when updating the module

opw-3472309

closes odoo/odoo#138447

X-original-commit: e0b7f02fbb5a0da3be61b396fbba5d85ddbeb7d4
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-10-12 08:09:30 +00:00
Guillaume (gdi) c4db3b1f09 [IMP] website: change header color option name
This commit changes the name of the option which changes the color of
the header. Before this option was called 'Colors' this commit renames
it to 'Background'.

task-2904507

closes odoo/odoo#99732

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-10-12 08:09:27 +00:00
Guillaume (gdi)andjpr-odoo 1e30600d9e [IMP] website: add text color option for "hover the content" nav bars
This commit adds a new option to choose the text color when the nav bar
has the position "hover the content".

task-2904507

Part-of: odoo/odoo#99732
Co-authored-by: jpr-odoo <jpr@openerp.com>
2023-10-12 08:09:27 +00:00
Guillaume (gdi)andjpr-odoo 6534c4f2ce [IMP] website: allow all background colors for over the content headers
This commit allows users to choose any background color for nav bars
that are over the content. Before this commit the available colors were:
- bg-black-{15/25/50/75}
- bg-white-{25/50/75/85}
Now the users can choose any color (except gradients).

task-2904507

Part-of: odoo/odoo#99732
Co-authored-by: jpr-odoo <jpr@openerp.com>
2023-10-12 08:09:27 +00:00
Guillaume (gdi) 4631e0731f [REM] website: remove useless page option callback
The page options code had a callback for header_text_color, this one was
useless because the select style code already does the job. This commit
removes this useless code and allows the page options not to have a
callback.

task-2904507

Part-of: odoo/odoo#99732
2023-10-12 08:09:27 +00:00
Guillaume (gdi) 534caa041d [FIX] website: remove header font color transitions
Before this commit, the font color was subject to animations, this
commit removes that because it doesn't look good with a header over the
content.

Steps to reproduce the bug:
- Edit a website
- Set the header to "over the content"
- Put a dark background color on this header
- Scroll down and then up

=> The text color flicker.

Part-of: odoo/odoo#99732
2023-10-12 08:09:27 +00:00
Guillaume (gdi) d54028e5ed [IMP] website: restructure the header formatting options
This commit allows to restructure the header formatting options. The
font style option is now alone on one line. A new line of options is
added with the font size, font color and the alignment of the navigation
elements. Note that the font color option is a brand new one.

task-2904507

Part-of: odoo/odoo#99732
2023-10-12 08:09:27 +00:00
Guillaume (gdi) 85befe55ba [IMP] website: allow to have reference SCSS variables for color pickers
This commit allows the color picker widget to manage an SCSS variable
which can itself be a reference to another SCSS variable.

task-2904507

Part-of: odoo/odoo#99732
2023-10-12 08:09:26 +00:00
Guillaume (gdi) 42084242f8 [IMP] web_editor: permit icons to represent we-select values
This commit allows to have icons in we-select options.

task-2904507

Part-of: odoo/odoo#99732
2023-10-12 08:09:26 +00:00
Odoo's Mergebot 52286cf9e1 [MERGE] mass_mailing(_sms): improve usability of mailing, subscriptions and lists
Purpose:
Improve the general usability of Email Marketing based on what has been observed on Userbrain.

Specification:
1) Provide instant feedback for small mailings and for onboardees.
2) Improve queue ribbon
3) Add subscription field in mailing contact
4) Remove system generated document
5) Improve widget domain view 
6) Add buttons in mailing list to send email and sms from there.

TaskId-2702607

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#82107

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-12 08:09:25 +00:00
dht-odoo c00ea04837 [IMP] mass_mailing(_sms): add a button to send mailing & sms from mailing list
This commit introduces a button "Send New Mailing" & "Send New SMS" on the mailing
list so that one can direct send mailing & sms from a mailing list.

The current list will be set as default one in the mailing.

TaskId-2702607

Part-of: odoo/odoo#82107
2023-10-12 08:09:25 +00:00
dht-odoo f7667bdd28 [IMP] mass_mailing: add 'create_date' in subscription list view
This commit will add create_date field in view to display
it as 'Subscription Date' to the user so that concerned people
can know when did the contact subscribed into a mailing list.

Here, now when we will import contacts in mailing.contacts
we are linking the mailing_list in subscription_list_ids
using Command to get the values of create_date.

TaskId-2702607

Part-of: odoo/odoo#82107
2023-10-12 08:09:25 +00:00
dht-odoo e542cca69e [IMP] mass_mailing: improve mailing form view design
- Before this commit, it could happen sometime that the time for
  which mailing was schedules has passed, but user was still
  getting the same ribbon that mail was scheduled for a particular
  time (which is a bit confusing). And also in the case of
  schedule_type equals to now we are displaying the next_departure
  datetime in ribbon.

  This commit improves the behavior and in such cases, displays a new
  ribbon message saying "This mailing will be sent as soon as possible."
  and has as refresh button next to it, which reloads the page. Once
  the mailing is sent, this ribbon will also be hidden.

  For that, we introduce a new compute boolean `is_past_departure` which
  will be true only if the scheduled time is in past and the mailing is
  still in queue.

  And for the case scedule_type equals to now we are displaying
  a new message on ribbon with refresh button.

- Re-arranges the model container part of the form view of
  a mailing in order to utilize the horizontal space.

  It moves domain next to the model / filter related fields so that
  everything is in a single row, and thus reducing vertical space.

TaskId-2702607

Part-of: odoo/odoo#82107
2023-10-12 08:09:25 +00:00
Victor Piryns (pivi) 8fd1b20d20 [PERF] stock: reduce memory usage of _get_orderpoint_action
Issue:
On databases with lots of products (400k+ `product.product`), the action
Inventory > Operations > Replenishment takes a lots of memory to
complete, leading to "Out of Memory" errors in some use cases.

Analysis:
When triggering the action, we need to recompute the
`virtual_available` of a lot of products (regular occurrence when a
DB for example has a lot of variants). The compute
`_compute_quantities` uses the ORM `filtered` method to filter out
`services` out of the `product.product` we have. This method is
memory hungry, as for each `_prefetch_ids` (capped at 1000, cf.
`PREFETCH_MAX`) it will store in cache the `product_tmpl_id.type`,
which stores all fields of the product_template + the type,
bloating the cache with *useless* data, as it's not used beyond this
filtering process.

Solution:
Disable the prefetcher, the bulk of the work is done in
`_compute_quantities_dict`, which makes a lot of `read_group` and
doesn't benefit much from fields already cached (this function
itself also disables the prefetcher internally at some point).
Also correcting the looping order in `_get_orderpoint_action` to
avoid multiple cache invalidation when those can be batched in 1 call.
The `PREFETCH_MAX` makes sure the compute is only executed with 1k
records at a time, so explicitly dividing `all_products_ids` into
batches of 5k is unnecessary.

Results:
- Memory usage of `_get_orderpoint_action`:

| Memory usage | Before  | After   |
|--------------|---------|---------|
| Total Memory | 1.8 GiB | 363 MiB |
| Allocations  | 10170   | 2804    |

(profiler data available on referenced ticket)

- Execution time of `_get_orderpoint_action`:

| `product.product` count | Before   | After    |
|-------------------------|----------|----------|
| 1k                      | 1.3s     | 1.1s     |
| 10k                     | 4.1s     | 3.8s     |
| 100k                    | 30s      | 25.9s    |
| 400k+                   | 2min 25s | 1min 39s |

As we can observe, we've reduced drastically the memory usage of the
function and also the number of allocations quite drastically. As a
side effect there is also a slight speed improvement at small
scale, and at large scale the gains are up to ~40%
faster.

Reference:
opw-3415087

closes odoo/odoo#138423

X-original-commit: 41442574159429ce29aa5c5adf0e1a0d8a7046dd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-10-12 06:59:08 +00:00
Mahamadasif Ansari 4e58076611 [FIX] base_vat: prevent IndexError when enter single digit vat
Currently, when the user enters a value of `VAT` like '/' or
any single character, an error occurs.

Error: "IndexError: string index out of range"

This is because the recently applied PR [1] added a Line [1] that tries to
access the second digit of VAT, but the user added only one character.

This commit fixes the above issue by accessing the second character
when the length of the VAT is more than one character.

PR [1]-https://github.com/odoo/odoo/pull/136146
Line [1]-https://github.com/odoo/odoo/blob/422625615b2f6708667fa44d2a9e83ad3e66e5af/addons/base_vat/models/res_partner.py#L92

sentry-4524865338

closes odoo/odoo#138454

X-original-commit: 57f59f2088c46f4603ff83bbcf2db42d705331fe
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: ANSARI MAHAMADASIF (maan) <maan@odoo.com>
2023-10-12 03:59:52 +00:00
Gabriel de Paula Felix (gdpf) a4eaeb1bcb [FIX] microsoft_calendar: add security xml file to manifest
Before this commit, the security XML file of microsoft_calendar module was not added in manifest, ignoring rules previously defined there. After this commit, the security XML file is now properly added.

Issue from task-id: 3410651

closes odoo/odoo#138397

Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-10-11 20:21:46 +00:00
Walid ad0555abbe [FIX] mrp: End date with lead time
Steps to reproduce:
- Enable manufacturing lead times in settings
- Create a BOM for product P with lead time 5 days
- Create and process an MO for product P
- End date is wrong
(add date_finished to the MO list view to check)

Bug:
when marking MO as done the end date is correctly set as today
but during the write the compute is triggered which delays it by
the lead time

Fix:
do not modify the end date of done MOs

opw-3536069

closes odoo/odoo#138431

X-original-commit: baa769a56a1236ec75a6042c56643464c2aabd3d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-11 18:03:35 +00:00
vava-odoo 7202a632ca [FIX] sale: fix filter domain
Typo from commit: https://github.com/odoo/odoo/commit/216fa84fbe2c

closes odoo/odoo#138430

X-original-commit: 64ddd715af26efb2763bb255132f058036e0038e
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-10-11 18:03:34 +00:00
hupo-odoo 211ad76fb0 [IMP] account: Change table title for VAT details
When issuing an invoice in foreign currency, a detailed table with the vat amounts in company currency is displayed. The table title was "Tax computation in XXX" and the translation was not optimal in other languages, for example French: "Calcul de la taxe dans EUR". We simplify the title to "Taxes XXX", with XXX being the currency code.

task-3501390

closes odoo/odoo#138429

X-original-commit: 99d408bbbc696e3ca139b6a1a14279fc13fa7f89
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-10-11 18:03:33 +00:00
Nicolas Viseur (vin) dfd59627d2 [FIX] account: position of tax edit pencil on bills
The commit https://github.com/odoo/odoo/pull/128376 fixed an issue related to rtl languages,
but at the cost of the pencil position.
By making the span containing the value a display: block the pencil could no longer be placed
on the side of the value and was instead pushed on top.

This small fix will just place the pencil inside the span, in order to get it back aside the amount.

Task id # 3548687

closes odoo/odoo#138408

X-original-commit: 718fe9396aebec1c0a15c5064202f6350cdf346a
Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-11 18:03:31 +00:00
Odoo 119771caa7 [FIX] web_editor: should be able to remove nested quote blocks (i.e. in a table)
Before this commit:

When a new element is added in a nested form i.e. inside a table <td>[]</td>
or inside a nested list, it is not deleted on immediate backspace.

After this commit:

When a new element is added in a nested form i.e. inside a table <td>[]</td>
or inside a nested list, it is now deleted on immediate backspace.

task-3339625

closes odoo/odoo#138382

X-original-commit: 263b8b4e2ff622f25dedef078e7d99c94c8f04b3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-11 18:03:30 +00:00
oco-odoo ffa1979f7d [IMP] account: introduce sum_children keyword in aggregations
It is now possible for aggregations to be defined with the formula 'sum_children'. An expression using this formula will take all the expressions with the same label, belonging to child lines of the line this expression belongs to, and will sum their values. This is done as an improvement in stable, as this feature is needed for a cleaner upgrade of custom-made tax reports from 15.0 to 16.0, since the former tax report engine used to behave like that by default (no formula meant you had to sum the children).

Task 3499260

closes odoo/odoo#138358

X-original-commit: 276142f899e9050ccd39f52c502e6529bbaa0493
Related: odoo/enterprise#48784
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-10-11 18:03:26 +00:00
niyasraphy dd6cd1a82f [FIX] base: traceback after enabling profiling
before this commit, if profiling is enabled in the db,
and on trying to validate a sale order, a traceback is
shown

* enable profiling
* confirm a quotation

traceback:
Failed to render QWeb template : <div style="margin: 0px;
padding: 0px;">
    <p style="margin: 0px; padding: 0px; font-size: 13px;">

introduced in: https://github.com/odoo/odoo/commit/016f26a9315c693bdeb894725898c2cf725d8989

here the options['ref'] is coming as the email template
body and it is failing on try to do int of options['ref']

after this commit, no traceback wont be shown on
confirming sale order, when profiling is enabled

closes odoo/odoo#138357

X-original-commit: 01548aff72b031389a7563948bb12bc3abb07bfc
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-10-11 18:03:25 +00:00
zel-odoo 37381a5cf0 [FIX] mail: missing dependency for icon in public
The right arrow icon on the public page relies on odoo-ui.
Currently, this file is not correctly imported into the public bundle, since
the icon is not showing.

This fix is to import the essential file into the public bundle.

closes odoo/odoo#138354

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-11 18:03:24 +00:00
Julien Van Roy 484ab5dfcb [FIX] account_edi_ubl_cii: fix peppol fields computes & update BE EAS
Replace every mentions of 9925 to 0208 for Belgian companies (public
administration also have this 10 digits number). The EAS 0208
corresponds to the company_registry.

Introduce a mechanism to validate the `peppol_endpoint` and refactor the
computes for the `peppol_endpoint` and `peppol_eas` fields.

See: https://openpeppol.atlassian.net/wiki/spaces/Belgium/overview

task-3297311

closes odoo/odoo#138343

X-original-commit: 744bfa9e5f087a2aa9d714351a559c3320ecfda4
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-10-11 18:03:22 +00:00
Adrien Guilliams (adgu) 08a561d588 [IMP] pos_self_order, website_sale: add info popup to product card in self
This commit introduce the information button on the product card in the
self order mode. This button open a popup with the newly created field
"description_self_order" which is an HTML field allowing the user to
have a very customizable description for the product.

It also removes the description_ecommerce field from the product view
form as it is a field used in the website and not adapted for
the backend (css/js not compatible).

closes odoo/odoo#138216

Task-id: 3512835
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-11 17:02:15 +00:00
Thibault Delavallée 84e2d6ea55 [REF] mail: remove 'alias_user_id'
'alias_user_id' field allows to set a user when creating records through the
mail gateway. This is however quite wrong and eases spoofing. The alias owner
is not the creator of any record, nor responsible.

Current possible ways of being owner / responsible of records created through
the mailgateway

  * when you send an email to an alias: if you are recognized you are already
    set as creating user and logged message author;
  * it is possible to use alias_defaults notably to set fields like 'user_id'
    if you want to be notified / responsible of records created through this
    specific alias;

Those usages are therefore sufficient, no need to have another way to spoof
users. Moreover it is hidden in technical view of aliases, no model allows
to configure it by default. Moreover since odoo/odoo@3edf181 no default
value is given to alias_user_id as it adds more (ACLs / creator) issues than
really helping setting up mail gateway flows.

Task-3453482
Prepares Task-36879 (Mail: Multi-Domain Aliases)

closes odoo/odoo#138213

Related: odoo/upgrade#5259
Related: odoo/enterprise#48692
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-11 17:02:14 +00:00
zel-odoo dea14bcd27 [FIX] mail: no duplicate content on message of type email
Fix the duplicate message in the discuss and search
when the message type is email. This was caused by a wrong
rebase of https://github.com/odoo/odoo/pull/118794 that
did not take into account the branching on message body
for message of type email by https://github.com/odoo/odoo/pull/131202

The search highlight feature was not working on these email
message, so this commit also fixes that.

closes odoo/odoo#138205

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-11 17:02:11 +00:00
Lucas Lefèvre (lul) 8600d5d363 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/4dc340fc [REL] 16.5.0-alpha.10
https://github.com/odoo/o-spreadsheet/commit/c6e5d58e [IMP] dates: cache date parsing
https://github.com/odoo/o-spreadsheet/commit/38e44577 [IMP] range: don't spend time building a zone
https://github.com/odoo/o-spreadsheet/commit/7e491948 [IMP] cell: faster formula string
https://github.com/odoo/o-spreadsheet/commit/d6a498b4 [FIX] evaluation: don't build formula content for errors
https://github.com/odoo/o-spreadsheet/commit/5e2a7640 [IMP] evaluation: don't create useless Errors
https://github.com/odoo/o-spreadsheet/commit/d5ff0843 [IMP] Composer: highlight fuzzy matched letters in autocomplete dropdown
https://github.com/odoo/o-spreadsheet/commit/3562883e [IMP] Composer: always sort autocomplete elements
https://github.com/odoo/o-spreadsheet/commit/e8d76dd3 [IMP] Composer: Select autocomplete results on mouseover Task: 3387413
https://github.com/odoo/o-spreadsheet/commit/b6dc8877 [IMP] evaluation: don't spend time building formula string
https://github.com/odoo/o-spreadsheet/commit/078e888d [FIX] evaluation: compute cell only once

closes odoo/odoo#138145

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-11 17:02:10 +00:00
Pierre Pulinckx (pipu) 13b3f8af4b [REF] website, mass_mailing: remove getBundle usages
In this commit, we remove three usages of the getBundle function from
@web/core/assets.js. The final goal is to remove it totally to simplify
the understanding of assets's API. To replace the use of getBundle in
mobile preview dialog, an xml template has been created on the server
side and then called by http requests. During the request, we retrieve
the list of assets (server side getbundle) to inject these into
the xml template.

taskId : 3266441

closes odoo/odoo#138055

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-10-11 17:02:09 +00:00
Michael (mcm) d84fd5274b [FIX] website: fix autocompleteWithPages option
Since the PR [1], the function autocompleteWithPages does not receive
a widget anymore and does not trigger an event on it when an url is
selected. Instead it is replaced by an optional function property
"urlChosen" which is called if given.
The error is that the optional check is wrong. The check is done on
the "options" parameter, not on its optional property "urlChosen".
This commit simply fixes this check.

[1]: https://github.com/odoo/odoo/pull/136271

closes odoo/odoo#138047

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-10-11 17:02:08 +00:00
Michael (mcm) 7ebd785764 [IMP] *: rename quick_add into quick_create
This commit renames calendar's attribute quick_add to quick_create
to be more consistent with other views.

closes odoo/odoo#138042

Related: odoo/enterprise#48677
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-11 17:02:07 +00:00
Michael (mcm) 3846472e96 [REF] web,calendar: split calendar quick_add attr
Since the PR [1], quick_add can be both a boolean and an id:
0 = without quick create
1 = with quick create and simple dialog
other number = with quick create and custom form view dialog

This is not great to have both behavior in a same attribute so this
commit split them back in two attributes as it was before [1].
It's easier to understand when we want a quick create and which view
to use in the dialog.

[1]: https://github.com/odoo/odoo/pull/122923

Part-of: odoo/odoo#138042
2023-10-11 17:02:07 +00:00