Skip to content

Conversation

@MiquelRForgeFlow
Copy link
Contributor

Follow-up of #5396.

@MiquelRForgeFlow MiquelRForgeFlow added this to the 18.0 milestone Oct 8, 2025
@MiquelRForgeFlow
Copy link
Contributor Author

@remi-filament what do you think?

Copy link
Contributor

@remi-filament remi-filament left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will take more time to do a browse then filtered (that will need to fetch fields from hr_employee) rather that doing it in SQL, but it should work the same !

@MiquelRForgeFlow
Copy link
Contributor Author

MiquelRForgeFlow commented Oct 8, 2025

I think it will take more time to do a browse then filtered

Yes, but I am afraid that if in some case all employees are inactive in a leave, then the leave will not be selected, right?

@MiquelRForgeFlow MiquelRForgeFlow merged commit d36aaaa into OCA:18.0 Oct 8, 2025
4 checks passed
@MiquelRForgeFlow MiquelRForgeFlow deleted the fix-holidays-better branch October 8, 2025 13:18
pedrobaeza added a commit that referenced this pull request Dec 17, 2025
As first, employee_ids are being filtered by active, but the if was
not changed in #5398

```
  File ".../openupgrade_scripts/scripts/hr_holidays/18.0.1.6/pre-migration.py", line 206, in migrate
    split_employee_leaves(env)
  File ".../openupgrade_scripts/scripts/hr_holidays/18.0.1.6/pre-migration.py", line 162, in split_employee_leaves
    SET employee_id = {employees[0].id}
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 7082, in __getitem__
    return self.browse((self._ids[key],))
IndexError: tuple index out of range
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants