diff options
| author | fw-bot <otis@odoo.com> | 2019-09-13 10:07:05 +0000 |
|---|---|---|
| committer | Nans Lefebvre <len@odoo.com> | 2019-09-13 10:52:47 +0000 |
| commit | 183e632c0ad8e3721d5e628e36ab7598f666b04d (patch) | |
| tree | 2886fd763ac8e8516703b137115c82aecc6defc0 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 0fe86d4b4061b0bc1be713a7bed1850c9aadb11f (diff) | |
[FIX] stock, delivery: put compute fields across companies in compute_sudo
Be in multi-company, with shared products, let P be a product in company C.
Suppose there are stock moves or pickings in company C'.
Suppose a non-admin writes on P: it triggers an access error.
Stock moves are not shared across companies in all cases.
So fields that depend on product_id might trigger a recompute on stock.moves
that are in another company, and thus trigger a spurious ACL error while
simply writing product attributes.
Note that _cal_move_weight depends on product_qty, however it is not sufficient
to only put that field in compute_sudo; the product_qty has already been marked
as todo, and so it is recomputed in the initial environment.
opw 2066691
forward port of 7d4d8fa18aecb3b78c8d359434a165c1de71a9b4
closes odoo/odoo#36838
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
