Skip to content

Syncing from upstream odoo/odoo (tmp.master) #34209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 113 commits into from
Jul 10, 2025

Conversation

bt-admin
Copy link
Collaborator

bt_gitbot

william-andre and others added 30 commits July 9, 2025 03:45
The dict contained 2 different examples for a tax number in Japan.
Keeping the one that is matching the company registry example, but
positionning it correctly in the dict.

closes #217805

X-original-commit: af607be
Signed-off-by: Josse Colpaert (jco) <[email protected]>
Signed-off-by: William André (wan) <[email protected]>
Use markup template and html functions to make the code cleaner and
safer while no longer triggering ci/security flag.

closes #216275

Signed-off-by: Géry Debongnie <[email protected]>
Use markup template and html functions to make the code cleaner and
safer while no longer triggering ci/security flag.

closes #216340

Signed-off-by: Géry Debongnie <[email protected]>
…p tests

The test_expected_date_with_storable_product, introduced in #204243,
failed when running single-app tests for the sale module because it relies on
the sale_delay field defined in the stock module.

To avoid this issue, the test has been moved to the `sale_stock` module,
ensuring the test suite passes in all configurations.

closes #217885

Signed-off-by: Steve Van Essche <[email protected]>
Waiting an animationFrame after each click (fix done in [1]) was not
sufficient, we actually need to wait for 2 or 3 separate ticks depending
on the case, because `customizeWebsiteColors` calls between 2 and 3
debounced functions (`debouncedSCSSColorsCusto`, possibly
`debouncedSCSSVariablesCusto`, and finally `reloadBundles`) with a 0-ms
delay.

[1]: cbcd1b1

runbot-229604
runbot-229686

closes #217897

X-original-commit: 0b9b1a0
Signed-off-by: Francois Georis (fge) <[email protected]>
Signed-off-by: Robin Lejeune (role) <[email protected]>
We introduce a new operator "in range" for the date/datetime fields.
It more or less replaces several other operators that are removed:

between, not_between, today, not_today, last, not_last, next, not_next.

The new operator allows to easily select several dynamic time ranges:

Today, Last 7 days, Last 30 days, Month to date, Last month,
Year to date, Last 12 months

or a custom range given by 2 dates/datetimes.

We also remove the ends_with operator and reduce the lists of operators
available for selection for most of the field types.

Task ID: 4894524

closes #216638

Related: odoo/enterprise#89233
Signed-off-by: Michaël Mattiello (mcm) <[email protected]>
The test in this module imports a common setup from
account_reports which is not a dependency, and is not
auto installed when the test runs with comunity modules
only. This fix replaces the setup by the community one
AccountTestInvoicingCommon.

closes #217837

X-original-commit: 591acd3
Signed-off-by: Jinane Maksoud (maji) <[email protected]>
In this commit, we move step_utils to the root of web_tour/static/src.
The goal is to move all the files that are in tour_service into
web_tour/static/src and then split it into tour_automatic and
tour_interactif in order to create 2 separate bundles and be able
to lazy load what tour_automatic needs only when we launch an automatic
tour.

closes #217854

Related: odoo/enterprise#89712
Related: odoo/design-themes#1111
Signed-off-by: Pierre Pulinckx (pipu) <[email protected]>
A blocking error is too much, because it impedes the automatic sync flow.
Warnings have been added to the `i18n` command and the
base_language_export wizard.

A retry / more button has been added, in case the user wants
to export something else.

The title was changing to the default Odoo after switching state.
Now it stays Export Translation

closes #217747

X-original-commit: 5192edc
Signed-off-by: Chong Wang (cwg) <[email protected]>
Signed-off-by: Paolo Gatti (pgi) <[email protected]>
Before this commit, components created by the public component services
did not interact very well with the editor. For example, it was possible
to save the content of the dom of the component in the page, which meant
that once the component was mounted, it would look like we have 2
components, one of them inactive, and the other active.

This commit fixes the issue by mounting the component in an interaction,
so the lifecycle should be properly handled.

