-
-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] hr_personal_equipment_request_tier_validation: Migration to 16.0
- Loading branch information
1 parent
0502d28
commit 9a15077
Showing
6 changed files
with
63 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
hr_personal_equipment_request_tier_validation/readme/USAGE.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This module depends on the module base_tier_validation. To use this module, you need to: | ||
1. Go to Settings > Technical > Tier Validation > Tier Definition | ||
2. Create a new tier definition with the Referenced Model set to hr.personal.equipment.request | ||
3. Go to Employees > Personal Equipment > Personal Equipment Request | ||
4. Create a new personal equipment request and add a tier validation by clickin "Request Validation" button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
hr_personal_equipment_request_tier_validation/tests/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import test_tier_definition |
20 changes: 20 additions & 0 deletions
20
hr_personal_equipment_request_tier_validation/tests/test_tier_definition.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2024 Dixmit | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestTierDefinition(TransactionCase): | ||
def setUp(self): | ||
super().setUp() | ||
|
||
self.tier_definition = self.env["tier.definition"].create( | ||
{ | ||
"name": "Test Tier Definition", | ||
} | ||
) | ||
|
||
def test_get_tier_validation_model_names(self): | ||
model_names = self.tier_definition._get_tier_validation_model_names() | ||
|
||
self.assertIn("hr.personal.equipment.request", model_names) |