From 2f2ea4e5dfbc201e77e0c32fc88f84d0fc64d4b2 Mon Sep 17 00:00:00 2001 From: Marcel Savegnago Date: Sun, 31 Jul 2022 14:13:25 -0300 Subject: [PATCH] [MIG] account_payment_order_tier_validation: Migration to 12.0 --- account_payment_order_tier_validation/__manifest__.py | 2 +- .../models/account_payment_order.py | 2 -- .../tests/test_payment_order_tier_validation.py | 2 +- .../views/account_payment_order.xml | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/account_payment_order_tier_validation/__manifest__.py b/account_payment_order_tier_validation/__manifest__.py index ca8405b44..1c299f115 100644 --- a/account_payment_order_tier_validation/__manifest__.py +++ b/account_payment_order_tier_validation/__manifest__.py @@ -5,7 +5,7 @@ "name": "Account Payment Order Tier Validation", "summary": """Extends the functionality of Payment Orders to support a tier validation process.""", - "version": "14.0.1.0.0", + "version": "12.0.1.0.0", "license": "AGPL-3", "author": "Escodoo,Odoo Community Association (OCA)", "maintainers": ["marcelsavegnago"], diff --git a/account_payment_order_tier_validation/models/account_payment_order.py b/account_payment_order_tier_validation/models/account_payment_order.py index 5d04973d3..afa4d1964 100644 --- a/account_payment_order_tier_validation/models/account_payment_order.py +++ b/account_payment_order_tier_validation/models/account_payment_order.py @@ -9,5 +9,3 @@ class AccountPaymentOrder(models.Model): _inherit = [_name, "tier.validation"] _state_from = ["draft"] _state_to = ["open"] - - _tier_validation_manual_config = False diff --git a/account_payment_order_tier_validation/tests/test_payment_order_tier_validation.py b/account_payment_order_tier_validation/tests/test_payment_order_tier_validation.py index 90648c73a..f33dd7021 100644 --- a/account_payment_order_tier_validation/tests/test_payment_order_tier_validation.py +++ b/account_payment_order_tier_validation/tests/test_payment_order_tier_validation.py @@ -97,6 +97,6 @@ class TestPaymentOrderTierValidation(common.SavepointCase): with self.assertRaises(ValidationError): po.draft2open() po.request_validation() - po.with_user(self.test_user_1).validate_tier() + po.sudo(self.test_user_1).validate_tier() po.draft2open() self.assertEqual(po.state, "open") diff --git a/account_payment_order_tier_validation/views/account_payment_order.xml b/account_payment_order_tier_validation/views/account_payment_order.xml index 296cd50e0..6df924fdd 100644 --- a/account_payment_order_tier_validation/views/account_payment_order.xml +++ b/account_payment_order_tier_validation/views/account_payment_order.xml @@ -13,7 +13,7 @@ ref="account_payment_order.account_payment_order_form" /> - +