Skip to content
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

Closed

Conversation

JasminSForgeFlow
Copy link

@JasminSForgeFlow JasminSForgeFlow commented Jun 30, 2023

Standard Migration

@ForgeFlow

include #545

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a 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.

@JasminSForgeFlow JasminSForgeFlow marked this pull request as ready for review July 3, 2023 04:28
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a 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?

@JasminSForgeFlow JasminSForgeFlow force-pushed the 15.0-mig-hr_timesheet_holiday branch 3 times, most recently from 29a3479 to 7001d08 Compare July 4, 2023 08:46
@JasminSForgeFlow
Copy link
Author

One test is failing, could you have a look?

it's fixed. Thanks

@AaronHForgeFlow
Copy link
Contributor

FYI: rebased to build ocabot

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional review

@AaronHForgeFlow
Copy link
Contributor

@JasminSForgeFlow it seems tests fail after the rebase. Can you check?

09-19 09:44:57,773 250 INFO odoo odoo.addons.hr_timesheet_holiday.tests.test_all: ====================================================================== 
2023-09-19 09:44:57,773 250 ERROR odoo odoo.addons.hr_timesheet_holiday.tests.test_all: FAIL: TimesheetHolidayTest.test_timesheet_half_day
Traceback (most recent call last):
  File "/__w/timesheet/timesheet/hr_timesheet_holiday/tests/test_all.py", line 198, in test_timesheet_half_day
    self.assertEqual(hours_after - hours_before, 2.625)
AssertionError: 3.0625 != 2.625

@JasminSForgeFlow JasminSForgeFlow force-pushed the 15.0-mig-hr_timesheet_holiday branch 2 times, most recently from e2d2048 to 77059ce Compare September 26, 2023 10:48
@JasminSForgeFlow
Copy link
Author

@JasminSForgeFlow it seems tests fail after the rebase. Can you check?

09-19 09:44:57,773 250 INFO odoo odoo.addons.hr_timesheet_holiday.tests.test_all: ====================================================================== 
2023-09-19 09:44:57,773 250 ERROR odoo odoo.addons.hr_timesheet_holiday.tests.test_all: FAIL: TimesheetHolidayTest.test_timesheet_half_day
Traceback (most recent call last):
  File "/__w/timesheet/timesheet/hr_timesheet_holiday/tests/test_all.py", line 198, in test_timesheet_half_day
    self.assertEqual(hours_after - hours_before, 2.625)
AssertionError: 3.0625 != 2.625

its fixed, Thanks

Copy link

github-actions bot commented Feb 4, 2024

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 4, 2024
string="Analytic Account",
related="project_id.analytic_account_id",
)
project_id = fields.Many2one(
Copy link
Contributor

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

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

As per comments

oca-travis and others added 14 commits February 28, 2024 09:43
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/
@JasminSForgeFlow JasminSForgeFlow force-pushed the 15.0-mig-hr_timesheet_holiday branch 3 times, most recently from 75f41fc to 13758eb Compare February 28, 2024 04:27
"date_to": leave_date,
}
)
leave.with_user(self.user_hruser_id).action_approve()
Copy link
Contributor

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

@AaronHForgeFlow
Copy link
Contributor

After a deeper look I think standard module project_timesheet_holidays I think it covers everything in this module, so this is not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.