Skip to content

Syncing from upstream OCA/server-backend (12.0)#96

Merged
bt-admin merged 19 commits intobrain-tec:12.0from
OCA:12.0
Mar 17, 2021
Merged

Syncing from upstream OCA/server-backend (12.0)#96
bt-admin merged 19 commits intobrain-tec:12.0from
OCA:12.0

Conversation

@bt-admin
Copy link
Copy Markdown

bt_gitbot

legalsylvain and others added 19 commits July 29, 2020 22:36
Co-authored-by: Holger Brunn <mail@hunki-enterprises.com>

[IMP] tests
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).
Signed-off-by StefanRijnhart
Signed-off-by dreispt
Currently translated at 100.0% (39 of 39 strings)

Translation: server-backend-12.0/server-backend-12.0-base_user_role
Translate-URL: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_user_role/es/
Currently translated at 100.0% (27 of 27 strings)

Translation: server-backend-12.0/server-backend-12.0-base_import_match
Translate-URL: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_import_match/es/
Currently translated at 100.0% (4 of 4 strings)

Translation: server-backend-12.0/server-backend-12.0-base_suspend_security
Translate-URL: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_suspend_security/es/
Currently translated at 100.0% (23 of 23 strings)

Translation: server-backend-12.0/server-backend-12.0-base_global_discount
Translate-URL: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_global_discount/es/
Currently translated at 100.0% (29 of 29 strings)

Translation: server-backend-12.0/server-backend-12.0-base_user_role_history
Translate-URL: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_user_role_history/es/
Currently translated at 100.0% (21 of 21 strings)

Translation: server-backend-12.0/server-backend-12.0-base_user_role_profile
Translate-URL: https://translation.odoo-community.org/projects/server-backend-12-0/server-backend-12-0-base_user_role_profile/es/
@bt-admin bt-admin added the 12.0 label Mar 17, 2021
@bt-admin bt-admin merged commit 20f432f into brain-tec:12.0 Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants