Skip to content

Merged from upstream 17 260211 01#1189

Merged
davidtranhp merged 167 commits intoViindoo:17.0from
davidtranhp:merged_from_upstream_260211_01
Feb 11, 2026
Merged

Merged from upstream 17 260211 01#1189
davidtranhp merged 167 commits intoViindoo:17.0from
davidtranhp:merged_from_upstream_260211_01

Conversation

@davidtranhp
Copy link

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


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

C3POdoo and others added 30 commits January 10, 2026 08:02
Steps to reproduce
==================

- Install web_studio,contacts
- Go to Contacts
- Open the list view
- Click on a field
- Set a "Help tooltip"

=> Validation Error
Invalid view Odoo Studio: res.partner.tree customization

Cause of the issue
==================

The help attribute is missing from the field definition

opw-5379357

closes odoo#240261

Signed-off-by: Raphael Collet <rco@odoo.com>
**Steps to reproduce:**
- enable automatic accounting
- set dollars as the main currency
- activate euro and set a rate of 10 euro -> 1$
- create a storable product with category fifo/automated
- create and confirm a PO for 1 unit for 10 euros (no tax)
- validate the receipt
- return the product and validate return
- return the return and validate
- open journal items and search your product

**Current behavior:**
- there is 6 correct lines (those with credit or debit of
1$)
- there is two incorrect extra lines one with credit 9$ and
one with debit 9$

**Expected behavior:**
those two extra lines should not be there

**Cause of the issue:**
those lines are compensation account move lines
for the case where the price of the product returned
is different than the price of the product initially received,
in the cases of:
- a return: compensate the difference
- the return of a return (our case): de-compensate the difference
(see PR odoo#162697 and more specifically
test test_fifo_return_twice_and_bill).
But in this case, the compensation is wrongly triggered because
the difference comes from the fact that the currency is not
taken into account.
https://github.com/odoo/odoo/blob/c89d109c460d51fc90b6b13d5f6bc114c7316e42/addons/purchase_stock/models/stock_move.py#L208

