Skip to content
Snippets Groups Projects
Commit a68fe720 authored by Florian Vranckx's avatar Florian Vranckx Committed by Nicolas Lempereur
Browse files

[FIX] product : variant of other company


Steps to reproduce:
- install sale_management
- enable variant in the setting of sales
- create a second company
- create a product with at least a variant and set the company
  to the active one
- switch to the second company
- create another product and select the same variant
- error on creation

Cause:

 The stored compute is executed as sudo, therefore a value that the user
 has no access may stays in the cache. In subsequent flush we might read
 value from cache when computing some other fields that contain an
 unreadable value for current user.

Solution:

 Flush and invalidate so we don't have unaccessible value in cache in
 this use case.

note: this is not happening in 14.0 and over

opw-2898457
opw-2950290

closes odoo/odoo#96023

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent c7bf932c
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment