diff --git a/pms/tests/test_pms_checkin_partner.py b/pms/tests/test_pms_checkin_partner.py index e2831699c..9476ad1fb 100644 --- a/pms/tests/test_pms_checkin_partner.py +++ b/pms/tests/test_pms_checkin_partner.py @@ -57,9 +57,13 @@ class TestPmsCheckinPartner(TestPms): "gender": "male", } ) - self.id_category = self.env["res.partner.id_category"].create( - {"name": "DNI", "code": "D"} + self.id_category = self.env["res.partner.id_category"].search( + [("code", "=", "D")] ) + if not self.id_category: + self.id_category = self.env["res.partner.id_category"].create( + {"name": "DNI", "code": "D"} + ) self.env["res.partner.id_number"].create( { "category_id": self.id_category.id, @@ -1609,6 +1613,7 @@ class TestPmsCheckinPartner(TestPms): "partner_id": self.host1.id, "adults": 1, "pms_property_id": self.pms_property1.id, + "sale_channel_origin_id": self.sale_channel_direct1.id, } ) checkin_partner_id = self.reservation.checkin_partner_ids[0] diff --git a/pms/tests/test_pms_folio_invoice.py b/pms/tests/test_pms_folio_invoice.py index e768cd42e..aca3cb831 100644 --- a/pms/tests/test_pms_folio_invoice.py +++ b/pms/tests/test_pms_folio_invoice.py @@ -84,6 +84,14 @@ class TestPmsFolioInvoice(TestPms): } ) + # create a sale channel + self.sale_channel_direct1 = self.env["pms.sale.channel"].create( + { + "name": "Door", + "channel_type": "direct", + } + ) + def create_configuration_accounting_scenario(self): """ Method to simplified scenario to payments and accounting: @@ -135,14 +143,6 @@ class TestPmsFolioInvoice(TestPms): ) journals.allowed_pms_payments = True - # create a sale channel - self.sale_channel_direct1 = self.env["pms.sale.channel"].create( - { - "name": "Door", - "channel_type": "direct", - } - ) - def test_invoice_full_folio(self): """ Check that when launching the create_invoices() method for a full folio, @@ -391,7 +391,6 @@ class TestPmsFolioInvoice(TestPms): "adults": 2, "room_type_id": self.room_type_double.id, "partner_id": self.partner_id.id, - "service_ids": [(6, 0, [self.service1.id])], "sale_channel_origin_id": self.sale_channel_direct1.id, } ) @@ -435,7 +434,6 @@ class TestPmsFolioInvoice(TestPms): "adults": 2, "room_type_id": self.room_type_double.id, "partner_id": self.partner_id.id, - "service_ids": [(6, 0, [self.service1.id])], "sale_channel_origin_id": self.sale_channel_direct1.id, } ) @@ -480,7 +478,6 @@ class TestPmsFolioInvoice(TestPms): "adults": 2, "room_type_id": self.room_type_double.id, "partner_id": self.partner_id.id, - "service_ids": [(6, 0, [self.service1.id])], "sale_channel_origin_id": self.sale_channel_direct1.id, } ) @@ -697,6 +694,7 @@ class TestPmsFolioInvoice(TestPms): "adults": 2, "room_type_id": self.room_type_double.id, "partner_id": self.partner_id.id, + "sale_channel_origin_id": self.sale_channel_direct1.id, } ) @@ -728,6 +726,7 @@ class TestPmsFolioInvoice(TestPms): "adults": 2, "room_type_id": self.room_type_double.id, "partner_id": self.partner_id.id, + "sale_channel_origin_id": self.sale_channel_direct1.id, } ) @@ -799,6 +798,7 @@ class TestPmsFolioInvoice(TestPms): "room_type_id": self.demo_room_type_double.id, "partner_id": self.partner_id.id, "board_service_room_id": self.board_service_room_type1.id, + "sale_channel_origin_id": self.sale_channel_direct1.id, } ) self.service = self.env["pms.service"].create( @@ -896,6 +896,7 @@ class TestPmsFolioInvoice(TestPms): "room_type_id": self.room_type_double.id, "partner_id": self.partner_id.id, "board_service_room_id": self.board_service_room_type1.id, + "sale_channel_origin_id": self.sale_channel_direct1.id, } ) self.service = self.env["pms.service"].create( diff --git a/pms/tests/test_pms_reservation.py b/pms/tests/test_pms_reservation.py index b70160637..4d736e28c 100644 --- a/pms/tests/test_pms_reservation.py +++ b/pms/tests/test_pms_reservation.py @@ -3863,6 +3863,7 @@ class TestPmsReservations(TestPms): "pms_property_id": self.pms_property1.id, "reservation_type": "out", "closure_reason_id": closure_reason, + "sale_channel_origin_id": self.sale_channel_direct.id, } ) # ASSERT