[FIX]pms: fix search property parent_id partner model related

This commit is contained in:
Darío Lodeiros
2023-10-23 13:26:54 +02:00
parent 302c0cfc35
commit 6022f20f4a
4 changed files with 15 additions and 0 deletions

View File

@@ -38,6 +38,12 @@ class PmsProperty(models.Model):
index=True,
ondelete="restrict",
)
parent_id = fields.Many2one(
comodel_name="pms.property", string="Parent Property", index=True
)
child_ids = fields.One2many(
comodel_name="pms.property", inverse_name="parent_id", string="Child Properties"
)
pms_property_code = fields.Char(
string="Property Code",
help="Short name property",

View File

@@ -822,6 +822,7 @@
string="Property"
enable_counters="1"
icon="fa-h-square"
domain="[('company_id', '=', company_id)]"
/>
<field
name="state"

View File

@@ -1106,6 +1106,7 @@
string="Property"
enable_counters="1"
icon="fa-h-square"
domain="[('company_id', '=', company_id])]"
/>
<field
name="state"

View File

@@ -150,11 +150,18 @@
<field name="room_amenity_ids" />
<newline />
<searchpanel>
<field
name="company_id"
string="Company"
enable_counters="1"
icon="fa-building"
/>
<field
name="pms_property_id"
string="Property"
enable_counters="1"
select="multi"
domain="[('company_id', '=', company_id)]"
/>
<field
name="room_type_id"