-
-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: hr_job_category removes employee tags that are not into the contract #1178
Conversation
When updating the hr.contract we shouldn't remove already existing tags
c10d670
to
8887e58
Compare
When you update the contract, you dont remove tags that are manually added
8887e58
to
a0f99cb
Compare
hr_job_category/models/hr.py
Outdated
def _remove_tags(self, employee_id=None, job_id=None): | ||
# TODO write tags only once | ||
if not employee_id or not job_id: | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy to test that condition for better test coverage. Or maybe this method does not need to return a value
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Hello @jarroyomorales You have been doing a migration of this module with a simplification of the code. But it has been introducing a regression (listed in the PR description). |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to remove the stale
label on this PR.
And refactor proposed to simplify and have less writes.
Co-authored-by: Florent Xicluna <[email protected]>
Co-authored-by: Florent Xicluna <[email protected]>
Co-authored-by: Florent Xicluna <[email protected]>
Co-authored-by: Florent Xicluna <[email protected]>
Co-authored-by: Florent Xicluna <[email protected]>
Co-authored-by: Florent Xicluna <[email protected]>
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
The module has been simplified during the migration 12.0 -> 13.0 #895
Since this simplification contained a regression:
Tags on employee could come from distinct sources (manually added) or linked to other models.
We want to avoid this hard link.
For the moment, I only took back the code from 12.0 (with a small addition) which would require some optimizations.