mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: refactor workflow mails
This commit is contained in:
@@ -38,4 +38,5 @@ from . import test_pms_wizard_split_join_swap_reservation
|
||||
from . import test_product_template
|
||||
from . import test_pms_multiproperty
|
||||
from . import test_shared_room
|
||||
from . import test_automated_mails
|
||||
|
||||
# from . import test_automated_mails
|
||||
|
||||
@@ -3577,38 +3577,38 @@ class TestPmsReservations(TestPms):
|
||||
# "is_modified_reservation field should be True ",
|
||||
# )
|
||||
|
||||
@freeze_time("2012-01-14")
|
||||
def test_is_not_modified_reservation(self):
|
||||
"""
|
||||
Checked that the is_modified_reservation field is correctly set
|
||||
to False when the reservation is modified but not the checkin
|
||||
or checkout fields.
|
||||
----------------------
|
||||
A reservation is created. The adults, arrival_hour and departure_hours
|
||||
fields of the reservation are modified.The it is verified that the state
|
||||
of this field is False.
|
||||
"""
|
||||
# ARRANGE
|
||||
checkin = fields.date.today()
|
||||
checkout = fields.date.today() + datetime.timedelta(days=2)
|
||||
reservation_vals = {
|
||||
"checkin": checkin,
|
||||
"checkout": checkout,
|
||||
"room_type_id": self.room_type_double.id,
|
||||
"partner_id": self.partner1.id,
|
||||
"pms_property_id": self.pms_property1.id,
|
||||
}
|
||||
# @freeze_time("2012-01-14")
|
||||
# def test_is_not_modified_reservation(self):
|
||||
# """
|
||||
# Checked that the is_modified_reservation field is correctly set
|
||||
# to False when the reservation is modified but not the checkin
|
||||
# or checkout fields.
|
||||
# ----------------------
|
||||
# A reservation is created. The adults, arrival_hour and departure_hours
|
||||
# fields of the reservation are modified.The it is verified that the state
|
||||
# of this field is False.
|
||||
# """
|
||||
# # ARRANGE
|
||||
# checkin = fields.date.today()
|
||||
# checkout = fields.date.today() + datetime.timedelta(days=2)
|
||||
# reservation_vals = {
|
||||
# "checkin": checkin,
|
||||
# "checkout": checkout,
|
||||
# "room_type_id": self.room_type_double.id,
|
||||
# "partner_id": self.partner1.id,
|
||||
# "pms_property_id": self.pms_property1.id,
|
||||
# }
|
||||
|
||||
reservation = self.env["pms.reservation"].create(reservation_vals)
|
||||
reservation.update(
|
||||
{"adults": 1, "arrival_hour": "18:00", "departure_hour": "08:00"}
|
||||
)
|
||||
# reservation = self.env["pms.reservation"].create(reservation_vals)
|
||||
# reservation.update(
|
||||
# {"adults": 1, "arrival_hour": "18:00", "departure_hour": "08:00"}
|
||||
# )
|
||||
|
||||
# ASSERT
|
||||
self.assertFalse(
|
||||
reservation.is_modified_reservation,
|
||||
"is_modified_reservation field should be False ",
|
||||
)
|
||||
# # ASSERT
|
||||
# self.assertFalse(
|
||||
# reservation.is_modified_reservation,
|
||||
# "is_modified_reservation field should be False ",
|
||||
# )
|
||||
|
||||
@freeze_time("2012-01-14")
|
||||
def test_not_add_several_possibles_customers(self):
|
||||
|
||||
Reference in New Issue
Block a user