Merge branch '11.0' of https://github.com/hootel/hootel into pr_sharedroom

This commit is contained in:
Dario Lodeiros
2019-05-13 10:10:21 +02:00

View File

@@ -188,7 +188,7 @@ class HotelReservation(models.Model):
@api.model
def create(self, vals):
from_channel = False
if 'channel_bind_ids' in vals and vals.get('channel_bind_ids')[0][2] and \
if vals.get('channel_bind_ids') and vals.get('channel_bind_ids')[0][2] and \
vals.get('channel_bind_ids')[0][2].get('external_id') is not None:
vals.update({'preconfirm': False})
from_channel = True