Pedro M. Baeza 8e51fd2afe [FIX] account: Perform B2B/B2C overlapping check per user
Steps to reproduce the problem:

- Have user A with B2B group.
- Have user B with B2C group.
- Add simultaneously on both - via write - another group (or call `_check_one_user_type`).

Expected result:

- No problem

Got result:

- Error "A user cannot have both Tax B2B and Tax B2C..."

That's because the check is performed for more than one user each time, while it has
to be record per record. The implementation of `_has_multiple_groups` actually
checks if the passed recordset is only one record, and if not, it looks directly for all
existing users, so also the case of both users A and B being in the same B2x group, but
having a 3rd user in the other group will fail.

Revisiting the query in `_has_multiple_groups`, there's a hidden error when you use it
for only one ID because a missing space.

closes odoo/odoo#44300

X-original-commit: 83f104b2f2fc1345ad067430466c004697a91db9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-30 12:40:49 +00:00
2015-09-08 15:45:09 +02:00
2019-10-03 12:48:09 +00:00
…
2015-09-08 17:58:38 +02:00
2019-11-08 11:24:04 +00:00
2019-10-03 12:48:09 +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, ...

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.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with 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%