mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
Fix import otas (#59)
* [WIP] Fix restriction import * [FIX] Import ota info
This commit is contained in:
@@ -497,7 +497,7 @@ class WuBookAdapter(AbstractComponent):
|
||||
self._session_info[1],
|
||||
fields.Date.from_string(date_from).strftime(DEFAULT_WUBOOK_DATE_FORMAT),
|
||||
fields.Date.from_string(date_to).strftime(DEFAULT_WUBOOK_DATE_FORMAT),
|
||||
channel_restriction_plan_id)
|
||||
int(channel_restriction_plan_id))
|
||||
if rcode != 0:
|
||||
raise ChannelConnectorError("Can't fetch restriction plans from wubook", {
|
||||
'message': results,
|
||||
|
||||
@@ -23,6 +23,7 @@ class ChannelOtaInfoImporter(Component):
|
||||
channel_ota_info_obj = self.env['channel.ota.info']
|
||||
ota_info_mapper = self.component(usage='import.mapper',
|
||||
model_name='channel.ota.info')
|
||||
count = 0
|
||||
for ota_id in results.keys():
|
||||
vals = {
|
||||
'id': ota_id,
|
||||
|
||||
@@ -99,7 +99,6 @@ class HotelRoomTypeRestrictionItemImportMapper(Component):
|
||||
def channel_pushed(self, record):
|
||||
return {'channel_pushed': True}
|
||||
|
||||
|
||||
@mapping
|
||||
def room_type_id(self, record):
|
||||
return {'room_type_id': record['room_type_id']}
|
||||
|
||||
Reference in New Issue
Block a user