Yannick Tivisse a5b08d5ea5 [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
2019-06-27 11:34:29 +02:00
2015-09-08 15:45:09 +02:00
2018-10-09 13:44:38 +00:00
2015-09-08 17:58:38 +02:00
2019-03-13 15:10:02 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%