diff options
| author | Nicolas Galler <ngl@odoo.com> | 2020-12-31 10:30:43 +0000 |
|---|---|---|
| committer | Nicolas Galler <ngl@odoo.com> | 2021-01-04 14:35:56 +0000 |
| commit | 592ee14d7fe81e7e5afd23f2bbbdac344eae6060 (patch) | |
| tree | df807bbacf66301107d2ca6803464ac4cbdcd895 /addons/web/static/src/js | |
| parent | 4d3655304205cc9785ef696a47a17a41242d297a (diff) | |
[FIX] stock: run scheduler actions as super user
In `run_scheduler`, we are running certain functions as super user to
avoid inter company and access rights issues. This commit adds a
`sudo()` call to the `action_assign()` call, in case some objects
related to the retrieved moves are not accessible.
In addition a commit call is moved up to apply after the
`procure_orderpoint_confirm` call (as it was, it was applied after the
`_action_assign` loop, but there is in fact already a commit in that
loop, this lead to a somewhat random behavior where the replenish rules
were sometimes rolled back and sometimes not, depending on whether the
first iteration of the loop errored out or not)
opw-2394706
closes odoo/odoo#64021
X-original-commit: 7a2c23c738daa23ab469f6a780bb7df69a25bec0
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions
