5 Commits

Author SHA1 Message Date
hugues de keyzer
74851db119 [FIX] pass pre-commit 2023-07-10 19:47:46 +02:00
Andrius Laukavičius
115aba15df [FIX] base_user_role: default user multi-company
When creating user, default roles are using `base.default_user`, which
in multi-company case, can be from different company than user is being
created for. If thats the case, user creating another user, will get
access error, when trying to read default template user.

To work around that, we use sudo, to make sure, template user data can
be read regardless of a company.

Also improved the way base_user_role tests are run. Changed base test
class from TransactionCase to SavepointCase.

From how tests are ran perspective, both classes behave the same: each
test uses set up which is roll backed after.

But the difference is that SavepointCase case is much faster, because
it calls setUpClass once and saves this case for all tests (reusing
saved state).
2020-12-16 20:12:49 +02:00
Kevin Khao
588e8e0daa [IMP] base_user_role: Added multicompany support from commit server-tool repo commit 840c2c1119460424230c935da24ec42f95c21122 2020-03-06 16:59:08 +01:00
hveficent
2f3402ed1b [12.0][FIX] readme 2018-12-11 14:45:46 +01:00
Duc Dao
a34fb2eae4 [MIG] base_user_role: Migration to 12.0 2018-11-19 18:00:21 +01:00