Skip to content

Syncing from upstream odoo/odoo (saas-18.4) #34223

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 31 commits into from
Jul 11, 2025
Merged

Conversation

bt-admin
Copy link
Collaborator

bt_gitbot

daiduongnguyen-odoo and others added 30 commits July 10, 2025 03:52
The current validation uses stdnum.vn.mst.validate(), which only accepts
10- or 13-digit MST with legacy checksum logic. It does not support the
12-digit CCCD format now required for individuals from 01/07/2025
(per Circular 86/2024/TT-BTC).

* This patch introduces a separate format-level validator for:
  • 10-digit enterprise VAT
  • 13-digit branch VAT (10-digit + suffix)
  • 12-digit CCCD (from 01/07/2025)

* References:
  • Circular 86/2024/TT-BTC (tax registration & CCCD admin):
https://thuvienphapluat.vn/van-ban/Thue-Phi-Le-Phi/Thong-tu-86-2024-TT-BTC-dang-ky-thue-565309.aspx
  • CCCD replacing tax ID from 01 Jul 2025:
https://thuvienphapluat.vn/ma-so-thue/bai-viet/cach-doi-ma-so-thue-sang-ma-so-dinh-danh-ca-nhan-tu-0172025-200926.html
  • VAT ID structure 10/13 digits (Law, TT 105/2020):
https://thuvienphapluat.vn/phap-luat/cau-truc-ma-so-thue-la-10-chu-so-hay-13-chu-so-phan-loai-cau-truc-ma-so-thue-nhu-the-nao-theo-quy-d-796465-178397.html

closes #218125

X-original-commit: 5e669f7
Signed-off-by: Nicolas Viseur (vin) <[email protected]>
This commit c5a98c7 removed custom `z-index` utilities. Replaces
`z-index-1` with Bootstrap's default `z-1` class.

Before this commit:

- The icon used `z-index-1`, which is not a valid Bootstrap class.

After this commit:

-  Replaced with `z-1`, the correct Bootstrap 5 utility class for `z-index: 1`.

task-4903381

closes #218239

X-original-commit: ca44ff7
Signed-off-by: David Monjoie (dmo) <[email protected]>
…move to sale_order

Step to reproduce:
- Enable Analytic accounting in Accounting settings
- Create a sale order
- Show Analytic Distribution
- Create an expense and put this sale order in the "Customer to Reinvoice" field.
- Add an Analytic Distribution
- Create Report
- Submit to Manager
- Approve
- Post Journal Entries

Curent behavior:
- No analytic_distribution on the sale_order

Expected behavior:
- analytic_distribution form the expense should be copied to the sale_order

Cause:
analytic_distribution wasn't set at the creation of the sale order from the account_move

closes #218267

X-original-commit: fbc4cd6
Signed-off-by: Xavier Bol (xbo) <[email protected]>
Signed-off-by: Corentin Lombard (clom) <[email protected]>
Before this commit, tour "test_mail_composer_autosave_tour" could
fail at end with the following error:

```
Tour finished with a dirty form view being open.

Dirty form views are automatically saved when the page is closed, which leads to stray network requests and inconsistencies.
```

This happens because test creates a new record and posts a message
in full composer. It checks that message is present in chatter and
then leave the form view. When posting the message, the form view
is saved, but this can happen with a small delay after message is
visible on chatter like after tour has ended.

This commit fixes the issue by awaiting form view is saved, so that
tour doesn't panic at end there's a form view with unsaved changes,
as the form view is properly saved with sending a message.

Fixes runbot error 198583
Fixes runbot error 222676

closes #218251

X-original-commit: 75ef862
Signed-off-by: Sébastien Theys (seb) <[email protected]>
We renamed the "Disconnect from current" button to "Disconnect", and removed the
possibility to configure a new database if one is already configured.
This eases user experience, by reducing the amount of information on the screen.

closes #218286

