Monday, December 16, 2024
2 changes · saas-17.2
Resolved issues and error corrections
Duplicating several users at once no longer fails when the Website app is installed. This prevents an error that blocked administrators from copying multiple user accounts from the user list.
Original PR description
Issue: When 'website' is installed a singleton error is thrown when duplicating multiple users In previous versions, such as [17.0] The copy method would be called multiple times, once per record. However, starting with version 17.2+, self becomes a record set that can potentially contain multiple records, which changes the behavior. res.users(1), res.users(2) --> res.users(1,2) see IMP: [#154132](https://github.com/odoo/odoo/pull/154132) Steps to reproduce: - Install 'website' - Navigate to user list view (Settings / Users & Companies / Users) - Select multiple users and try to duplicate them Current behavior before PR: - ValueError: Expected singleton Desired behavior after PR is merged: - Resolves expected singleton error --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue that caused an error when duplicating multiple users at once while the signup module is installed. This helps administrators manage user records in bulk without interruptions.
Original PR description
When we try to duplicate users in the Users section, this error occurs. Steps to reproduce: - Install the ``auth_signup`` module - Go to users and select ``Mitchell Admin`` and ``Marc Demo`` - Now duplicate both of them Traceback: ``ValueError: Expected singleton: res.users(2, 6)`` This error occurs at [1], where we are receiving multiple values in ``self``. This commit will fix the above error by changing the method name from ``copy`` to ``copy_data``. [1]- https://github.com/odoo/odoo/blob/0a52ad52b1a17f2732f92a5e24ec0814d929329b/addons/auth_signup/models/res_users.py#L348 sentry-5635211309 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr