Skip to content

Syncing from upstream odoo/odoo (staging.17.0) #34247

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 16 commits into from
Jul 12, 2025

Conversation

bt-admin
Copy link
Collaborator

bt_gitbot

d-fence and others added 15 commits July 11, 2025 05:44
This commit add the possibility to automatically add test-tag on a test
method at runtime. A generic method `get_method_additional_tags` is
added on `BaseCase` test class. That method can be overridden to return
a list of test-tags that will be added on the test methods.

With this mechanism, the `HttpCase` class override this method to
add a `is_tour` test-tag when the `start_tour` method is used in the
test method. Also, the `start_tour` method will now emit a warning when
the method is called without being tagged `is_tour`. That way, all the
tours can now be started with the `is_tour` test-tag.

Part-of: #217102
Related: odoo/enterprise#89934
Signed-off-by: Xavier Dollé (xdo) <[email protected]>
Signed-off-by: Xavier Morel (xmo) <[email protected]>
Following the new test-tags feature that allows to add additional
test-tags at runtime, the test methods that are calling `start_tour` are
tagged `is_tour`. On the other hand, when the `start_tour` method is
called outside of a test method, a warning is emitted.

This commit fixes some tests that are using such an intermediate method
to start a tour by manually adding the `is_tour` test-tag.

Part-of: #217102
Related: odoo/enterprise#89934
Signed-off-by: Xavier Dollé (xdo) <[email protected]>
Signed-off-by: Xavier Morel (xmo) <[email protected]>
With this commit, a `is_query_count` test-tag is automatically added on
tests methods that use an assertQueryCount by overriding the
`get_method_additional_tags`.

Part-of: #217102
Related: odoo/enterprise#89934
Signed-off-by: Xavier Dollé (xdo) <[email protected]>
Signed-off-by: Xavier Morel (xmo) <[email protected]>
Following the new test-tags feature that allows to add additional
test-tags at runtime, the test methods that are using `assertQueryCount`
are tagged `is_query_count`. On the other hand, when the `assertion`
method is called outside of a test method, a warning is emitted.

This commit fixes tests which hide the assertion by manually adding
the `is_query_count` test-tag.

Part-of: #217102
Related: odoo/enterprise#89934
Signed-off-by: Xavier Dollé (xdo) <[email protected]>
Signed-off-by: Xavier Morel (xmo) <[email protected]>
…t tags

With the new test-tags features that allows to add additional test tags
at runtime, the tests that starts a tour or that are using a query_count
and that are not detected as such must be tagged respectively `is_tour`
or `is_query_count`.

closes #217102

Related: odoo/enterprise#89934
Signed-off-by: Xavier Dollé (xdo) <[email protected]>
Signed-off-by: Xavier Morel (xmo) <[email protected]>
The computation of `l10n_it_document_type` fails when multiple
`l10n_it.document.type` records share the same code.
This can happen if a user duplicates an existing Document Type or creates a new
one with the same code, causing `get()` on the grouped recordset to return
multiple results.
This fix adds a check to ensure that the `code` field remains
unique across all `l10n_it.document.type` records.

Steps to Reproduce:

- Install the `l10n_it_edi_ndd` module.
- create a new invoice and confirm it.
- from `Electronic Invoicing` page, Open Document Type and duplicate it.
- Create another invoice and confirm it.

observation: you will receive a traceback for wrong value error

opw - 4902513

closes #217155

Signed-off-by: Wala Gauthier (gawa) <[email protected]>
Just warn models are invalid, but do not reset for stable. Data is not enforced
hence no real issue with wrong models.

Followup of #156731

closes #218549

Signed-off-by: Thibault Delavallee (tde) <[email protected]>
…uidelines

Steps to reproduce:
1. Install the `Contacts` module.
2. Go to Contacts > Create a new contact.
3. Select country "India", then open the State dropdown.
4. Observe that "Orissa" appears instead of the updated name "Odisha".

Issue:
As per Government of India guidelines, the state name was officially changed
from "Orissa" to "Odisha" in 2011.
However, Odoo still uses the outdated name in the state selection.

Solution:
Update the name of the state from "Orissa" to "Odisha" in state records.

opw-4935633

closes #218448

X-original-commit: 4767737
Related: odoo/enterprise#89998
Signed-off-by: Nicolas Lempereur (nle) <[email protected]>
Signed-off-by: Khushi Srivastava (khsr) <[email protected]>
Versions
--------
- 17.0+

Steps
-----
1. Change website language to Spanish
2. add a deliverable order to cart;
3. go via express checkout.

Issue
-----
The express checkout partner doesn't get updated as expected.

Cause
-----
Before this commit, it checks whether the express checkout partner's
name ends with the order reference, as is the case in English. In
Spanish however, the order reference gets used in the middle of the
name.
As a consequence, the `_create_or_edit_partner` method does not get
called.

Solution
--------
Check whether the order reference is part of the partner name.

opw-4894059

closes #217528

Signed-off-by: Valentin Chevalier <[email protected]>
Before this commit, if the IoT box was connected a DB which then went
offline (e.g. expired runbot), and it tried to download drivers, the
request would fail but it would still delete the old handlers.

After this commit, we avoid this problem in two ways. Firstly, we check
that we received an OK HTTP status before trying to process the response
body. Secondly, we check that the reponse we have received is a valid
zip file BEFORE deleting the old handlers. This way we only delete them
if we are sure we have something to replace them with.

task-4933638

closes #218163

Signed-off-by: Max Whale (mawh) <[email protected]>
### Contains the following commits:

