Skip to content

Commit

Permalink
[IMP] resource_multi_week_work_time_from_contracts: Move domain from …
Browse files Browse the repository at this point in the history
…view to model

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
  • Loading branch information
carmenbianca authored and huguesdk committed Oct 9, 2024
1 parent f34a53e commit 12ea19d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 23 deletions.
3 changes: 0 additions & 3 deletions resource_multi_week_work_time_from_contracts/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@
"resource_work_time_from_contracts",
],
"auto_install": True,
"data": [
"views/hr_contract_views.xml",
],
}
15 changes: 15 additions & 0 deletions resource_multi_week_work_time_from_contracts/models/hr_contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

from odoo import fields, models


class HrContract(models.Model):
_inherit = "hr.contract"

# Add a domain.
resource_calendar_id = fields.Many2one(
"resource.calendar",
domain="[('parent_calendar_id', '=', False)]",
)

This file was deleted.

0 comments on commit 12ea19d

Please sign in to comment.