diff --git a/pms/models/pms_folio.py b/pms/models/pms_folio.py index e74dbf3ca..eb309b4f5 100644 --- a/pms/models/pms_folio.py +++ b/pms/models/pms_folio.py @@ -1507,18 +1507,6 @@ class PmsFolio(models.Model): ("sale_line_ids.invoice_lines.move_id", operator, value), ] - # @api.constrains("agency_id", "channel_type_id") - # def _check_only_one_channel(self): - # for record in self: - # if ( - # record.agency_id - # and record.channel_type_id.channel_type - # != record.agency_id.sale_channel_id.channel_type - # ): - # raise models.ValidationError( - # _("The Sale Channel does not correspond to the agency's") - # ) - @api.constrains("name") def _check_required_partner_name(self): for record in self: diff --git a/pms/views/pms_folio_views.xml b/pms/views/pms_folio_views.xml index 61b914f69..9c0d68505 100644 --- a/pms/views/pms_folio_views.xml +++ b/pms/views/pms_folio_views.xml @@ -844,13 +844,6 @@ enable_counters="1" select="multi" /> - - - - - - - diff --git a/pms/views/pms_reservation_views.xml b/pms/views/pms_reservation_views.xml index eeb4a434d..f3c94c2c3 100644 --- a/pms/views/pms_reservation_views.xml +++ b/pms/views/pms_reservation_views.xml @@ -1089,13 +1089,6 @@ icon="fa-bookmark" color="#875A7B" /> - - - - - - - diff --git a/pms/wizards/pms_booking_duplicate.py b/pms/wizards/pms_booking_duplicate.py index ebef08831..95ed191fc 100644 --- a/pms/wizards/pms_booking_duplicate.py +++ b/pms/wizards/pms_booking_duplicate.py @@ -145,7 +145,9 @@ class BookingDuplicate(models.TransientModel): def _compute_channel_type_id(self): for record in self.filtered("reference_folio_id"): if record.reference_folio_id.agency_id == record.agency_id: - record.channel_type_id = record.reference_folio_id.channel_type_id + record.channel_type_id = ( + record.reference_folio_id.sale_channel_origin_id + ) elif record.agency_id: record.channel_type_id = record.agency_id.sale_channel_id.id @@ -301,7 +303,7 @@ class BookingDuplicate(models.TransientModel): "partner_name": self.partner_name, "pms_property_id": self.pms_property_id.id, "agency_id": self.agency_id.id, - "channel_type_id": self.channel_type_id.id, + "sale_channel_origin_id": self.channel_type_id.id, "segmentation_ids": [(6, 0, self.segmentation_ids.ids)], "internal_comment": self.internal_comment, }