From eace7de66362184c1adf2365ab06e2d759503cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Sun, 11 Apr 2021 21:27:26 +0200 Subject: [PATCH] [FIX] Compute folio_id from reservation_id (#75) --- pms/models/pms_service.py | 2 +- pms/views/pms_reservation_views.xml | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pms/models/pms_service.py b/pms/models/pms_service.py index 800480d7d..2d801cc7e 100644 --- a/pms/models/pms_service.py +++ b/pms/models/pms_service.py @@ -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: diff --git a/pms/views/pms_reservation_views.xml b/pms/views/pms_reservation_views.xml index b11741830..a804b4270 100644 --- a/pms/views/pms_reservation_views.xml +++ b/pms/views/pms_reservation_views.xml @@ -467,8 +467,16 @@ decoration-success="is_board_service == True" > - - + +