X-original-commit: bc038f8
Part-of: #217673
Signed-off-by: Francois Georis (fge) <[email protected]>
With this commit, we introduce a public_component.edit registry to
explicitely declare that a owl-component should be active in edit mode.
By default, the code will fall back on the public_components registry,
but it will add a pointer-events: none style attribute to make sure that
such components are inactive in edit mode, which is most likely what we
want.

closes #217673

X-original-commit: 3841ae0
Signed-off-by: Francois Georis (fge) <[email protected]>
* = calendar, crm_livechat, hr_holidays, im_livechat, project, rating,
  website_livechat, website_slides

There are many flows in which we need to build Store data for a specific
target, as different targets have different needs and different ACL.

For example, we usually don't want to send email address to non-internal
users as this is considered a private data. However we are fine with
returning the email address to internal users by default.

This is currently implemented with `for_current_user` on a case by case
(specific store methods of specific models), which leads to
inconsistencies and carelessness: some models have for_current_user as
False by default, other as True, some would need the param but currently
don't define it, some methods check if the current user is internal but
don't verify the target at all (internal users can broadcast to other
non-internal users), etc.

This commits brings this feature in a more robust way directly into the
Store.

X-original-commit: 9128981
Part-of: #217745
Related: odoo/enterprise#89650
Signed-off-by: Matthieu Stockbauer (tsm) <[email protected]>
Signed-off-by: Sébastien Theys (seb) <[email protected]>
The email pop in _to_store of partner is especially problematic as it
doesn't allow to set the email of a partner in a store for the portal
user even in flows where it would be acceptable, which is necessary in
some other tasks.

On top of that we want to remove this method as we have better ways to
express the intent of storing a value in the store with the other
existing methods.

task-4676468

closes #217745

X-original-commit: 3c5d367
Related: odoo/enterprise#89650
Signed-off-by: Matthieu Stockbauer (tsm) <[email protected]>
Signed-off-by: Sébastien Theys (seb) <[email protected]>
Use markup template and html functions to make the code cleaner and
safer while no longer triggering ci/security flag.

closes #216159

Related: odoo/enterprise#88683
Signed-off-by: Matthieu Stockbauer (tsm) <[email protected]>
closes #217742

Signed-off-by: Francois Georis (fge) <[email protected]>
Use markup template and html functions to make the code cleaner and
safer while no longer triggering ci/security flag.

closes #216306

Signed-off-by: Géry Debongnie <[email protected]>
Issue:

Copying a bom with an operation will not reassign the copied
operation to the by product lines.

Steps to reproduce:
- In the settings enable operations and by-products
- Create a bom with an operation op1 and a by product produced in op1
- Copy the bom
> The copied by product line refer to the operation of the original bom
> this can be checked by archiving the copied operation which should
> erase its link with the copied by product line but will not

Cause of the issue:

When a bom is copied, the new operation is reassigned to the new bom
lines by these lines:
https://github.com/odoo/odoo/blob/9cb4230a6b2252243a8e0546a1a8f5bc52e74009/addons/mrp/models/mrp_bom.py#L230-L247
However, nothing is made for the by product lines.

opw-4788252

closes #217846

X-original-commit: 75668dd
Signed-off-by: William Henrotin (whe) <[email protected]>
Signed-off-by: Lancelot Semal (lase) <[email protected]>
Issue:
When having two lines on an invoice with the same tax and different analytic distribution, the base value is doubled on the tax report.

Steps to reproduce:
- Create a new taxe on sales (eg 10%)
- Make sure the option "Analytic Accounting" is ticked in the settings
- Create an invoice with two lines (eg both at $100), add the tax on both
- Change the analytic distribution on both lines to different values
- Confirm the invoice
- Go to the tax report
- Select the report "Group By: Account > Tax"
- On the report the "Net" amount is doubled ($400), the tax amount is correct ($20)

Cause:
On the invoice we can see in "Journal Items" that two tax lines are created instead of one (one for each analytic distribution).

