Skip to content

Commit

Permalink
[TMP]pms: temporal fix migration to avoid unused depends param in _ch…
Browse files Browse the repository at this point in the history
…eckin_manual_fields
  • Loading branch information
DarioLodeiros committed Oct 17, 2024
1 parent fd184b6 commit f661e99
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pms/models/pms_checkin_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def _compute_residence_state_id(self):
elif not record.residence_state_id:
record.residence_state_id = False

@api.depends(lambda self: self._checkin_manual_fields(depends=True))
@api.depends(lambda self: self._checkin_manual_fields())
def _compute_state(self):
for record in self:
if not record.state:
Expand Down Expand Up @@ -783,7 +783,7 @@ def unlink(self):
return res

@api.model
def _checkin_manual_fields(self, country=False, depends=False):
def _checkin_manual_fields(self, country=False):
manual_fields = [
"name",
"partner_id",
Expand All @@ -805,9 +805,6 @@ def _checkin_manual_fields(self, country=False, depends=False):
"residence_country_id",
"residence_state_id",
]
# api.depends need "reservation_id.state" in the lambda function
if depends:
manual_fields.append("reservation_id.state")
return manual_fields

@api.model
Expand Down

0 comments on commit f661e99

Please sign in to comment.