Files
pms/hotel_channel_connector/models/channel_binding/common.py
QS5ELkMu 9c76c0e932 Finalize Calendar & Connector integration (#69)
* [WIP] Refactor calendar_channel_connector

* [FIX] Hotel Calendar + Hotel Connector

* [ADD] Push URLs

* [IMP] Connector

* [IMP] Notifications

* [ADD] hotel_channel_connector_wubook

* [FIX] missing imports

* [IMP] Clean code
2018-11-25 17:38:24 +01:00

24 lines
715 B
Python

# Copyright 2018 Alexandre Díaz <dev@redneboa.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
class ChannelBinding(models.AbstractModel):
_name = 'channel.binding'
_inherit = 'external.binding'
_description = 'Hotel Channel Connector Binding (abstract)'
backend_id = fields.Many2one(
comodel_name='channel.backend',
string='Hotel Channel Connector Backend',
required=True,
ondelete='restrict')
external_id = fields.Char(string='ID on Channel')
_sql_constraints = [
('channel_uniq', 'unique(backend_id, external_id)',
'A binding already exists with the same Channel ID.'),
]