odoo/o-spreadsheet@8c0d3dae7 [REL] 17.0.69 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)
odoo/o-spreadsheet@89b7d29f7 [FIX] Composer: Remove formatting when pasting external content [Task: 4910559](https://www.odoo.com/odoo/2328/tasks/4910559)
odoo/o-spreadsheet@8fa50e3b6 [PERF] import xlsx: avoid reading all cells multiple times during table_conversion [Task: 4699860](https://www.odoo.com/odoo/2328/tasks/4699860)
odoo/o-spreadsheet@36c8f2ba9 [FIX] Config: remove eslint [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)
odoo/o-spreadsheet@73a832b86 [IMP] config: ignore .DS_Store file from mac os [](https://www.odoo.com/odoo/2328/tasks/)
odoo/o-spreadsheet@d1f3c7733 [FIX] header_size: resize row based on link label instead of full link [Task: 4886598](https://www.odoo.com/odoo/2328/tasks/4886598)
odoo/o-spreadsheet@c2cf091c8 [FIX] demo: Fix new `clear` action [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)

closes #218591

Signed-off-by: Vincent Schippefilt (vsc) <[email protected]>
Co-authored-by: Anthony Hendrickx (anhe) <[email protected]>
Co-authored-by: Alexis Lacroix (laa) <[email protected]>
Co-authored-by: Lucas Lefèvre (lul) <[email protected]>
Co-authored-by: Dhrutik Patel (dhrp) <[email protected]>
Co-authored-by: Adrien Minne (adrm) <[email protected]>
Co-authored-by: Mehdi Rachico (mera) <[email protected]>
Co-authored-by: Florian Damhaut (flda) <[email protected]>
Co-authored-by: Rémi Rahir (rar) <[email protected]>
Co-authored-by: Pierre Rousseau (pro) <[email protected]>
Co-authored-by: Vincent Schippefilt (vsc) <[email protected]>
Steps to reproduce:
1. Go to the shop page.
2. Open the editor and configure Categories to display on the left, and
   Attributes at the top.
3. Save the changes and click the offcanvas toggle button next to the layout
   buttons.

Issue:
- The category list appears twice: once on the left side and again in the
  offcanvas dropdown. This is redundant and affects the user experience.

Cause:
- The category list in the offcanvas menu isn’t restricted to mobile view, so it
  also displays on larger screens where it’s already visible in the sidebar.

Fix:
- Add the 'd-lg-none' class to hide the category list in the offcanvas menu on
  large devices.

opw-4830180

closes #218330

Signed-off-by: Valentin Chevalier <[email protected]>
Issue:
There are several issues with the XML of FacturX.

Steps to reproduce:
- Create a partner with a direct debit mandate
- In the Accounting tab of the partner select "FacturX" as eInvoice format
- Create an invoice with this partner, pay with SDD, confirm
- Send to FacturX
- Verify the PDF with https://www.portinvoice.com/
	- Missing namespace
- In the XML the code for the payment means does not adapt to the payment method: 42 (Payment to bank account) and not 59 (SDD)

Cause:
- The namespaces are not there (It's not mandatory).
- We always input "42" as payment mean

Solution:
- Added namespace `xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"` and `xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"`
- Added the code "59" for SDD, as a lot of codes could be added we add a dictionnary that could be used to add codes. This commit only handles the SDD code

opw-4907827

closes #217763

Signed-off-by: Paolo Gatti (pgi) <[email protected]>
Steps to reproduce the bug:
Steps to reproduce the bug:
- Unarchive the MTO route
- Create a product P1:
    - Type: Storable
    - Route: MTO + Buy
    - Supplier: Vendor A
- Create a quality point:
    - Product: P1
    - Control per: Quantity
    - Failure location: WH/input/order Processing

- Create a sales order for 1 unit of P1
- Confirm the SO
    → A purchase order is created for Vendor A with 1 unit of P1
- Confirm the PO
- Go to the related PO picking
- Fail the quality check

Problem:
picking related to the SO remains in the "Waiting Availability" state
and the stock move is not switched to the Make to stock procure method

opw-4874199

closes #216337

Related: odoo/enterprise#88791
Signed-off-by: William Henrotin (whe) <[email protected]>
This fix aims to avoid a subquery in the main query and instead use a
IN clause to improve search performance.

On a database with over 37 million journal items, before the fix, the
query to load the 40 potentials journal items to reconcile in the bank
reconciliation widget took around 50 seconds; after the fix, it take
only 3 seconds (with only 1 company to filter).

Subquery when 'child_of' is used:
```
...
AND (
    "account_move_line"."company_id" IN (
        SELECT
            "res_company"."id"
        FROM
            "res_company"
        WHERE
            ("res_company"."parent_path" LIKE '1/%')
    )
)
```

Query after the fix:
```
...
AND ("account_move_line"."company_id" IN (1))
```

opw-4896863

closes #218034

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

Step to Reproduce:
1. Install `sale_loyalty` and `sale`
2. Enable the `Pricelists` option in the settings.
3. Create a pricelist named demo.
4. Create a Discount & Loyalty named `test program` with type `Discount Code`,
5. Assign the demo pricelist to the loyalty program.
6. Copy the discount code from the program’s conditional rules.
7. Archive the demo pricelist.
8. create sale order for any product.
9. Try to apply the copied coupon code.

Observation:
- An error is shown: "This code is invalid".
- check loyalty program `test program` pricelist field is empty, that suggesting
  it's valid for all pricelists, but the coupon still fails.

Issue:
- When a linked pricelist is archived, it's hidden in the UI,
  but the relation still exists in the relational table.
- While filtering the domain for coupon, the condition is not satisfied due to
  the program's pricelist.

solution:
- Display a validation error to the user when trying to archive a pricelist
  that is linked to any active promotional programs.

opw-4841678

closes #214968

Signed-off-by: Dhwani Patel (dwa) <[email protected]>
@bt-admin bt-admin merged commit 665bc24 into brain-tec:staging.17.0 Jul 12, 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.