diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-06-26 07:11:13 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-06-26 07:21:22 +0000 |
| commit | 6387614dca1b001d0d4baddaf969505e52576dec (patch) | |
| tree | a667fd1d53bfd8fbab0cd3b963076f7615df060a /addons/web/static/src/js/widgets/data_export.js | |
| parent | 85ab9238c5b6cb7db259b4c2e1d67a34fe1c4606 (diff) | |
[FIX] product: create variants in multi-company
- Install stock module
- Activate multi-company and variants
- Create a second company
- Create a product with 2 variants
- Create a picking with the product for both companies
- Add an attribute on the product with 2 values
- Save
An AccessError is raised on `stock.move`.
It arises because the field `product_qty` on `stock.move` must be
recomputed but is on a record in a different company.
The `try` / `except` clause doesn't protect against the recomputation.
Indeed, what happens is:
- try to unlink in batch => AccessError due to recomputation
- try to unlink individually => AccessError due to recomputation
- try to write individually => the field couldn't be recomputed before
(flagged as dirty), so try again to recompute => AccessError
We perform the operation as sudo, and take care of checking the access
rights beforehand.
opw-2009450
closes odoo/odoo#34369
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/widgets/data_export.js')
0 files changed, 0 insertions, 0 deletions
