Skip to content

Commit

Permalink
[IMP][17.0] hotel_housekeeping: Update test cases and resolve precomm…
Browse files Browse the repository at this point in the history
…it errors
  • Loading branch information
pavan-serpentcs committed Jul 19, 2024
1 parent a99415a commit fbd910d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions hotel_housekeeping/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Hotel Housekeeping Management
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a49b3446078e10ada9704eb0873a889d44ae5c72b637cd241799b4e757fe2c67
!! source digest: sha256:7c2aab9b74f8f7a835eaafe02a23958a36414c0d15b685afeaa6535d420ba558
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -78,7 +78,7 @@ Credits
Authors
-------

* Serpent Consulting Services Pvt. Ltd.
* Serpent Consulting Services Pvt. Ltd.
* Odoo S.A.

Contributors
Expand Down
5 changes: 3 additions & 2 deletions hotel_housekeeping/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
{
"name": "Hotel Housekeeping Management",
"version": "17.0.1.0.0",
"author": """Odoo Community Association (OCA), Serpent Consulting
Services Pvt. Ltd., Odoo S.A.""",
"author": """Odoo Community Association (OCA),
Serpent Consulting Services Pvt. Ltd.,
Odoo S.A.""",
"website": "https://github.com/OCA/vertical-hotel",
"license": "AGPL-3",
"summary": "Manages Housekeeping Activities and its Process",
Expand Down
6 changes: 2 additions & 4 deletions hotel_housekeeping/models/hotel_housekeeping.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,5 @@ def check_end_date_time(self):
and record.inspect_date_time <= activity_line_ids.clean_end_time
):
raise ValidationError(
"Inspect Date Time must be Greter, then Clean end time"
)


_("Inspect Date Time must be Greter, then Clean end time")
)
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ def _name_search(self, name, domain=None, operator="ilike", limit=None, order=No
if not domain:
domain = []
if name:
# Be sure name_search is symetric to name_get
# Be sure name_search is symmetric to name_get
category_names = name.split(" / ")
parents = list(category_names)
child = parents.pop()
domain = [("name", operator, child)]
if parents:
names_ids = self.name_search(
" / ".join(parents),
domain=domain,
operator="ilike",
limit=limit,
)
Expand Down
4 changes: 2 additions & 2 deletions hotel_housekeeping/tests/test_hotel_housekeeping.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def setUp(self):
}
)

self.hotel_act_type.name_get()
self.hotel_act_type._compute_display_name()
hotel_activity_type = self.hotel_act_type_obj.name_search("Test Room Activity")
self.assertEqual(
len(hotel_activity_type),
Expand All @@ -67,7 +67,7 @@ def test_name_search(self):
"name": "Test",
}
)
self.env["hotel.housekeeping.activity.type"].name_search(
self.env["hotel.housekeeping.activity.type"]._name_search(
"All Activities / Test Room Activity", [], "not like", None
)

Expand Down

0 comments on commit fbd910d

Please sign in to comment.