mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms: add test data availability plan in pricelist
This commit is contained in:
@@ -4,9 +4,13 @@ from odoo.tests import common
|
||||
class TestPms(common.SavepointCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.availability_plan1 = self.env["pms.availability.plan"].create(
|
||||
{"name": "Availability Plan 1"}
|
||||
)
|
||||
self.pricelist1 = self.env["product.pricelist"].create(
|
||||
{
|
||||
"name": "Pricelist 1",
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
self.company1 = self.env["res.company"].create(
|
||||
|
||||
@@ -23,6 +23,7 @@ class TestPmsRoomTypeAvailabilityRules(TestPms):
|
||||
(4, self.pms_property1.id),
|
||||
(4, self.pms_property2.id),
|
||||
],
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
# pms.sale.channel
|
||||
|
||||
@@ -41,6 +41,7 @@ class TestPmsMultiproperty(TestPms):
|
||||
(4, self.pms_property1.id),
|
||||
(4, self.pms_property2.id),
|
||||
],
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
self.availability_plan1 = self.env["pms.availability.plan"].create(
|
||||
@@ -200,6 +201,7 @@ class TestPmsMultiproperty(TestPms):
|
||||
(4, self.pms_property1.id),
|
||||
(4, self.pms_property2.id),
|
||||
],
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
# create new room_type
|
||||
@@ -732,6 +734,7 @@ class TestPmsMultiproperty(TestPms):
|
||||
(4, self.pms_property1.id),
|
||||
(4, self.pms_property2.id),
|
||||
],
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
self.room_type1 = self.env["pms.room.type"].create(
|
||||
@@ -872,6 +875,7 @@ class TestPmsMultiproperty(TestPms):
|
||||
(4, self.pms_property2.id),
|
||||
(4, self.pms_property3.id),
|
||||
],
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ class TestPmsPricelist(TestPms):
|
||||
{
|
||||
"name": "pricelist_2",
|
||||
"pms_property_ids": [self.pms_property1.id, self.pms_property2.id],
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
# product.product 1
|
||||
@@ -740,6 +741,7 @@ class TestPmsPricelist(TestPms):
|
||||
"pricelist_type": "daily",
|
||||
"pms_property_ids": tc["pms_property_ids"],
|
||||
"item_ids": [item.id],
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -767,6 +769,7 @@ class TestPmsPricelist(TestPms):
|
||||
"pricelist_type": "daily",
|
||||
"pms_property_ids": [self.pms_property1.id],
|
||||
"item_ids": [item.id],
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
self.assertTrue(self.pricelist_test, "Pricelist not created.")
|
||||
|
||||
@@ -2260,6 +2260,7 @@ class TestPmsReservations(TestPms):
|
||||
"name": "Pricelist Test",
|
||||
"pms_property_ids": [self.pms_property1.id],
|
||||
"cancelation_rule_id": self.cancelation_rule.id,
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
self.host1 = self.env["res.partner"].create(
|
||||
@@ -2314,6 +2315,7 @@ class TestPmsReservations(TestPms):
|
||||
"name": "Pricelist Test",
|
||||
"pms_property_ids": [self.pms_property1.id],
|
||||
"cancelation_rule_id": self.cancelation_rule.id,
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
self.host1 = self.env["res.partner"].create(
|
||||
@@ -2366,6 +2368,7 @@ class TestPmsReservations(TestPms):
|
||||
"name": "Pricelist Test",
|
||||
"pms_property_ids": [self.pms_property1.id],
|
||||
"cancelation_rule_id": self.cancelation_rule.id,
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
self.host1 = self.env["res.partner"].create(
|
||||
|
||||
@@ -681,6 +681,7 @@ class TestPmsWizardMassiveChanges(TestPms):
|
||||
pricelist2 = self.env["product.pricelist"].create(
|
||||
{
|
||||
"name": "test pricelist 2",
|
||||
"availability_plan_id": self.availability_plan1.id,
|
||||
}
|
||||
)
|
||||
expected_pricelists = [self.pricelist1.id, pricelist2.id]
|
||||
|
||||
Reference in New Issue
Block a user