-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
[15.0][MIG] hr_timesheet_holiday #594
[15.0][MIG] hr_timesheet_holiday #594
Conversation
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.
Functional tests so far so good. I think this can be ready for review.
1bde30d
to
ba6c264
Compare
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.
One test is failing, could you have a look?
29a3479
to
7001d08
Compare
it's fixed. Thanks |
7001d08
to
19e8960
Compare
FYI: rebased to build ocabot |
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.
Functional review
@JasminSForgeFlow it seems tests fail after the rebase. Can you check?
|
e2d2048
to
77059ce
Compare
its fixed, Thanks |
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. |
string="Analytic Account", | ||
related="project_id.analytic_account_id", | ||
) | ||
project_id = fields.Many2one( |
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.
I think we should depend this module on the standard module project_timesheet_holidays and reuse the field timesheet_project_id
https://github.com/odoo/odoo/blob/15.0/addons/project_timesheet_holidays/models/hr_holidays.py#L22
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.
As per comments
Currently translated at 63.2% (12 of 19 strings) Translation: hr-timesheet-10.0/hr-timesheet-10.0-hr_timesheet_holiday Translate-URL: https://translation.odoo-community.org/projects/hr-timesheet-10-0/hr-timesheet-10-0-hr_timesheet_holiday/it/
Currently translated at 100.0% (19 of 19 strings) Translation: hr-timesheet-10.0/hr-timesheet-10.0-hr_timesheet_holiday Translate-URL: https://translation.odoo-community.org/projects/hr-timesheet-10-0/hr-timesheet-10-0-hr_timesheet_holiday/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: timesheet-10.0/timesheet-10.0-hr_timesheet_holiday Translate-URL: https://translation.odoo-community.org/projects/timesheet-10-0/timesheet-10-0-hr_timesheet_holiday/
…, the user_id is not filled. Due to the sudo, this user_id field is auto-filled with the admin user (instead of the user related to the employee).
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: timesheet-10.0/timesheet-10.0-hr_timesheet_holiday Translate-URL: https://translation.odoo-community.org/projects/timesheet-10-0/timesheet-10-0-hr_timesheet_holiday/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: timesheet-10.0/timesheet-10.0-hr_timesheet_holiday Translate-URL: https://translation.odoo-community.org/projects/timesheet-10-0/timesheet-10-0-hr_timesheet_holiday/
75f41fc
to
13758eb
Compare
13758eb
to
85e35e6
Compare
"date_to": leave_date, | ||
} | ||
) | ||
leave.with_user(self.user_hruser_id).action_approve() |
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.
this is the line that is failing:
2024-02-28 05:30:33,674 399 ERROR odoo odoo.addons.hr_timesheet_holiday.tests.test_all: ERROR: TimesheetHolidayTest.test_timesheet_half_day Traceback (most recent call last): File "/__w/timesheet/timesheet/hr_timesheet_holiday/tests/test_all.py", line 190, in test_timesheet_half_day leave.with_user(self.user_hruser_id).action_approve() File "/__w/timesheet/timesheet/hr_timesheet_holiday/models/hr_leave.py", line 64, in action_approve res = super(HrLeave, self).action_approve() File "/opt/odoo/addons/hr_holidays/models/hr_leave.py", line 1133, in action_approve self.filtered(lambda hol: not hol.validation_type == 'both').action_validate() File "/opt/odoo/addons/hr_holidays/models/hr_leave.py", line 1157, in action_validate raise ValidationError(_('The following employees are not supposed to work during that period:\n %s') % ','.join(leaves.mapped('employee_id.name'))) odoo.exceptions.ValidationError: The following employees are not supposed to work during that period: David Employee
I think that it is because it is creating a leave on a weekend, but not sure
After a deeper look I think standard module project_timesheet_holidays I think it covers everything in this module, so this is not needed. |
Standard Migration
@ForgeFlow
include #545