Skip to content

Commit

Permalink
[IMP] [17.0] hotel: Check and Update Test Cases
Browse files Browse the repository at this point in the history
  • Loading branch information
pavan-serpentcs committed Jul 18, 2024
1 parent 4dee427 commit 236a3b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
4 changes: 0 additions & 4 deletions hotel/models/hotel_folio.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,6 @@ def _onchange_partner_id(self):
}
)

# TODO: Need to check action_done
# def action_done(self):
# self.write({"state": "done"})

def action_cancel(self):
"""
@param self: object pointer
Expand Down
11 changes: 6 additions & 5 deletions hotel/tests/test_hotel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ def setUp(self):
self.hotel_folio_line = self.env["hotel.folio.line"]
self.warehouse = self.env.ref("stock.warehouse0")
self.partner = self.env.ref("base.res_partner_2")
self.price_list = self.env.ref("product.list0")
self.room = self.env.ref("hotel.hotel_room_0")
cur_date = datetime.now().strftime("%Y-%m-%d %H:%M:%S")

self.price_list = self.env["product.pricelist"].create(
{
"name": "Test Pricelist",
"currency_id": self.env.ref("base.USD").id,
}
)
self.hotel_folio = self.hotel_folio_obj.create(
{
"name": "Folio/00001",
Expand All @@ -43,7 +48,3 @@ def test_folio_cancel(self):
def test_folio_set_to_draft(self):
self.hotel_folio.action_cancel_draft()
self.assertEqual(self.hotel_folio.state == "draft", True)

def test_set_done(self):
self.hotel_folio.action_done()
self.assertEqual(self.hotel_folio.state == "done", True)
10 changes: 0 additions & 10 deletions hotel/views/hotel_folio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@
type="object"
class="oe_highlight"
/>

<!-- TODO: Need to check button-->
<!-- <button
name="action_done"
type="object"
string="Set to Done"
invisible="state != 'sale'"
class="oe_highlight"
help="If a Hotel Folio is done, you cannot modify it manually anymore. However, you will still be able to invoice or deliver. This is used to freeze the Hotel Folio."
/> -->
<field
name="state"
select="2"
Expand Down

0 comments on commit 236a3b3

Please sign in to comment.