The "Group By" reports are generated by [this query](https://github.com/odoo/odoo/blob/51fcbd211d2b1abf4b93becedbcbb9e03002cdd6/addons/account/models/account_move_line_tax_details.py#L92).
At the [creation of the second subtable](https://github.com/odoo/odoo/blob/51fcbd211d2b1abf4b93becedbcbb9e03002cdd6/addons/account/models/account_move_line_tax_details.py#L164-L198) the move lines are linked together based among other things on the tax id. The [filter on analytic distribution](https://github.com/odoo/odoo/blob/51fcbd211d2b1abf4b93becedbcbb9e03002cdd6/addons/account/models/account_move_line_tax_details.py#L187-L191) does not apply here as `tax.analytic = False`.
The result is that each tax line is linked with both base lines. The second subtable have 4 lines in this case, with each base line doubled.

The result of the query have the base amount doubled.

Solution:
We cannot fix the query as there is no link to find the tax line origin amongst the base lines.

The method `_read_generic_tax_report_amounts` in `account_reports` is made to fix the base values in report in case of duplicate. Until now it did not include the duplication caused by analytic distribution but duplication because of repartition lines for example.

The fix is to use this method also for analytic distribution. So we add `tdr.analytic_distribution` in the `GROUP BY`. This value must be returned by the query in `account` so we add it.

opw-4753676

closes #217817

X-original-commit: 6cde92f
Related: odoo/enterprise#89697
Signed-off-by: Laurent Smet (las) <[email protected]>
Signed-off-by: Mathieu Coutant (mcou) <[email protected]>
**Problem:**
When refunding an order that has been paid using a reward system, the
points are deducted again as if the client made another purchase using
those points. This means that in the case of a refund, the client would
not only lose those points but have to spend them again.

**Steps to reproduce:**
- Make a purchase in POS using a reward such as $1 for every point
- Refund this purchase
- The points are deducted again

**Why the fix:**
The points do not need to be refunded after a refund, but they don't
have to be paid again. The total point for this refund order is now
set to zero in case of a refund. This means the transaction will not
be visible on the Coupon Card in the Loyalty Program.

opw-4771724

closes #217896

X-original-commit: 753ca8b
Signed-off-by: David Monnom (moda) <[email protected]>
Signed-off-by: Arthur Nanson (artn) <[email protected]>
The upgrade script from saas-18.3 to saas-18.4 converting
the default value of text filter is wrong.
It didn't account for the empty string which should be considered
as "no default value"

`defaultValue: "hello"` --> `defaultValue: ["hello"]` correct
`defaultValue: ""` --> `defaultValue: [""]` not correct

closes #217943

Task: 4926326
X-original-commit: 262e56e
Signed-off-by: Pierre Rousseau (pro) <[email protected]>
Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
Now that the frontend is showing the device connection type, we can
remove this prefix since it is showing duplicate information.

task-4922608

closes #217945

X-original-commit: f249f42
Related: odoo/enterprise#89757
Signed-off-by: Louis Travaux (lotr) <[email protected]>
Signed-off-by: Max Whale (mawh) <[email protected]>
Comments applied from the previous PR.

1. Reduce duplicate code in im_livechat;
2. Remove unused code in im_livechat;

follow up of #217584

closes #217858

X-original-commit: 932566d
Related: odoo/enterprise#89714
Signed-off-by: Alexandre Kühn (aku) <[email protected]>
Signed-off-by: Zelong Lin (zel) <[email protected]>
This commit includes several improvements and fixes to the Türkiye localization:

- Deprecated the 7/B type accounts from the chart of accounts.
- Set default accounts:
  - Deferred Expense Account → 180000 Prepaid Expenses For The Following Months
  - Deferred Revenue Account → 380000 Deferred Income For The Following Months
- Fixed chart of accounts that were assigned incorrect account types.

task-4890115

closes #216068

Signed-off-by: Wala Gauthier (gawa) <[email protected]>
Scenario:

- edit navigation bar to "Rounded box menu" (header_boxed_opt)
- select option "Sub Menus" to "On Hover"
- add a mega menu
- outside of editor, hover the mega menu item and move mouse over it

Result: the mega menu content closes before we get to it.

History:

In saas-18.1 and saas-18.2, these menus with the show on hover have been
broken and fixed through different changes:

(A) normal popup menu
(B) all mega menu
(C) mega menu with header_boxed_opt menu bar

Here is the list of commit and what was broken after them:

- 6715158 (nov 2024): C
- b9b3a60 (jan 2025): A+C
- ddf0712 (apr 2025): B+C
- e65d4cf (apr 2025): C

And hopefully this commit will fix C that happen since in
6715158 where we added a !important
margin-top to the mega menu in case of header_boxed_opt header that
is causing issue C.

We do not the the change for a menu inside .o_mega_menu_is_offcanvas
because in this case "header_sidebar_opt" doesn't need the fix and needs
to have a margin-top because:

- it is in the margin-top space that the go back button is
- the height is computed taking into account the margin-top, so if we
  removed it the height of the megamenu+margin-top would not be 100% and
  there would be a gap at the bottom

opw-4876149

closes #217907

X-original-commit: 44560db
Signed-off-by: Quentin Smetz (qsm) <[email protected]>
Signed-off-by: Nicolas Lempereur (nle) <[email protected]>
…ed from sale

In Hungary the rate of the currency of an invoice is based on the delivery date.
When creating an invoice from Sale, the `currency_rate` of the lines is the one of the invoice date not of the delivery.

Steps to reproduce:
- Install l10n_hu_edi and witch to Hungarian company
- Have two different rates for EUR<->HUF
- Create a pricelist in EUR
- Create a quotation with the pricelist and confirm
- Validate the delivery on another date (which has a different rate from today)
- In the sale order click "Create Invoice"
- The generated invoice has lines using the rate for today

Cause:
The field `delivery_date` is `precompute=True` but on creation of the invoice, at the time of the precompute, `line_ids` is still `False`.
So the invoice is first computed without the delivery date, the currency rate used is the one of the invoice date. When the delivery date is written on the invoice, the line balance is not recomputed as the field `balance` is marked as `protected`.

Solution:
As the field `delivery_date` was implemented in `account_move` for localizations including l10n_hu, there are no reason to contain the fix only to l10n_hu.
So we add the value of `delivery_date` in the dictionnary used to create a new invoice from sale with the method `_create_invoices`. This way the delivery date is there on creation of the invoice and is used for the currency rate.

opw-4756568

closes #217948

X-original-commit: 459803b
Signed-off-by: Ruben Gomes (rugo) <[email protected]>
Signed-off-by: Mathieu Coutant (mcou) <[email protected]>
Before this commit:
When calculating the `price_unit` for stock moves from purchase order lines,
the `remaining_qty` and `remaining_value` could be imprecise. Standard float
comparisons for these remaining amounts could lead to incorrect `price_unit`
calculations if, for example, `remaining_qty` was a very small float near zero.
This could result in inaccurate stock valuations, particularly when currency
conversions were involved or when landed costs were applied.

For example, 70.00000003 is rounded **up** to 70.00001 (with 5 digits),
resulting in a quantity difference of 0.00001, which incorrectly
inflates the unit cost.

After this commit:
Change the rounding method to 'HALF-UP' instead of the default 'UP' to improve
precise result for quantities.

Steps to reproduce:
1. Configure a product with AVCO real time. Set decimal precision for price
   and UoM to 5 digits.
2. Create a Purchase Order (e.g., 190 units @ $110/unit).
3. Receive 70 units and create a backorder
4. Create and post a bill for the initially received quantity.
5. Apply a landed cost to the picking of the first 70 units.
6. Create a draft bill for the remaining quantity on the PO.
7. Receive the remaining 120 units from the backorder.
8. The product's cost explodes

opw-4705224

closes #218024

X-original-commit: 60a5ba0
Signed-off-by: Tiffany Chang (tic) <[email protected]>
Signed-off-by: Walravens Mathieu (wama) <[email protected]>
Before, the previous document chaining was not sent in the
XML because with the t-if, if the variable name is unknown,
it will not complain and just see it as False. (like for the
first invoice that has no previous)

Now, passing the correct variable name, the previous document
will be included

opw-4814241

closes #217975

X-original-commit: 4aa87ad
Signed-off-by: Ruben Gomes (rugo) <[email protected]>
Signed-off-by: Josse Colpaert (jco) <[email protected]>
bug introduced in: ea48070

Steps to reproduce the bug:
- Go to "Inventory" → "Operations" menu → "Replenishment"
- Click "New" to create a new replenishment rule

Problem:
Traceback is triggered:
```
in _float_check_precision assert precision_rounding > 0,\
^^^^^^^^^^^^^^^^^^^^^^ AssertionError: precision_rounding must be
positive, got 0.0
```

As the product is not set, the `product_uom` is not set either,
which leads to a `product_uom.rounding` of 0.0.

Opw-4925719
Opw-4928957
Opw-4926504
Opw-4925919
Opw-4928684
Opw-4925080
Opw-4928788
Opw-4926719
Opw-4927440
opw-4928540

closes #217963

X-original-commit: 3d50d85
Signed-off-by: Quentin Wolfs (quwo) <[email protected]>
Signed-off-by: Djamel Touati (otd) <[email protected]>
marh-odoo and others added 28 commits July 9, 2025 15:30
…ncy on expense report

When generating an expense report for an expense recorded in a currency different from the company's, the totals were shown with the symbol of the expense's currency, even though the amounts were actually in the company's currency.

opw-4807756

closes #218126

X-original-commit: dc384e6
Signed-off-by: Olivier Colson (oco) <[email protected]>
…e-text link

reproduction:
18.0+18.1:
1. In Todo, insert an inline image, and create a link including the image and
some text
2. click on the text part, click edit button, modify the label area and click
apply
3. the image is removed

Test case 2:
1. go to Recruitment, and open an application and click "Send interview"
2. click on the link inside the template, change the url
3. apply, format of the button breaks

18.2:
same flow with test case 2, click apply causing a traceback

18.3:
same flow with test case 2, click on the link, do nothing and click away, the
popover not close

Fix: a partial back port of odoo-dev#4633 The idea
is that when the link doesn't only contain text, we don't show the label input
field nor apply the label to the link. Because the label field extracts/display
the text content of the link element, the field doesn't support html fragment,
applying the label on a link including another element inside will break it.

on 18.4+, we only rename the variable from isLabelHidden to showLabel

task-4881878

closes #217558

X-original-commit: 51895df
Signed-off-by: David Monjoie (dmo) <[email protected]>
Signed-off-by: Jinjiu Liu (jili) <[email protected]>
pos_epson_printer, pos_self_order, pos_restuarant

In this commit:

- Enhance error handling by sending more descriptive and user-friendly messages
  to the Point of Sale interface when Epson printer errors occur. This provides
  better insight into printing issues, helping users quickly identify and
  resolve problems.

task-4756143

closes #208958

Signed-off-by: Stéphane Vanmeerhaeghe (stva) <[email protected]>
The previous hashCode algorithm produced was distribution-dependent results,
causing errors in the Runbot's nightly tests for different distributions.

The new hashCode algorithm is the same as the one used in Hoot [1], and this
algorithm produces non-distribution-dependent results.

[1]: https://github.com/odoo/odoo/blob/4d7e941939b2d8b644cbf0d9a5a0aa2bb8d4c9e8/addons/web/static/lib/hoot/hoot_utils.js#L941

runbot-error : 227626

closes #218156

X-original-commit: 8982043
Signed-off-by: Lucas Perais (lpe) <[email protected]>
Signed-off-by: Jorge Pinna Puissant (jpp) <[email protected]>
In order to satisfy certification requirements from the LNE, we
implement the following:
- A product is weighed at e.g. 200g and added to the order
- Another product is weighed. The weight must change from 200g before
  the user is allowed to add the item.
- This should also happen even if another non-weighed product is added
  in-between.

task-4859589

closes #218155

X-original-commit: 29a2ab8
Related: odoo/enterprise#89861
Signed-off-by: Yaroslav Soroko (yaso) <[email protected]>
Signed-off-by: Max Whale (mawh) <[email protected]>
Versions
--------
- 17.0+

Steps
-----
1. Configure website to display prices tax-included;
2. disable selling out-of-stock products;
3. go to an out-of-stock product page;
4. request a reminder email;
5. replenish product stock;
6. run the `_send_availability_email` action;
7. check email that was sent.

Issue
-----
The price display in the email does not include taxes.

Cause
-----
The email only checks the `list_price` defined on the product.

Solution
--------
Don't include the price in the email:
  - On stable: hide the element to avoid breaking xpaths
  - On master: remove the element from the template

opw-4712613

closes #218146

X-original-commit: 22c333d
Signed-off-by: Levi Siuzdak <[email protected]>
Renamed `print_status` to `status` to conform to the status readable by
`iot_http` service.

We also removed the automatic event confirmation for actions on printers,
as we later send the actual status of the printer (low on paper, not ready, ...).

Enterprise PR: odoo/enterprise#89638

closes #218075

Task: 4922613
X-original-commit: de6b637
Related: odoo/enterprise#89826
Signed-off-by: Max Whale (mawh) <[email protected]>
Signed-off-by: Louis Travaux (lotr) <[email protected]>
- Make `invoice_currency_rate` editable.
- Add a date picker widget that let the user apply the rate of a
certain date.
- Add a refresh button when the rate is not the expected one.

To that end, the computed field `expected_currency_rate` is added.

task-4378994

closes #218056

X-original-commit: 2d486fb
Signed-off-by: William André (wan) <[email protected]>
Signed-off-by: Arnaud Sibille (arsi) <[email protected]>
Fixing wrong operator introduced in
c594781.

closes #217860

Signed-off-by: Chong Wang (cwg) <[email protected]>
* = im_livechat, website_livechat, test_discuss_full

This commit stores the `mute_until_dt` field on the channel member
record instead of the channel.

Task-4851890

closes #217331

Signed-off-by: Sébastien Theys (seb) <[email protected]>
When [1] introduced a cached version of the form data to compute
visibility, it did not take into account the values that are completed
through `prefillValues`. Because of this, input events are required for
those to be taken into account.

This commit fixes this by re-evaluating the form content after the
execution of `prefillValues`.

Steps to reproduce:
- Drop a "Form" snippet
- Make "Your Question" field visible only if "Your Email" is set.
- Save page.

=> Upon display, the email is populated with the user's email, but "Your
Question" did not become visible.

[1]: 027ce4e

task-jke

closes #218137

X-original-commit: 3682459
Signed-off-by: Francois Georis (fge) <[email protected]>
…rch panel

Before this commit:
- Long dashboard names were truncated in the search panel.
- There was no way for the user to see the full name.

After this commit:
- A tooltip has been added to display the full dashboard name on hover.

closes #218129

Task: 4903713
X-original-commit: b5c291a
Signed-off-by: Pierre Rousseau (pro) <[email protected]>
Signed-off-by: Ronakkumar Mukeshbhai Bharadiya (rmbh) <[email protected]>
This fixes some rendering issues with the payroll tab.

closes #218063

Task: 4885749
X-original-commit: 6efb968
Related: odoo/enterprise#89819
Signed-off-by: Yannick Tivisse (yti) <[email protected]>
Signed-off-by: Arthur Pierrot (arpi) <[email protected]>
When an image is added from a CORS URL, the image data cannot be
obtained from the web browser. Because of this, converting the image to
another format, adjusting its quality or other manipulations are not
possible.
Currently the "Quality" option appears for CORS image - but disappear
when trying to use it, which also corrupts the image.

This commit hides the "Quality" option when converting to another format
is anyway unavailable.

Steps to reproduce:
- drop an image block
- replace an image by using "Add URL" and specify a [non-CORS image]
- "Quality" option was available and could be used
- replace an image by using "Add URL" and specify a [CORS image]

=> "Quality" option was available, but should not have been.
Upon use, image was lost and "Quality" option disappeared.

[non-CORS image]: https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Thysanoptera.jpg/420px-Thysanoptera.jpg
[CORS image]: https://tinyjpg.com/images/social/website.jpg

task-4367641

closes #218060

X-original-commit: b0c513c
Signed-off-by: Francois Georis (fge) <[email protected]>
closes #217946

X-original-commit: 3b472f4
Signed-off-by: Francois Georis (fge) <[email protected]>
When both l10n_es_pos_tbai and l10n_pe_edi_pos are installed, the refund
reason popup was not showing up because we were not awaiting the super
method call in the l10n_pe_edi_pos override.

runbot-227630

closes #217931

X-original-commit: 63c7355
Related: odoo/enterprise#89748
Signed-off-by: Ruben Gomes (rugo) <[email protected]>
Signed-off-by: Robin Engels (roen) <[email protected]>
The purpose is to make field.condition_to_sql() independent from access
rights.  This is necessary in the case of related_sudo fields, where the
condition must be evaluated but without checking field access.

Part-of: #210601
Related: odoo/enterprise#85894
Signed-off-by: Raphael Collet <[email protected]>
The purpose is to factor out the code that introduces LEFT JOINs for
many2one relations.

Part-of: #210601
Related: odoo/enterprise#85894
Signed-off-by: Raphael Collet <[email protected]>
More tests is more good, especially to show where access rules are
introduced in subqueries.

Part-of: #210601
Related: odoo/enterprise#85894
Signed-off-by: Raphael Collet <[email protected]>
The new operators 'any!' and 'not any!' bypass access rights (including
record rules) on the comodel.  Otherwise, they behave just like the
operators 'any' and 'not any!', respectively.

This operator cannot be accepted through RPC, to avoid users bypassing
security checks.  The new operator is considered internal.  When
transforming a list into a Domain, we do not allow for internal
operators.  We still need to accept parsing a domain like this for
return values of `_search` methods, though.

Part-of: #210601
Related: odoo/enterprise#85894
Signed-off-by: Raphael Collet <[email protected]>
This provides a compatibility layer for field search methods that do not
implement operator 'any!'.

Part-of: #210601
Related: odoo/enterprise#85894
Signed-off-by: Raphael Collet <[email protected]>
The purpose is to cover all special cases like binary, one2many and
many2many fields, and the effect of related_sudo, that gives access to
the target field but does not sudo() searches on 'any' domains.

Part-of: #210601
Related: odoo/enterprise#85894
Signed-off-by: Raphael Collet <[email protected]>
This was already doable for grouping, aggregating and ordering on such
fields.  We now also use joins for searching.

For the implementation, we rely on the operator 'any!', which generates
SQL joins when used with many2one fields.  Conditions on a related field
like foo.bar.baz are basically rewritten like:

    (field, operator, value) =>
        (foo, 'any!', [(bar, 'any!', [(baz, operator, value)])])  if related_sudo
        (foo, 'any', [(bar, 'any', [(baz, operator, value)])])    otherwise

closes #210601

Related: odoo/enterprise#85894
Signed-off-by: Raphael Collet <[email protected]>
Before this commit an error can appear if there two delivery line.
Use method in delivery module to compute delivery amont.
This method can compute if there are two line with delivery
https://github.com/odoo/odoo/blob/18.0/addons/delivery/models/sale_order.py#L27

closes #218180

X-original-commit: 173de20
Signed-off-by: Antoine Vandevenne (anv) <[email protected]>
The Add Page Dialog was still using a helper that depends on jquery. But
this helpers has already been remade without using it, so we can just
use it directly without having to load a bundle with jquery.

Part-of: #218073
Signed-off-by: Francois Georis (fge) <[email protected]>
Signed-off-by: Géry Debongnie <[email protected]>
The previous code was using deferred for not a particularly good reason.
Also, the selectors were wrong, so we always fetched the website.

While we are at it, this commit adds a few other small improvements, to
avoid fetching multiple times the same data.

closes #218073

Signed-off-by: Francois Georis (fge) <[email protected]>
Signed-off-by: Géry Debongnie <[email protected]>
…repr

*: test_discuss_full

task-4676112

closes #212915

Signed-off-by: Sébastien Theys (seb) <[email protected]>
@bt-admin bt-admin merged commit 372c12e into brain-tec:tmp.master Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.