-
-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] base_tier_validation_formula: Migrate to version 17.0
- Loading branch information
sonhd91
committed
Jan 10, 2024
1 parent
416b31b
commit c2499af
Showing
9 changed files
with
27 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from odoo import models | ||
from odoo import fields, models | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = "res.config.settings" | ||
|
||
# Activate me back when modules are migrated | ||
|
||
# module_base_tier_validation_formula = fields.Boolean(string="Tier Formula") | ||
module_base_tier_validation_formula = fields.Boolean(string="Tier Formula") | ||
# module_base_tier_validation_forward = fields.Boolean("Tier Forward & Backward") | ||
# module_base_tier_validation_server_action = fields.Boolean("Tier Server Action") | ||
# module_base_tier_validation_report = fields.Boolean("Tier Reports") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ Base Tier Validation Formula | |
!! source digest: sha256:30cc4c107c35bd82290d5c45d91bed36c8ee05555a66524b8381fa67848c99ba | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
:alt: Mature | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
@@ -78,6 +78,7 @@ Contributors | |
- `Trobz <https://trobz.com>`__: | ||
|
||
- Hoang Diep <[email protected]> | ||
- Son Ho <[email protected]> | ||
|
||
Other credits | ||
------------- | ||
|
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
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 |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
- [Trobz](https://trobz.com): | ||
|
||
> - Hoang Diep \<<[email protected]>\> | ||
> - Son Ho \<<[email protected]>\> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
class TierTierValidation(common.TransactionCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
super(TierTierValidation, cls).setUpClass() | ||
super().setUpClass() | ||
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT)) | ||
cls.loader = FakeModelLoader(cls.env, cls.__module__) | ||
cls.loader.backup_registry() | ||
|
@@ -41,19 +41,9 @@ def setUpClass(cls): | |
} | ||
) | ||
|
||
cls.test_user_1 = cls.env.ref("base.user_admin") | ||
cls.test_user_2 = cls.env.ref("base.user_demo") | ||
# Create users: | ||
group_ids = cls.env.ref("base.group_system").ids | ||
cls.test_user_1 = cls.env["res.users"].create( | ||
{ | ||
"name": "John", | ||
"login": "test1", | ||
"groups_id": [(6, 0, group_ids)], | ||
"email": "[email protected]", | ||
} | ||
) | ||
cls.test_user_2 = cls.env["res.users"].create( | ||
{"name": "Mike", "login": "test2", "email": "[email protected]"} | ||
) | ||
cls.test_user_3 = cls.env["res.users"].create( | ||
{"name": "Mary", "login": "test3", "email": "[email protected]"} | ||
) | ||
|
@@ -74,7 +64,7 @@ def setUpClass(cls): | |
@classmethod | ||
def tearDownClass(cls): | ||
cls.loader.restore_registry() | ||
return super(TierTierValidation, cls).tearDownClass() | ||
return super().tearDownClass() | ||
|
||
def test_01_reviewer_from_python_expression(self): | ||
tier_definition = self.tier_def_obj.create( | ||
|
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