Friday, August 30, 2024
1 change · saas-17.2
Resolved issues and error corrections
This fixes an error that occurred when users selected and duplicated several calendar events at once from the list view. The change restores the expected duplication workflow, helping teams manage repeated meetings or events without interruption.
Original PR description
Versions: ------------- saas-17.2 Steps to Reproduce: ---------------------------- 1. Go to the Calendar app. 2. Switch to list view. 3. Select multiple events. 4. Attempt to duplicate the selected events. Issue: -------- An error occurs when trying to duplicate multiple events. Cause: ---------- After a recent update, the `copy` method now processes records in batches, calling the `create` method with multiple records at once. Previously, this was done one by one. This change causes issues because the `default_get` method, used during creation, now encounters multiple records in `self`, leading to a singleton error. Solution: ------------ Instead of using `self.default_get()` with multiple records, we now use `self.env['calendar.event'].default_get()`. This ensures that the default values are set correctly without causing the singleton error. Task-4098739