summaryrefslogtreecommitdiff
path: root/addons/test_website/tests/__init__.py
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2019-06-27 11:34:29 +0200
committerYannick Tivisse <yti@odoo.com>2019-06-27 11:34:29 +0200
commita5b08d5ea52b28d334afb3bd65ccfb17c25dff01 (patch)
tree97983316d97bfa05907c37a742ab1115acc87d56 /addons/test_website/tests/__init__.py
parentb2eceae7c927d1b908f8e90e6a911430a7ccfce7 (diff)
parentd8f95609eb7dd18109856cfa0ae8fdb1080ce959 (diff)
[MERGE] web, hr, test_website: Add multi-company tests
test_website: Add multi-company test ============================= Purpose ------------ This commit tests some behaviors with multi company mode after changes brought by f847a46. Specification ------------------- The website company should be automatically set in the context as 'allowed_company_ids'. That way, we can remove the switch company menu on the website, which doesn't make a lot of sense. This test enforce this behavior. web: Add QUnit tests for the SwitchCompanyMenu ========================================= Purpose ------------ This commit tests some behaviors with multi company mode after changes brought by f847a46. Specification ------------------ Ensure the robustness of the switch company menu for multiple cases like: - Bar rendering - Switch to another company in mono/multi environment - Toggle another company in mono/multi environment - Remove a company in mono/multi environment The widget itself has been slighty modified to make it more testable: - Reading from session is now in the `willStart` function instead of `init` to allow mocking the session (in tests, `init` is executed before the mock is applied). - In the event handlers, don't use `bbq` to retrieve current allowed company ids. `bbq` is not easily nor cleanly patched. - When reading allowed company ids from session, cast ids from string to integer. They are everywhere casted except there. and some linting hr: Add multi company tests ====================== Purpose ------------- This commit tests some behaviors with multi company mode after changes brought by f847a46. Specification ------------------ Check that a report printing for several records on different companies: - Works if the context is correctly set, i.e. both companies are in the allowed_company_ids - Doesn't work if the context is not correctly set
Diffstat (limited to 'addons/test_website/tests/__init__.py')
-rw-r--r--addons/test_website/tests/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/test_website/tests/__init__.py b/addons/test_website/tests/__init__.py
index 40d4ece53e7..4bb004cd8f9 100644
--- a/addons/test_website/tests/__init__.py
+++ b/addons/test_website/tests/__init__.py
@@ -4,3 +4,4 @@
from . import test_controller_args
from . import test_reset_views
from . import test_views_during_module_operation
+from . import test_multi_company