Skip to content

Commit

Permalink
[FIX] hr_timesheet_sheet: deal with time off line
Browse files Browse the repository at this point in the history
Fixes inability to add lines to timesheets that containstime off lines,
managed from project_timesheet_holidays.

Fixes OCA#711
  • Loading branch information
maisim authored and Borruso committed Nov 26, 2024
1 parent 45084e5 commit 8b3dc54
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hr_timesheet_sheet/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ HR Timesheet Sheet
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8242f7cce2e51dfba2a10874b1293dc612d63cab543264d158495cdb4a6f1f95
!! source digest: sha256:45c06b6aa4783b7ffdc6edde1ec07b498407fffbf6ecc15c668fc770c5669a3e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion hr_timesheet_sheet/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{
"name": "HR Timesheet Sheet",
"version": "16.0.1.1.3",
"version": "16.0.1.1.4",
"category": "Human Resources",
"sequence": 80,
"summary": "Timesheet Sheets, Activities",
Expand Down
5 changes: 2 additions & 3 deletions hr_timesheet_sheet/models/hr_timesheet_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,8 @@ def add_line(self):
if existing_unique_ids:
self.delete_empty_lines(False)
if frozenset(new_line_unique_id.items()) not in existing_unique_ids:
self.timesheet_ids |= self.env["account.analytic.line"]._sheet_create(
values
)
new_line = self.env["account.analytic.line"]._sheet_create(values)
self.write({"timesheet_ids": [(4, new_line.id)]})

def link_timesheets_to_sheet(self, timesheets):
self.ensure_one()
Expand Down
2 changes: 1 addition & 1 deletion hr_timesheet_sheet/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">HR Timesheet Sheet</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8242f7cce2e51dfba2a10874b1293dc612d63cab543264d158495cdb4a6f1f95
!! source digest: sha256:45c06b6aa4783b7ffdc6edde1ec07b498407fffbf6ecc15c668fc770c5669a3e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/timesheet/tree/16.0/hr_timesheet_sheet"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_sheet"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/timesheet&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module supplies a new screen enabling you to manage your work encoding
Expand Down

0 comments on commit 8b3dc54

Please sign in to comment.