From 4b1915543390198adfae545b1b56f3dc8b07d29e Mon Sep 17 00:00:00 2001 From: Kevin Khao Date: Sat, 2 Nov 2024 15:11:41 +0200 Subject: [PATCH] [18.0][MIG] account_move_tier_validation: Migration to 18.0 --- account_move_tier_validation/README.rst | 3 +++ account_move_tier_validation/__manifest__.py | 2 +- account_move_tier_validation/models/account_move.py | 2 +- account_move_tier_validation/readme/CONTRIBUTORS.md | 2 ++ .../static/description/index.html | 4 ++++ .../tests/test_tier_validation.py | 10 +++++----- test-requirements.txt | 1 + 7 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 test-requirements.txt diff --git a/account_move_tier_validation/README.rst b/account_move_tier_validation/README.rst index 9ba0e0b62692..e31e0d786e21 100644 --- a/account_move_tier_validation/README.rst +++ b/account_move_tier_validation/README.rst @@ -92,6 +92,9 @@ Contributors - Odoo Perú - Tharathip Chaweewongphan +- `360ERP `__: + + - Kevin Khao Maintainers ----------- diff --git a/account_move_tier_validation/__manifest__.py b/account_move_tier_validation/__manifest__.py index 09a8c76c5d98..4639874e38c8 100644 --- a/account_move_tier_validation/__manifest__.py +++ b/account_move_tier_validation/__manifest__.py @@ -4,7 +4,7 @@ "name": "Account Move Tier Validation", "summary": "Extends the functionality of Account Moves to " "support a tier validation process.", - "version": "16.0.1.0.1", + "version": "18.0.1.0.1", "category": "Accounts", "website": "https://github.com/OCA/account-invoicing", "author": "PESOL, Odoo Community Association (OCA)", diff --git a/account_move_tier_validation/models/account_move.py b/account_move_tier_validation/models/account_move.py index 76489a6209c7..aed37b56a0f5 100644 --- a/account_move_tier_validation/models/account_move.py +++ b/account_move_tier_validation/models/account_move.py @@ -23,7 +23,7 @@ def _get_under_validation_exceptions(self): return super()._get_under_validation_exceptions() + ["needed_terms_dirty"] def _get_to_validate_message_name(self): - name = super(AccountMove, self)._get_to_validate_message_name() + name = super()._get_to_validate_message_name() if self.move_type == "in_invoice": name = _("Bill") elif self.move_type == "in_refund": diff --git a/account_move_tier_validation/readme/CONTRIBUTORS.md b/account_move_tier_validation/readme/CONTRIBUTORS.md index f65685503f3a..96085eaed645 100644 --- a/account_move_tier_validation/readme/CONTRIBUTORS.md +++ b/account_move_tier_validation/readme/CONTRIBUTORS.md @@ -1,2 +1,4 @@ - Odoo Perú \<\> - Tharathip Chaweewongphan \<\> +- [360ERP](https://www.360erp.com): + - Kevin Khao <> diff --git a/account_move_tier_validation/static/description/index.html b/account_move_tier_validation/static/description/index.html index a833187416a8..3197502a1890 100644 --- a/account_move_tier_validation/static/description/index.html +++ b/account_move_tier_validation/static/description/index.html @@ -440,6 +440,10 @@

Contributors

diff --git a/account_move_tier_validation/tests/test_tier_validation.py b/account_move_tier_validation/tests/test_tier_validation.py index fffec68af42b..a17ddd78dea5 100644 --- a/account_move_tier_validation/tests/test_tier_validation.py +++ b/account_move_tier_validation/tests/test_tier_validation.py @@ -3,12 +3,12 @@ from odoo import _, fields from odoo.exceptions import ValidationError -from odoo.tests import common -from odoo.tests.common import tagged +from odoo.tests import Form +from odoo.tests.common import TransactionCase, tagged @tagged("post_install", "-at_install") -class TestAccountTierValidation(common.TransactionCase): +class TestAccountTierValidation(TransactionCase): def test_01_tier_definition_models(self): res = self.env["tier.definition"]._get_tier_validation_model_names() self.assertIn("account.move", res) @@ -20,10 +20,10 @@ def test_02_form(self): "model_id": self.env["ir.model"] .search([("model", "=", "account.move")]) .id, - "definition_domain": "[('move_type', '=', '%s')]" % _type, + "definition_domain": f"[('move_type', '=', '{_type}')]", } ) - with common.Form( + with Form( self.env["account.move"].with_context(default_move_type=_type) ) as form: form.save() diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000000000000..5ee76db4f59f --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-base_tier_validation @ git+https://github.com/OCA/server-ux.git@refs/pull/966/head#subdirectory=base_tier_validation