[14.0][ADD] agreement_tier_validation

This commit is contained in:
Kitti U
2022-03-29 10:54:11 +07:00
parent 0766f02db6
commit d78b6787bd
17 changed files with 119 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import agreement
from . import tier_definition

View File

@@ -0,0 +1,13 @@
# Copyright 2022 Ecosoft Co., Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class Agreement(models.Model):
_name = "agreement"
_inherit = ["agreement", "tier.validation"]
_state_from = ["draft"]
_state_to = ["active"]
_tier_validation_manual_config = False

View File

@@ -0,0 +1,14 @@
# Copyright 2022 Ecosoft Co., Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class TierDefinition(models.Model):
_inherit = "tier.definition"
@api.model
def _get_tier_validation_model_names(self):
res = super(TierDefinition, self)._get_tier_validation_model_names()
res.append("agreement")
return res