Task: 4922634
X-original-commit: e27dc36
Signed-off-by: Yaroslav Soroko (yaso) <[email protected]>
Signed-off-by: Louis Travaux (lotr) <[email protected]>
- Create an invoice with price 1000 in a non-company currency (e.g., CHF).
- Modify the currency rate after the invoice date, then generate the payment for this invoice.
- This will generate three journal entries (invoice, payment, and currency exchange difference).
- Export those journal entries and include in the export the `matching_number`, `currency`, and `amount_currency` fields.
- Import those three entries with the matching number and post them.
- In the Journal Items, the line corresponding to the currency exchange difference is not matched with the lines from the invoice and the payment, leading to an unbalanced credit and debit.

In `_prepare_reconciliation_single_partial` within `account_move_line`, the reconciliation is stopped by checking whether the debit/credit is fully matched.
However, this check only considers `amount_residual_currency` and not `amount_residual`, which, in the case of an exchange difference, are different.

opw-4776188

closes #218135

X-original-commit: acc602f
Signed-off-by: Thomas Becquevort (thbe) <[email protected]>
Signed-off-by: Guillaume Teboul-Tornezy (gute) <[email protected]>
This commit reverts b44a1bc
which is a part of /#203918
Issues have been found on the synchronization with Google related
to the duplication of events for synchronized users. As it is an
urgent matter and seems like this commit is most likely causing an infinite
loop for te synced events, we are dropping it.
task-4873605

closes #218262

X-original-commit: d27a9be
Signed-off-by: Gabriel de Paula Felix (gdpf) <[email protected]>
Move the test file to html_builder as part of builder refactoring.
This helps separate website from builder tests and prepares for the
new plugin structure.

Part-of: #217513
Signed-off-by: Francois Georis (fge) <[email protected]>
Refactor the test to use builder tools instead of website helpers.
This reduces coupling and keeps the test focused on html_builder.
shadowOptionPlugin is added manually to the builder plugins because
the new builder setup does not load it by default.

closes #217513

Signed-off-by: Francois Georis (fge) <[email protected]>
The html_builder's snippet service was still relying on website. This is
removed, and the snippet viewer website dependencies are instead patched
in website.

task-4367641

closes #217994

Signed-off-by: Géry Debongnie <[email protected]>
Before this commit, the Point of Sale system failed to load archived
products when retrieving missing products for loaded records. This
caused various issues, for instance, when loading paid orders, any
archived products included in those orders would not be loaded, leading
to data inconsistencies and operational problems.

opw-4904124

closes #218275

X-original-commit: 4455e2e
Signed-off-by: Adrien Guilliams (adgu) <[email protected]>
Signed-off-by: Pedram Bi Ria (pebr) <[email protected]>
In this commit, we change the login page step by a step with isActive
property. So this step is only active when the input#login is not on
the page and then expectUnloadPage will be only listen when this step
is active.

closes #218290

X-original-commit: 028832f
Signed-off-by: Mathieu Duckerts-Antoine (dam) <[email protected]>
Signed-off-by: Aaron Bohy (aab) <[email protected]>
This commit fixes the `im_livechat_chatbot_steps_sequence_tour`. When
creating the chat bot steps, we wait for the textarea to be cleared
between each step. However, the selector is wrong: `value()` matches
everything, regardless of the content. This commit fixes the issue by
using `:empty` instead.

follow-up of #217760.
fixes runbot-229755.

closes #218329

Signed-off-by: Sébastien Theys (seb) <[email protected]>
In 0f3a9de we added helpers to create test taxes in
`AccountTestInvoicingCommon`, not realizing that they were already in
`TestTaxCommon`.

This commit removes them from `TestTaxCommon` to avoid the duplication.

task-none

closes #217958

X-original-commit: a7badc6
Signed-off-by: Laurent Smet (las) <[email protected]>
Signed-off-by: Antoine Dupuis (andu) <[email protected]>
…rated

Currently, an error occurs when users print the E-Waybill without generating it.

Steps to replicate:
- Install `l10n_in_ewaybill` and switch to IN company.
- Change the `Zipcode` on IN company to `aa`.
- Go to `Invoicing > Customer > Invoices`.
- Create an invoice, confirm and click Send E-WayBill.
- Click on the Gear icon and Click on the report `Ewaybill`.

Error:
`ValueError: invalid literal for int() with base 10: ''
QWebException: Error while render the template
ValueError: invalid literal for int() with base 10: ''
Template: ir.ui.view(2614,)
Path: /t/t/t/t/div/t[3]
Node: <t t-if='doc.state in ewaybill_states'/>`

The error occurs because the report printing is available even when the
`E-Waybill` is not yet generated. This causes the execution flow to skip
all the necessary validations, leading to a `ValueError` at line [1].

[1] - https://github.com/odoo/odoo/blob/aa7dac87a3eebce1b300e1e3d04398d680325b5d/addons/l10n_in_ewaybill/models/l10n_in_ewaybill.py#L640

This commit solves this issue by adding a domain to the report, so that it
appears only after the EwayBill is generated.

sentry-6695761066

closes #218223

X-original-commit: 69b2d6c
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <[email protected]>
Signed-off-by: Bhavya Ashesh Nanavati (bhna) <[email protected]>
Before this commit: header color of `Dialog` on mobile was "community
color" or white, depending on the version of Odoo the database is
running. This was creating issues in in the front-end, where the user of
the website would see back-end specific colors in different `Dialog`s.

This commit removes the color customization of `Dialog`'header as it
was fitting a design line we had before we introduced MILK.

task-4001365

closes #218261

X-original-commit: ffd9c0f
Signed-off-by: Pierre Paridans (app) <[email protected]>
Signed-off-by: Antoine Sougné (anso) <[email protected]>
Before this commit, when user presence changes, it was updating the
write_date of user.

This happens because any change of presence what doing a
`Command.create()` on the presence_id field of user model. The
presence object is automatically unlinked after 12 hours of
inactivity, thus most users had their write_date every day because of
the presence_ids being updated when logging in at least once a day.

This commit fixes the issue by creating the presence rather than
write on the user field, so that this is not considered a write on
user object and thus it doesn't change the write_date of user.
Other than not updating the write_date, the code behavior is
functionally unchanged.

closes #218295

X-original-commit: 47c468d
Signed-off-by: Sébastien Theys (seb) <[email protected]>
__Current behavior before commit:__
[`1b86bd7`][1] removed `params` from `context`. Due to a little
oversight `params.step` is still retrieved from `context` in the website
configurator. We therefore land on the first step of the configurator
even if a specific step is set in the URL.

__Description of the fix:__
Accessing `step` using the `router` service as it will always be set in
the URL by the backend.

__Example of steps to reproduce:__
1. Go to `/website/configurator/3`
2. You land on the first page of the website configurator instead of the
third.

[1]: 1b86bd7ecf4d
[2]: https://github.com/odoo/odoo/blob/9a2c54b7043/addons/website/controllers/main.py#L361

Part-of: #217735
Signed-off-by: Francois Georis (fge) <[email protected]>
__Current behavior before commit:__
[`1b86bd7`][1] removed `params` from `context`. Due to a little
oversight `params.with_loader` is still retrieved from `context` causing
a traceback after switching theme.

__Description of the fix:__
`with_loader` was introduced by [`ccfca27`][2] to make sure the loader
was still visible until the editor is open. Now it's only set by
`button_choose_theme` and always to `True`. We can therefore remove it.
Like before, `keepLoader` will still be set to `true` after we call
`button_choose_theme`.

Now when the iframe is loaded, it will always call `hideLoader` but a
guard as been added to only execute it if the loader is visible.

Note: since this fix involves an `ir.module.module` method, it cannot
be tested inside a tour as explained [here][3].

__Examples of steps to reproduce:__
1. Go to Settings > Website
2. Click on "New Website"
3. Set a name and click on "Create"
4. Click on "Skip and start from scratch"
5. Wait for the loader to finish

or

1. Open the Website builder
2. Click on the "Theme" tab
3. Click on "Switch Theme"
4. Choose a Theme
5. Wait for the loader to finish

When the page goes back to the website preview a traceback appears.

