Skip to content

Commit

Permalink
[REF] resource_work_time_from_contracts: remove readonly
Browse files Browse the repository at this point in the history
This line has the side effect of issuing a warning
for all models inheriting resource.mixin and setting defaults
to resource_calendar_id.

The readonly was introduced to prevent modifications by the user
since the modules computes it. It is however to relevant since
the field is hidden (readonly parameter only affects the views).
  • Loading branch information
robinkeunen committed Feb 2, 2024
1 parent 5abf60e commit 8d6eb34
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions resource_work_time_from_contracts/models/resource_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class ResourceMixin(models.AbstractModel):

_inherit = "resource.mixin"

# make this field read-only.
resource_calendar_id = fields.Many2one("resource.calendar", readonly=True)
resource_calendar_id = fields.Many2one("resource.calendar")

def list_work_time_per_day(
self,
Expand Down

0 comments on commit 8d6eb34

Please sign in to comment.