Aurelien van Delft (avd) 5f41ddc49e [FIX] sale: avoid singleton error on SOs confirmed
Thanks to changes in 82314364c6029a83 the auto-lock settings
also works for public users. But, going from self.env.user to
self.create_uid to check the group lead to a traceback when
self.create_uid is not a singleton. This is because has_group expects
a single record.

To fix that, this commits checks the group of the create_uid of the
first record in self. Because sale.group_auto_done_setting is an
implied_group of a res.config.settings parameter, it's enough
to only check for the first record in the recordset.

To reproduce:
 - Install sale
 - Create a quotation as Mitchell Admin
 - Create a quotation as Marc Demo
 - Create a cron that searches on all draft sale.orders and confirm them
   in batch
 - Run the cron
 -> Singleton Error

closes odoo/odoo#152338

X-original-commit: dfb2eaaaf5c08c0aa46cc5eb0defdc97b35953b0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Aurélien van Delft (avd) <avd@odoo.com>
2024-02-02 09:18:46 +00:00
2023-11-02 21:02:44 +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%