[1]: 1b86bd7ecf4d
[2]: https://github.com/odoo/odoo/blob/9a2c54b7043/addons/website/controllers/main.py#L361
[3]: https://github.com/odoo/odoo/blob/9df6fd9b494/odoo/addons/base/models/ir_module.py#L566

opw-4925904

closes #217735

Signed-off-by: Francois Georis (fge) <[email protected]>
Issue -->

The final step of the `_action_merge` method updates the `code` field of the
account onto which the other accounts are merged. During the write call on
`code`, a dependent field `always_tax_exigible` on `account.move` gets added
to the compute chain. This causes a fetch of all `account.move` records related
to journal items related to the account that is getting updated. This can lead
to a MemoryError on databases with large `account.move` tables.

Solution -->

We delegate the write of the `code` field to SQL.

In the account merge wizard, accounts that can be grouped are grouped by the
keys --> `'account_type', 'non_trade', 'currency_id', 'reconcile', 'deprecated','name'`.
Therefore, the `account_type` does not change after the merge. We can safely
assume that any fields dependent on `account_type` do not need recomputation and
hence, bypass the ORM for this update.

Additional change -->

Disable the prefetcher in the write call in `account.account` to optimize
memory usage on databases with a large number of journal items/journal entries
when writing on `code` or `account_type` in general.

opw-4839985

closes #218333

X-original-commit: 8c5bfff
Signed-off-by: Thomas Becquevort (thbe) <[email protected]>
Steps to reproduce:
- Open website builder
- Click on "Contact Us" button in the header
- Click on "Remove Link"
- Save
- Bug: Website is dead

Website relies on some elements to not be removed from the view in
order to function correctly. These elements are marked with the class
`oe_unremovable`. And the editor/builder is supposed to not remove them.

With the website builder refactor, the link tools from html_editor is
now used. But it lacked proper handling of `oe_unremovable`, which could
lead to removing a critical element of a website view

Website refactor: 9fe45e2
task-4367641

closes #218190

Signed-off-by: Géry Debongnie <[email protected]>
This commit fixes the im_status test suite which fails in a
non-deterministic fashion. Initially, those tests wait for the
first update of the presence (the one sent when the first connection
to the websocket is established).

Presence is updated when:
- Self persona status is offline.
- Bus notification is received for self with different value than the
one of this device (e.g. offline while away/online, away while online).
- The websocket connection is first established.

In those test, another subscription could happen according to the timing
of the `/mail/data` RPC which returns the initial status of the user as
offline.

This commit fixes this issue by setting an initial status on the current
user.

fixes runbot-229757

closes #218374

Signed-off-by: Matthieu Stockbauer (tsm) <[email protected]>
Before this commit, test "Add the same reaction twice from the emoji
picker" may fail non-deterministically in 18.1 on last step: the
message reaction is sometimes kept, sometimes removed.

The feature in 18.0 was keeping the emoji, whereas in 18.1 it now
toggles the add / remove of reaction. This change of behaviour felt
best with the addition of QuickReactionMenu, and for consistency this
also works that way in emoji picker of message reaction.

The test was not adapted but passed because the bus notifications
were coming later than the burst of user actions to add emoji, thus
there's flicker of showing message reaction at end when it's only
temporarily and would be removed a fraction of seconds later.

This commit fixes the test with the newer behaviour that it should
toggle the reaction.

Fixes runbot error 229340

closes #218344

X-original-commit: be3c561
Signed-off-by: Matthieu Stockbauer (tsm) <[email protected]>
Signed-off-by: Alexandre Kühn (aku) <[email protected]>
…s attachments

Before this commit copying an image from the web and pasting it into a
text snippet in the website editor would cause the image to be saved
as base64 instead of beign properly converted into an attachment.

Steps to reproduce
- open editor
- add a text snippet
- go to Google images, find an image and copy it (copy the image
itself, not the link)
- paste the image in the text snippet
- save and quit the editor
=> the image is saved as a base64 img

After the change images get properly saved as attachments.

closes #218350

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

Introduced by 73a43eb

Runbot build error 227640

closes #218386

