mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] Compute folio_id from reservation_id (#75)
This commit is contained in:
@@ -282,7 +282,7 @@ class PmsService(models.Model):
|
||||
qty = sum(service.service_line_ids.mapped("day_qty"))
|
||||
service.product_qty = qty
|
||||
|
||||
@api.depends("reservation_id")
|
||||
@api.depends("reservation_id", "reservation_id.folio_id")
|
||||
def _compute_folio_id(self):
|
||||
for record in self:
|
||||
if record.reservation_id:
|
||||
|
||||
@@ -467,8 +467,16 @@
|
||||
decoration-success="is_board_service == True"
|
||||
>
|
||||
<field name="is_board_service" invisible="1" />
|
||||
<field name="company_id" invisible="0" />
|
||||
<field name="pms_property_id" invisible="0" />
|
||||
<field
|
||||
name="company_id"
|
||||
invisible="1"
|
||||
readonly="1"
|
||||
/>
|
||||
<field
|
||||
name="pms_property_id"
|
||||
invisible="1"
|
||||
readonly="1"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
@@ -481,7 +489,11 @@
|
||||
invisible="1"
|
||||
readonly="1"
|
||||
/>
|
||||
<field name="folio_id" invisible="1" />
|
||||
<field
|
||||
name="folio_id"
|
||||
invisible="1"
|
||||
readonly="1"
|
||||
/>
|
||||
<field
|
||||
name="reservation_id"
|
||||
invisible="1"
|
||||
|
||||
Reference in New Issue
Block a user