Files
odoo_source/addons
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
..
2024-01-26 09:13:04 +00:00
2024-01-15 09:30:53 +00:00
2024-01-26 09:13:03 +00:00
2024-02-01 14:30:06 +00:00
2024-01-31 08:43:44 +00:00