[IMP] Improved service view.

This commit is contained in:
Murtuza Saleh
2021-12-08 22:15:26 +05:30
parent 854785f62c
commit 4419e1efc8
3 changed files with 6 additions and 2 deletions

View File

@@ -197,7 +197,9 @@ class PmsProperty(models.Model):
@api.depends("room_ids")
def _compute_terrace(self):
for rec in self:
type_id = self.env.ref("pms_base.pms_room_type_patio", raise_if_not_found=False)
type_id = self.env.ref(
"pms_base.pms_room_type_patio", raise_if_not_found=False
)
terrace = len(rec.room_ids.filtered(lambda x: x.type_id == type_id))
if terrace:
rec.terrace = True

View File

@@ -146,7 +146,7 @@
groups="pms_base.group_pms_show_service"
>
<field name="service_ids">
<tree>
<tree editable="bottom">
<field name="name" />
<field name="vendor_id" />
</tree>

View File

@@ -12,11 +12,13 @@
type="object"
class="oe_stat_button"
icon="fa-archive"
string="Archive"
>
<field
name="active"
widget="boolean_button"
options='{"terminology": "archive"}'
invisible="1"
/>
</button>
</div>