From c19d6a76f6d1c61e8b582bf3cb1046e958aba235 Mon Sep 17 00:00:00 2001 From: Eric Antones Date: Mon, 19 Apr 2021 09:17:07 +0200 Subject: [PATCH] [FIX] pms: wrong default value in property_id field of room model (#81) --- pms/models/pms_room.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pms/models/pms_room.py b/pms/models/pms_room.py index cd3287141..a4d6c5938 100644 --- a/pms/models/pms_room.py +++ b/pms/models/pms_room.py @@ -35,7 +35,7 @@ class PmsRoom(models.Model): help="Properties with access to the element;" " if not set, all properties can access", required=True, - default=lambda self: self.env.user.active_property_ids[0], + default=lambda self: self.env.user.get_active_property_ids()[0], comodel_name="pms.property", ondelete="restrict", )