Fix import otas (#59)

* [WIP] Fix restriction import

* [FIX] Import ota info
This commit is contained in:
QS5ELkMu
2018-11-10 21:51:30 +01:00
committed by GitHub
parent 82bdf1a10d
commit b638413b7c
3 changed files with 2 additions and 2 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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']}