From 979d2b6854b3511e3b59d362b5320da3c3966a07 Mon Sep 17 00:00:00 2001 From: Kevin Khao Date: Sat, 2 Nov 2024 16:04:21 +0200 Subject: [PATCH] [18.0][MIG] account_move_tier_validation_approver: Migration to 18.0 --- .../README.rst | 3 +++ .../__manifest__.py | 2 +- .../readme/CONTRIBUTORS.md | 2 ++ .../static/description/index.html | 4 +++ ...t_account_move_tier_validation_approver.py | 7 +++-- .../views/account_move_views.xml | 3 ++- .../views/res_config_settings_views.xml | 26 +++++-------------- test-requirements.txt | 2 ++ 8 files changed, 24 insertions(+), 25 deletions(-) create mode 100644 test-requirements.txt diff --git a/account_move_tier_validation_approver/README.rst b/account_move_tier_validation_approver/README.rst index b640ea40800..47a689ffdac 100644 --- a/account_move_tier_validation_approver/README.rst +++ b/account_move_tier_validation_approver/README.rst @@ -90,6 +90,9 @@ Contributors - Lois Rilo - Adrià Gil Sorribes +- [360ERP](https://www.360erp.com): + + - Kevin Khao <> Maintainers ----------- diff --git a/account_move_tier_validation_approver/__manifest__.py b/account_move_tier_validation_approver/__manifest__.py index 1379f9367e0..a254f259d78 100644 --- a/account_move_tier_validation_approver/__manifest__.py +++ b/account_move_tier_validation_approver/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Account Move Tier Validation Approver", - "version": "15.0.1.0.0", + "version": "18.0.1.0.1", "author": "ForgeFlow, Odoo Community Association (OCA)", "category": "Accounting", "license": "AGPL-3", diff --git a/account_move_tier_validation_approver/readme/CONTRIBUTORS.md b/account_move_tier_validation_approver/readme/CONTRIBUTORS.md index 690846b7a8a..9d2ecd5477b 100644 --- a/account_move_tier_validation_approver/readme/CONTRIBUTORS.md +++ b/account_move_tier_validation_approver/readme/CONTRIBUTORS.md @@ -1,2 +1,4 @@ - Lois Rilo \<\> - Adrià Gil Sorribes \<\> +- \[360ERP\](): + - Kevin Khao \<\<\>\> diff --git a/account_move_tier_validation_approver/static/description/index.html b/account_move_tier_validation_approver/static/description/index.html index b3527432a93..2748f5de5bf 100644 --- a/account_move_tier_validation_approver/static/description/index.html +++ b/account_move_tier_validation_approver/static/description/index.html @@ -433,6 +433,10 @@

Contributors

diff --git a/account_move_tier_validation_approver/tests/test_account_move_tier_validation_approver.py b/account_move_tier_validation_approver/tests/test_account_move_tier_validation_approver.py index c1b3efae08c..c21602bff36 100644 --- a/account_move_tier_validation_approver/tests/test_account_move_tier_validation_approver.py +++ b/account_move_tier_validation_approver/tests/test_account_move_tier_validation_approver.py @@ -7,14 +7,14 @@ class TestAccountMoveTierValidationApprover(TransactionCase): def setUp(self): - super(TestAccountMoveTierValidationApprover, self).setUp() + super().setUp() self.res_partner_1 = self.env["res.partner"].create( {"name": "Wood Corner", "email": "example@yourcompany.com"} ) self.product_1 = self.env["product.product"].create( {"name": "Desk Combination"} ) - self.currency_euro = self.env["res.currency"].search([("name", "=", "EUR")]) + self.currency_usd = self.env["res.currency"].search([("name", "=", "USD")]) self.test_user_1 = self.env["res.users"].create( {"name": "User", "login": "test1", "email": "example@yourcompany.com"} ) @@ -26,7 +26,7 @@ def setUp(self): { "move_type": "in_invoice", "partner_id": self.res_partner_1.id, - "currency_id": self.currency_euro.id, + "currency_id": self.currency_usd.id, "approver_id": self.test_approver.id, "invoice_line_ids": [ ( @@ -69,7 +69,6 @@ def test_field_validation_approver(self): {"approver_id": self.test_approver.id, "invoice_date": record.date} ) record.with_user(self.test_user_1.id).request_validation() - record.invalidate_cache() record.with_user(self.test_user_1.id).validate_tier() with self.assertRaises(ValidationError): record.action_post() diff --git a/account_move_tier_validation_approver/views/account_move_views.xml b/account_move_tier_validation_approver/views/account_move_views.xml index bc119a6ed82..5f6d2c52b74 100644 --- a/account_move_tier_validation_approver/views/account_move_views.xml +++ b/account_move_tier_validation_approver/views/account_move_views.xml @@ -10,7 +10,8 @@ diff --git a/account_move_tier_validation_approver/views/res_config_settings_views.xml b/account_move_tier_validation_approver/views/res_config_settings_views.xml index 3dff01b7b6e..1ffdb4d527e 100644 --- a/account_move_tier_validation_approver/views/res_config_settings_views.xml +++ b/account_move_tier_validation_approver/views/res_config_settings_views.xml @@ -5,26 +5,14 @@ res.config.settings - -
+ -
- -
-
-
-
+ +
diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000000..9eee3eb208d --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +odoo-addon-base_tier_validation @ git+https://github.com/OCA/server-ux.git@refs/pull/966/head#subdirectory=base_tier_validation +odoo-addon-account_move_tier_validation @ git+https://github.com/OCA/account-invoicing.git@refs/pull/1830/head#subdirectory=account_move_tier_validation