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

[8.0.1.2.0][hr_timesheet_computation_overtime] #243

Closed
wants to merge 2 commits into from
Closed

Conversation

mikevhe18
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Nov 11, 2020

Coverage Status

Coverage decreased (-0.1%) to 56.482% when pulling 1b45b5b on 8.0-T001402 into d39d80e on 8.0.

@codecov-io
Copy link

codecov-io commented Nov 11, 2020

Codecov Report

Merging #243 (1b45b5b) into 8.0 (d39d80e) will increase coverage by 0.05%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
...n_overtime/models/hr_timesheet_computation_item.py 50.00% <ø> (ø)
..._computation_overtime/models/hr_timesheet_sheet.py 100.00% <ø> (ø)
...computation_overtime/models/hr_overtime_request.py 50.00% <60.00%> (+2.94%) ⬆️
...mesheet_computation_overtime/models/res_company.py 100.00% <100.00%> (ø)
...imesheet_computation_overtime/models/res_config.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d39d80e...1b45b5b. Read the comment docs.

@api.constrains(
"sheet_id",
"state",
"company_id.overtime_check_timesheet",
Copy link
Member

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"]:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if self.state in ["confirm", "valid"]:
if self.state in ["confirm", "valid"] and not self.sheet_id and self.company_id.overtime_check_timesheet:

Comment on lines 52 to 57
criteria = [
("sheet_id", "=", False),
("company_id.overtime_check_timesheet", "<>", False),
]
if obj_overtime.search_count(criteria) > 0:
raise UserError(_("Timesheet cannot be empty"))
Copy link
Member

Choose a reason for hiding this comment

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

Lgs raise

@andhit-r andhit-r closed this Oct 23, 2022
@andhit-r andhit-r deleted the 8.0-T001402 branch October 23, 2022 12:56
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.

None yet

4 participants