Signed-off-by: Victor Feyens (vfe) <[email protected]>
This commit adjusts setting `product_uom_id` field on the generated
purchase order line in the 3 main scenarios: manual purchase order,
procurement from MTO, and procurement from replenishment wizard. The
intended behavior is as follows:

* Manual PO:
The selected pricelist must respect the uom of the PO line. Even if the
quantity of the line matches a pricelist with a cheaper price (but
different uom), it should not be selected. If there is no pricelist with
the unit of the line, the pricelist with the product base unit is
chosen. If it doesn't exist too, no pricelist is chosen, and the price
is left to the user (default value of 0).

* Procurement from MTO:
The selected pricelist must be the cheapest pricelist that respects the
requested quantity, even if that cheaper pricelist has a different uom
than the source of procurement (SO, MO, etc.). However, the generated PO
line uses the uom of the pricelist not the source.

* Replenishment Wizard:
The behavior is similar to manual PO. The selected unit in the wizard
must be respected, even if there is a cheaper pricelist that matches the
requested quantity (with different uom). Also now, the selected vendor
in the wizard doesn't affect the chosen priclist. It's only used to look
for pricelists with the same partner.

Task-4471379

closes #218235

Signed-off-by: Arnold Moyaux (arm) <[email protected]>
Signed-off-by: Mohammad Abdulmoneim (abdu) <[email protected]>
Problem:
When MTO route is deleted from route, an error will be
raised in the settings and it will be unaccessible.

Solution:
Set `raise_if_not_found` to false when accessing the MTO route in the
compute/inverse.

Steps to reproduce:
1. Enable Multi-Step Routes and Replenish on Order (MTO) from settings
2. Go to Inventory > Configuration > Routes
3. Delete Replenish on Order (MTO) route
4. Go back to settings
--> Settings will raise an error.

closes #218369

Signed-off-by: Tiffany Chang (tic) <[email protected]>
Scenario:
- go to the /contactus page
- edit the subject field and set a default value then save

Result: the default value is not saved.

Reason: in 13.0, field default value had priority over data-for so an
issue was solved by b637a5e that if you
saved a form, the data-for would become the default for all the uses of
that form (so eg. a job position would be set for all job positions).

In 8d0a63f the priority was changed so
data-for has higher priority than the default value, that made the
prior fix unnecessary (just a nice to have, to not save the data-for as
default that would be overridden by another data-for).

The fix was reintroduced by ca433f3 but
it removes default value if there is a data-for.

Fix: remove the filling and removing of data-for value in edition: the
data-for is not shown in the editor (allowing us to set default) but has
the priority when rendering the field in non-editable mode. This is
mirroring what is already done for data-fill-with.

The added test steps, verify that the default value that is overridden
by a data-for is kept for type/email/text shown inputs.

Side note: this commit also remove useless data-fill-with="undefined"
attributes that are added when editing field. They shouldn't cause any
issue unless someone add a "undefined" field in the prefilled fields.

opw-4794903

closes #217445

X-original-commit: 9ad836b
Signed-off-by: Outagant Mehdi (mou) <[email protected]>
Signed-off-by: Nicolas Lempereur (nle) <[email protected]>
Fix issue where minimum rights employee were able to put negative orderline qty in the cart with the `+/-` button

closes #218236

Task-id: 4922318
X-original-commit: 037d103
Related: odoo/enterprise#89916
Signed-off-by: Stéphane Vanmeerhaeghe (stva) <[email protected]>
Signed-off-by: Manu Vaillant (manv) <[email protected]>
This commit fixes the runbot error 75847 which is triggered by a toolbar method
called at an incorrect time in some instances.
Sometimes the method could be called after the form view was exited. Which means
that the iframe used by the mailing editor could trigger the method even though
it is no longer in the DOM.
This leads to a call to getSelection on a document that could no longer be
displayed/present in the DOM.

To fix this issue, when the selection returned by the document is null
(this.document no longer on the DOM), the method returns directly.

task-4829204

closes #216492

X-original-commit: ec1b259
Signed-off-by: Damien Abeloos (abd) <[email protected]>
@bt-admin bt-admin merged commit bcffb97 into brain-tec:saas-18.4 Jul 11, 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.