From e4e39567b64a8ca38b08b947dcf4f20ed0e74cd2 Mon Sep 17 00:00:00 2001 From: Pablo Date: Mon, 18 Feb 2019 19:34:47 +0100 Subject: [PATCH] [FIX] allow custom channel short code on creation --- .../models/hotel_room_type/exporter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hotel_channel_connector_wubook/models/hotel_room_type/exporter.py b/hotel_channel_connector_wubook/models/hotel_room_type/exporter.py index 05d5f6c04..7a9c1e76d 100644 --- a/hotel_channel_connector_wubook/models/hotel_room_type/exporter.py +++ b/hotel_channel_connector_wubook/models/hotel_room_type/exporter.py @@ -47,7 +47,8 @@ class HotelRoomTypeExporter(Component): @api.model def create_room(self, binding): seq_obj = self.env['ir.sequence'] - short_code = seq_obj.next_by_code('hotel.room.type')[:4] + short_code = binding.channel_short_code or \ + seq_obj.next_by_code('hotel.room.type')[:4] try: boards = {} for board in binding.board_service_room_type_ids: