diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-05-31 15:04:02 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-05-31 15:06:08 +0000 |
| commit | 691dc424a1d04c7ea4fb87663b17922efd5bcaf5 (patch) | |
| tree | 1f8393c0fbb309dcb23656e2ca79dcbc83058300 /addons/web/static/src/js/fields | |
| parent | 9e77ce2edc7e1cd3cef3e82d7f9424844403ac11 (diff) | |
[FIX] hr_expense, hr_holidays: default activity user
- Activate multi-company
- Create a company B
- Switch to company B
- Create an allocation request
An access error is raised.
Commit 7f775f0677eab97 added a `sudo` call in order to prevent an access
error. However, it implies that the fallback value `self.env.user`
refers to the SUPERUSER, not the current user anymore. If the current
user is not in the same company than the SUPERUSER, the multi-company
record rules will be triggered.
The fallback is changed to an empty recordset, and selecting the current
user is done out of the method called with `sudo`.
opw-2003137
closes odoo/odoo#33804
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields')
0 files changed, 0 insertions, 0 deletions
