Skip to content

Commit

Permalink
[16.0][MIG] hr_personal_equipment_request: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoRomera committed Dec 22, 2022
1 parent 6596964 commit 81a5f29
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
12 changes: 6 additions & 6 deletions hr_personal_equipment_request/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"name": "Hr Personal Equipment Request",
"summary": """
This addon allows to manage employee personal equipment""",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr",
"depends": ["product", "hr", "mail"],
"data": [
"security/hr_personal_equipment_request_security.xml",
"security/ir.model.access.csv",
"views/product_template.xml",
"views/hr_personal_equipment.xml",
"views/hr_personal_equipment_request.xml",
"views/hr_employee.xml",
"views/product_template_views.xml",
"views/hr_personal_equipment_views.xml",
"views/hr_personal_equipment_request_views.xml",
"views/hr_employee_views.xml",
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def setUp(self):
.create(
{
"name": "Personal Equipment Request Test",
"employee_id": self.employee.id,
"line_ids": [(0, 0, line) for line in lines],
}
)
Expand All @@ -71,6 +72,13 @@ def test_request_compute_name(self):
"Personal Equipment Request by Employee Test",
)

def test_request_default_employee(self):
self.assertTrue(self.personal_equipment_request.employee_id)
self.assertEqual(
self.personal_equipment_request.employee_id.id,
self.employee.id,
)

def test_accept_request(self):
self.assertEqual(self.personal_equipment_request.state, "draft")
self.assertEqual(self.personal_equipment_request.line_ids[0].state, "draft")
Expand Down Expand Up @@ -127,5 +135,5 @@ def test_action_open_personal_equipment(self):
self.assertEqual(action["res_model"], "hr.personal.equipment")
self.assertEqual(self.employee.personal_equipment_count, 0)
self.personal_equipment_request.accept_request()
self.personal_equipment_request.refresh()
# self.personal_equipment_request.invalidate_recordset()
self.assertEqual(self.employee.personal_equipment_count, 2)

0 comments on commit 81a5f29

Please sign in to comment.