**Fix:**
we use the original svl instead of the PO
because it avoids currency problem.
If we wanted to convert the currency of the PO,
we would need to find the date that was used to convert
the value at the creation of the first svl.
And that date came from _get_currency_convert-date()
https://github.com/odoo/odoo/blob/d3599e70973e27ed17e403cf498f76bd31e9c236/addons/purchase_stock/models/stock_move.py#L97
which can take the date of the last invoice
(if product was invoiced before the move was validated).
https://github.com/odoo/odoo/blob/57c1c510425dcd491c794a0262063db398348640/addons/purchase_stock/models/stock_move.py#L123-L125
We can not use this method because we're doing the
return of a return and if the first return
also has an invoice, the return value
of the method could be the date of this invoice
(which is not the date we're looking for).
Furthermore there is no way to know if the date returned
by _get_currency_convert_date() at the time of the creation
of the first svl is the date of the time of the creation of
the svl or the date of an invoice previously confirmed.

opw-5179239

closes odoo#238904

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
… is set

Steps to produce:
- Install the `Sales` module.
- Enable `Pricelists` in settings and set the `default quotation template`.
- Create a new Sales Order.

Issue:
- The `Update Prices` button is visible even when no pricelist is set on the
  sales order.

Root cause:
- In the onchange logic (see [1]), show_update_pricelist is set to True based
  solely on the presence of order lines, without checking whether
  a pricelist is defined.

Solution:
- Update the condition so that button is shown  only
  when sale order line is present and the current pricelist value is not
  the previous one.

[1]: https://github.com/odoo/odoo/blob/849ec71acbaea0061fd4b13888a486e4aebb6463/addons/sale/models/sale_order.py#L801-L803

opw-5414897

closes odoo#241812

Signed-off-by: Krishna Arvindkumar Patel (krip) <krip@odoo.com>
During this commit: 869f80b we made a mistake in the box 15_2.

no task id

closes odoo#243228

Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
…n No.20

Issue:
2 UoM that is in the UNECE Recommendation No.20 for Peppol don't
exist in Odoo:
- MIN: Minute
- KWH: Kilowatt hour

Even if they are created manually, they are not used in the UBL/CII
electronic invoices.
Instead, the default code (i.e. "C62" for "Units" is used).

Some localization modules create the "Kilowatt hour" UoM as they need it.
(l10n_cl and l10n_tr_nilvera)
So it's better to have a "generic" one available for every module.

opw-5269119

closes odoo#238342

Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Reliably mocking Clipboard API calls in tours should be done in two
steps:
- the step that will actually do the call should do the patching,
  followed by the actual action.
- the cleanup should only be done in the following step to ensure the
  action's listener has actually finished.

This commit applies this principle to avoid the "cleanup" to be executed
before the action's listener has actually reached the call to the
Clipboard API (because of slower processing, slower network...), which
would defeat the mocking purpose (and either get the browser to
indefinitely wait for the user's clipboard usage approval or a
permission error depending on the browser's default behavior).

Note: this was mainly brought to light by the new Chrome 143+ default
policy which revoke all permissions in headless mode.

closes odoo#243280

Related: odoo/enterprise#103971
Signed-off-by: Pierre Pulinckx (pipu) <pipu@odoo.com>
Steps to produce:
- Install the `Accounting` module.
- Enable analytic accounting in settings.
- Create an analytic account (e.g., "test").
- Create a journal entry and assign the analytic account in the analytic
  distribution.
- Post the entry and export it(Make sure journal items/account and
  journal items/analytic distribution are also included).
- Archive the analytic account.
- Import the exported entry OR Duplicate the previous created entry.
- Try to post the imported entry.

Issue:
- The entry is posted even if the analytic account used in the analytic
  distribution is inactive.

Root cause:
- The `analytic_distribution` field is stored as JSON.
- At [1], the `_str_to_json` method only attempts `json.loads(value)`, and
  if parsing fails, it raises an error.

Solution:
- Add a validation when posting journal entries to ensure that all analytic
  accounts referenced in the analytic distribution are active.

[1]: https://github.com/odoo/odoo/blob/13e8b462e74f144e085492857bfaa7b0d1f88f93/odoo/addons/base/models/ir_fields.py#L196-L202

opw-5350980

closes odoo#239988

Signed-off-by: William André (wan) <wan@odoo.com>
…records

RATIONALE

When a cascade delete occurs in DB, ORM methods are not called. More
specifically loosely connected records using res_model / res_id pair
are not removed when unlink override exists.

SPECIFICATIONS

If you post a scheduled message on a record and delete it before it is
sent, the notifications cron got blocked with `MissingError`.

Now, those notifications are simply skipped. Scheduled message is
unlinked, but no message is produced. As there is no recovery mean
no log is done either, would add useless information.

@moduon MT-7276
Task-5138556

X-original-commit: odoo/odoo@fab443e
Part-of: odoo#238623
Related: odoo/enterprise#101300
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE

When a cascade delete occurs in DB, ORM methods are not called. More
specifically loosely connected records using res_model / res_id pair
are not removed when unlink override exists.

SPECIFICATIONS

When a record that inherits from `mail.thread` is deleted by an
'ondelete="cascade"'' SQL constraint, its messages and notifiations
are kept in DB.

If some of those notifications is in status 'bounce' or 'exception'
it will keep being displayed to the user. However, the user won't be
able to do anything with it. Actually, if they try to, they'll get an
exception.

This fix avoids displaying failures related to non-existing records.
This clears noise and avoids situations where the user is unable to
react to their notifications.

COUNTERS

This implies additional query counters in various tests, as we add
some exists in calls, notably when messages are formated, which happens
quite frequently. Those querie are fast as they are just a direct hit
to the id field of tables.

@moduon MT-7609 OPW-4285691
Task-5138556

Related: odoo/enterprise#101185
Related: odoo/enterprise#101300
Part-of: odoo#238623
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE

When a cascade delete occurs in DB, ORM methods are not called. More
specifically loosely connected records using res_model / res_id pair
are not removed when unlink override exists.

SPECIFICATIONS

If there are some activities linked to removed records, those are
fetched by systray. However when trying to set them done there is
a crash linked to posting a message on an unexisting record.

We are now defensively checking records exist. For removed records
no message is posted, and attachments are removed while removing the
activity.

Task-5138556

Related: odoo/enterprise#101185
Related: odoo/enterprise#101300
Part-of: odoo#238623
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE

When a cascade delete occurs in DB, ORM methods are not called. More
specifically loosely connected records using res_model / res_id pair
are not removed when unlink override exists.

SPECIFICATIONS

Fix various use case in mail

* notifications sent for scheduled messages;
* failure notifications management;
* activities mark as done;

Task-5138556

closes odoo#238623

Forward-port-of: odoo#233071
Related: odoo/enterprise#101300
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Bulgaria adopted the euro as official currency as of 2026-01-01.

closes odoo#241957

Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
…cord by changing the employee to the one whose attendance is not managed by the current user.

Steps to reproduce:
- Assign the Officer Group of Attendance group to a user.
- Assign the user as the attendance manager of itself.
- Login with that user.
- Create an attendance record for the employee and save it.
- Try to change the employee and save; an error will be thrown as expected.
- Go to the Attendance menu; the record will still be saved.

This commit ensures that unallowed write does not take place + test coverage added.
Closes odoo#226007.

closes odoo#226335

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
    **Steps to reproduce:**
    * Install **hr_expense** and **accounting** modules.
    * Create two or more expenses, each with **multiple attachments**.
    * Submit and approve the expenses.
    * Create the **journal entry** of all approved expenses.
    * Open the generated journal entry and review its attachments.

    **Observed behavior:**
    * Only the **first attachment** from each expense is present on the
      journal entry.
    * Additional attachments are missing.

    **Cause:**
    * while creating journal entry, the logic of expense iterate on
      `message_main_attachment_id`.
    * `message_main_attachment_id` stores only a **single attachment**, so
      only one file per expense is copied.

    **Fix:**
    * Iterate on `attachment_ids` instead of `message_main_attachment_id`.
    * Ensures **all attachments** from each expense are included in the
      generated journal entry.

    opw-5414834

closes odoo#241044

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
When a link to the portal is sent from the chatter via message or log note,
the preview of the link triggers that the page was viewed by customer.

As a solution a variable was added to the request headers coming from the
previewer.

opw-5237785

closes odoo#243061

Signed-off-by: Lina Eweis (liew) <liew@odoo.com>
This commit:
- Add three reference fields to invoice PDF for Chorus Pro compliance:
  Buyer Reference, Contract Reference, and Purchase Order Reference.
  These fields appear in the invoice header when set on the invoice.

task-5410836

closes odoo#240494

Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
This commit removes the `unique_active_edi_identification` constraints
from the _auto_init of `account_edi_proxy_client` client user model, and
adds back the constraint on `l10n_my_edi` and `l10n_it_edi` to make it
apply only to those localizations.

The blocking error when trying to register an already registered
participant will also be removed.

task-5089481

closes odoo#224811

Signed-off-by: Laurent Smet (las) <las@odoo.com>
Issue:
Reverse moves miss `invoice_origin` field.

To reproduce:
1- Create a SO.
2- Create an invoice and confirm.
3- In invoice list view make the `Source Document` visible.
4- Create a credit note and reverse the move.

From invoice list view, you can observe that `Source Document` is
empty for reverse move.

Cause:

This is a regression introduced by odoo#236656.

opw-5362055

closes odoo#240439

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Just add or update docstrings to ease understability of code, while
passing by. Access check methods are a bit outdated.

Task-5138368

Part-of: odoo#233725
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Message access is notably based on related document, given their
(model, res_id) pair. Model may customize the required access on
it in order to access their message. For example, you generally
need write access to create a message (post) but on some models
you can post when you can read. Calendar events message access
depends on calendar privacy settings, which is record-specific.

This is controlled via '_get_mail_message_access'. However currently
it is "globally called", for all documents. It should be done on a
per-document basis, as each document could define different access
check.

Keep code somewhat optimized by doing access checks in batch for a
given operation.

Mainly a backport of master improvement done at odoo#214705 .

Task-5138368
opw-4785878

Part-of: odoo#233725
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Searching should always return records belonging to the same subset
as read. Indeed searching implies read. Rules should be symmetric.
Reading documents should be allowed on search results, and search
results should match what is available for reading.

However currently searching on messages does not respect implementation
done by read. Main fix is to correctly call '_get_mail_message_access'
that defines model-specific operation required on document to access
their messages.

Globally backport of master improvements done at odoo#214705 .

Task-5138368
opw-4785878

Part-of: odoo#233725
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Portal users have some specific domains applied when accessing
messages, see notably odoo/odoo@9cd9aaa . Also check usage
of 'website_message_ids' domain, mail controllers, ...

However there are still some cases where search and read are not
coherent for portal users. This is not really annoying as most messages
are accessed using sudo and correctly tailored domains via controllers.
However better have symmetric read and search, to be coherent with
what ORM expects.

Task-5138368
opw-4785878

Part-of: odoo#233725
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to have it in an helper to help forward port, master
upcoming cleaning, and usage in other flows (notably activities
model access check).

Task-5138368

Part-of: odoo#233725
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Like messages, scheduling activities has rights linked to their
document. Access check currently somehow tries to match message
access check by checking '_mail_post_access' class attribute, that
allows to set the required document operation to post a message.

However it does not respect the '_get_mail_message_access' method
that allow to fine-tune the operation, used notably in calendar.
This commit fixes that by using the same access check for activities
as done for mail.message.

Note: adding the filtering method choice to preserve odoo#35659
done on activities records access check.

Task-5138368

Part-of: odoo#233725
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fixes two issues

* not taking into account '_get_mail_message_access' to check if
  user has right to post (generally used to indicate users can
  post on readonly records, but not limited to that);
* not adding the same check on Activities button as on Send message
  and Log note. We consider generally that rights should be aligned
  and UX should match that behavior;
* not adding the same check on attachments buttons, currently limited
  to write access (or always accessible). This is a preliminary work
  for attachments, further fixes are probably incoming;

Example use case: have a registration dek user browsing an event.
Send message / Log note buttons are deactivated but user technically
has rights to post on an event. Activities button is activated but
creating an activity crashes.

Expected behavior: all 3 buttons are activated and working, as rights
are defined in '_get_mail_message_access', giving rights to post when
registration desk users can read.

Task-5138368

Part-of: odoo#233725
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Followup of odoo/odoo@68ff4a2 where access has been fixed. However this broke
portal chatter. Since lead do not inherit from portal mixin we cannot
propagate token nor hash / pid like in other portal models. We thus
have to allow assigned portal users to be able to post when being
allowed to read the lead.

This is a bit like using _mail_post_access (fix done in 19+, see
odoo/odoo@779c6a5) but with a more limited scope. This is due notably to the
better support of '_get_mail_message_access' fixed in previous commits.

Task-5138368

Part-of: odoo#233725
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
devp-odoo and others added 18 commits February 6, 2026 18:47
In this commit:
Fixing 390 computation:
- Add balance from 27, 29, 649 and 31 to casilla 33.
- Add balance from 28, 30, 650 and 32 to casilla 34.

Related PR : odoo/enterprise#105597

task-5732679

closes odoo#245828

Related: odoo/enterprise#105597
Signed-off-by: Joren Van Onder (jov) <jov@odoo.com>
…pport

Our TechnicalContactUrl is peppol.iap@odoo.com, it should not be exposed to the client as the support
contact.
Let's just expose the name of the service like we do above 18.0.

task-none

closes odoo#247628

X-original-commit: e1499db
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
opw-5870516
opw-5898302
opw-5917394
opw-5892671

closes odoo#247619

Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Just to check batch behavior, add some tests. It highlights an issue
when accessing _get_mail_message_access. No easy check except counter
found, as this generates direct sql queries, no easy mock to find
for call_count. Hey.

Followup of odoo#238623 and odoo#233725 , as well as
odoo#232245 (master improvements to backport).

Task-5917342

Part-of: odoo#245744
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Forced propagation of prefetch, lost notably when rebrowsing records.
This allows to make _get_mail_message_access batch-enabled, avoiding
sequential access.

Followup of odoo#238623 and odoo#233725 , as well as
odoo#232245 (master improvements to backport).

Task-5917342

Part-of: odoo#245744
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Add some niche test cases, covering advanced potential issues with
access check, document-based access check, and improving coverage
notably for 19.2+ access rights cleaning in mind.

Followup of odoo#238623 and odoo#233725 , as well as
odoo#232245 (master improvements to backport).

Task-5917342

Part-of: odoo#245744
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Correctly support '_get_mail_message_access' model overrides when
checking activities rights, like done for message management.

Followup of odoo#238623 and odoo#233725 , as well as
odoo#232245 (master improvements to backport).

Task-5917342

closes odoo#245744

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
We're adding new PO files for the following languages:
ro
Steps to reproduce:
1. Create a db with having 'sale' & 'project' installed in version 16.
2. Create a sale order having linkage to more than single project.
3. Migrate the db to version 19.
4. When clicking on the project stat button the breadcrumb traceability
will not be there.

Issue:
-> In v16.4 the target defined for the action `project.open_view_project_all`
is removed from [here]
(odoo/odoo@a92d686)

When migrating a database from v16 to v19 and opening projects from
a sale order linked to multiple projects, the stat button triggers
`action_view_project_ids`, which in turn calls
`project.open_view_project_all` for records having len('projects_ids') > 1
from [here]
(https://github.com/odoo/odoo/blame/19.0/addons/sale_project/models/sale_order.py#L220)
Because the persisted target is `main`, breadcrumb traceability will be lost.
The issue will arise in the DBs coming from version 16 or lesser.
Therefore, it would be necessary to address this immediately and set correct
target for window_action for databases >= v17

This commit explicitly sets the action target to `current` to restore
proper breadcrumb behavior and align it with standard odoo record.

OPW-5448916

closes odoo#244245

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
- Adding logging of sent XML into move chatter
- Adjusting the XML generator to use standard unit price
- Adding rounding for product values as required by the XML structure
task-5892338

closes odoo#247541

Signed-off-by: Joren Van Onder (jov) <jov@odoo.com>
Steps to reproduce
------------------

1. Enable Units of Measure and Automatic Valuation.
2. Create:
  Product KIT, stockable, UoM category Unit, UoM = Units.
  BoM for KIT with at least one component whose UoM is in a different
     category (e.g. m from Length).
3. Go to the product's category and set the Costing Method to Average
   Cost (AVCO) and the Inventory Valuation to Automated.
4. Create a PO for KIT in a currency different from the company currency.
5. Confirm the PO and validate the receipt.

Issue
-----

Validating the receipt raises:

> The unit of measure m defined on the order line doesn't belong to the
> same category as the unit of measure kit defined on the product…

If you keep the PO currency equal to the company currency, the same kit
and BoM work and the receipt posts correctly.

Cause of the issue
------------------

Validating the receipt will call the `_action_done` of stock.move's and generate the related accounting entries. During this call and the currency of the PO is different from the company currency the `_generate_valuation_lines_data` will call the `_get_currency_convert_date` method:
https://github.com/odoo/odoo/blob/751d54207c6214a25a5a1def57137e2f2f9106e3/addons/purchase_stock/models/stock_move.py#L134-L140
This call will in turn call the `_get_qty_received_without_self`:
https://github.com/odoo/odoo/blob/751d54207c6214a25a5a1def57137e2f2f9106e3/addons/purchase_stock/models/stock_move.py#L121-L122
which was not written to handle kit products since it assumes that the product of the PO is the same as the one of the related move:
https://github.com/odoo/odoo/blob/751d54207c6214a25a5a1def57137e2f2f9106e3/addons/purchase_stock/models/stock_move.py#L102-L108

Fix
---

The qty_received is relevant to the _get_currency_convert_date as the method compares the qty_invoiced with the qty_received to determine whether to use the Invoice Date (when qty_invoiced > qty_received) or the Receipt Date.

https://github.com/odoo/odoo/blob/888e086dc6c7823b07993e90f70e2849e988fa7a/addons/purchase_stock/models/stock_move.py#L122-L126

  For kits, `qty_received` must be calculated by aggregating component
  moves to accurately determine this status. Since the standard logic
  crashes due to UoM mismatch, the override in `purchase_mrp` is
  necessary to provide the correct quantity for this date selection.

opw-5030761

closes odoo#236276

Signed-off-by: Lancelot Semal (lase) <lase@odoo.com>
When the "Enter Code" text popup is open in POS, typing outside the input field still affected the active orderline quantity because the number buffer globally captured key events. This change blocks number buffer handling only when the top popup is the text input popup.

Steps to reproduce:
-------------------
* Open a POS session.
* Add a product (quantity one).
* Click “Enter Code”.
* Click outside the popup input, then type a code.
> Observation:
Quantities on the selected product increase even though a popup modal is open.

Why the fix:
------------
The number_buffer was listening to global keyup events and only ignored events targeting INPUT/TEXTAREA. With a modal open, keystrokes outside inputs still modified quantities.
We now:
Ignore number buffer events only when the top popup is TextInputPopup (so virtual numpad popups still work).
Make popup usage optional (inject via env.services?.popup) to avoid breaking cases that don’t start the popup service.

opw-5144792

closes odoo#236637

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Log them instead of trying to unarchive/create them.

task-5923591

closes odoo#247696

Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
@davidtranhp davidtranhp added this to the 17.0 milestone Feb 11, 2026
@davidtranhp davidtranhp changed the title Merged from upstream 260211 01 Merged from upstream 17 260211 01 Feb 11, 2026
@viinbot
Copy link

viinbot commented Feb 11, 2026

@davidtranhp Viindoo Test Suite has failed!

@davidtranhp davidtranhp merged commit 790dc88 into Viindoo:17.0 Feb 11, 2026
1 check failed
@davidtranhp davidtranhp deleted the merged_from_upstream_260211_01 branch February 11, 2026 15:05
@viinbot viinbot added 🚩 Done PR/Commit is finished manually test and closed instance and removed ⚠️ Failed labels Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚩 Done PR/Commit is finished manually test and closed instance

Projects

None yet

Development

Successfully merging this pull request may close these issues.