-
Notifications
You must be signed in to change notification settings - Fork 12
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
[8.0.1.2.0][hr_timesheet_computation_overtime] #243
Conversation
Codecov Report
@@ Coverage Diff @@
## 8.0 #243 +/- ##
==========================================
+ Coverage 56.42% 56.48% +0.05%
==========================================
Files 296 298 +2
Lines 6127 6140 +13
==========================================
+ Hits 3457 3468 +11
- Misses 2670 2672 +2
Continue to review full report at Codecov.
|
@api.constrains( | ||
"sheet_id", | ||
"state", | ||
"company_id.overtime_check_timesheet", |
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.
Constrains tidak bisa menggunakan dot notation. Cukup sheet_id dan state
) | ||
def _check_timesheet(self): | ||
obj_overtime = self.env[self._name] | ||
if self.state in ["confirm", "valid"]: |
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.
if self.state in ["confirm", "valid"]: | |
if self.state in ["confirm", "valid"] and not self.sheet_id and self.company_id.overtime_check_timesheet: |
criteria = [ | ||
("sheet_id", "=", False), | ||
("company_id.overtime_check_timesheet", "<>", False), | ||
] | ||
if obj_overtime.search_count(criteria) > 0: | ||
raise UserError(_("Timesheet cannot be empty")) |
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.
Lgs raise
No description provided.