summaryrefslogtreecommitdiff
path: root/doc/reference/javascript.rst
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2019-05-10 15:29:21 +0000
committerDenis Ledoux <dle@odoo.com>2019-05-10 15:43:46 +0000
commit394642e1dc31b18b32c3b3f37774a4d5e531fd46 (patch)
tree14ae66c52c2785feb3487918c4753d2a3385f2eb /doc/reference/javascript.rst
parent8a84f96641c6f0330a420ad0943c42ff24a0f4f1 (diff)
[FIX] base: do not recompute `res.users.share` on add/remove multi-company
This is a performance patch. Writing on the field `users` of `res.groups` had the side effect to recompute the field `share` of `res.users`. This is because the trigger of this field is `@api.depends('groups_id')`. The more users you had, the more time it took to add or remove the second company of a user. This also slowed down the creation of employee users when the multi-company group was added to the inherited groups of the employee group (basically when checking "Multi-Company" in the General Settings) as then all new employee matched the condition `if len(user.company_ids) <= 1 and user.id in group_multi_company.users.ids:` (Multi-Company group checked, but only one company set, by default). closes odoo/odoo#33305 Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
Diffstat (limited to 'doc/reference/javascript.rst')
0 files changed, 0 insertions, 0 deletions