mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] pms-api-rest: remove services when no board service @ udpate reservation service
This commit is contained in:
committed by
Darío Lodeiros
parent
f0afab95ef
commit
09dfb8ab6e
@@ -206,9 +206,12 @@ class PmsReservationService(Component):
|
||||
reservation_vals = self._create_vals_from_params(
|
||||
reservation_vals, reservation_data
|
||||
)
|
||||
if reservation_data.boardServiceId == 0:
|
||||
reservation.service_ids.filtered(lambda x: x.is_board_service).unlink()
|
||||
if reservation_vals:
|
||||
reservation.write(reservation_vals)
|
||||
|
||||
|
||||
def _get_reservation_lines_mapped(self, origin_data, reservation_line=False):
|
||||
# Return dict witch reservation.lines values (only modified if line exist,
|
||||
# or all pass values if line not exist)
|
||||
|
||||
Reference in New Issue
Block a user