summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorPedro M. Baeza <pedro.baeza@tecnativa.com>2020-01-26 14:19:42 +0000
committerPedro M. Baeza <pedro.baeza@tecnativa.com>2020-01-30 12:40:49 +0000
commit8e51fd2afe5a5fa388da55c8d873b25a832dca37 (patch)
treee9e2d1a23189b948d740fef0c78b080963a64db8 /addons/web/static/src/js/fields/basic_fields.js
parentba3062e6fc7968b138b67068cd02bdc7562e31dc (diff)
[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>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions