Lois Rilo
7 years ago
committed by
Naglis Jonaitis
No known key found for this signature in database
GPG Key ID: 4748835F585390F5
7 changed files with
4 additions and
10 deletions
-
base_tier_validation/README.rst
-
base_tier_validation/__init__.py
-
base_tier_validation/__manifest__.py
-
base_tier_validation/models/__init__.py
-
base_tier_validation/models/tier_definition.py
-
base_tier_validation/models/tier_review.py
-
base_tier_validation/models/tier_validation.py
|
@ -27,7 +27,7 @@ To configure this module, you need to: |
|
|
|
|
|
|
|
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas |
|
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas |
|
|
:alt: Try me on Runbot |
|
|
:alt: Try me on Runbot |
|
|
:target: https://runbot.odoo-community.org/runbot/149/10.0 |
|
|
|
|
|
|
|
|
:target: https://runbot.odoo-community.org/runbot/250/11.0 |
|
|
|
|
|
|
|
|
Known issues / Roadmap |
|
|
Known issues / Roadmap |
|
|
====================== |
|
|
====================== |
|
|
|
@ -1,4 +1,3 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
from . import models |
|
|
from . import models |
|
@ -1,12 +1,11 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
{ |
|
|
{ |
|
|
"name": "Base Tier Validation", |
|
|
"name": "Base Tier Validation", |
|
|
"summary": "Implement a validation process based on tiers.", |
|
|
"summary": "Implement a validation process based on tiers.", |
|
|
"version": "10.0.1.0.0", |
|
|
|
|
|
|
|
|
"version": "11.0.1.0.0", |
|
|
"category": "Tools", |
|
|
"category": "Tools", |
|
|
"website": "https://github.com/OCA/server-tools", |
|
|
|
|
|
|
|
|
"website": "https://github.com/OCA/server-ux", |
|
|
"author": "Eficent, Odoo Community Association (OCA)", |
|
|
"author": "Eficent, Odoo Community Association (OCA)", |
|
|
"license": "AGPL-3", |
|
|
"license": "AGPL-3", |
|
|
"application": False, |
|
|
"application": False, |
|
|
|
@ -1,4 +1,3 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
from . import tier_definition |
|
|
from . import tier_definition |
|
|
|
@ -1,4 +1,3 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
|
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
@ -90,7 +89,7 @@ class TierValidation(models.AbstractModel): |
|
|
def evaluate_tier(self, tier): |
|
|
def evaluate_tier(self, tier): |
|
|
try: |
|
|
try: |
|
|
res = safe_eval(tier.python_code, globals_dict={'rec': self}) |
|
|
res = safe_eval(tier.python_code, globals_dict={'rec': self}) |
|
|
except Exception, error: |
|
|
|
|
|
|
|
|
except Exception as error: |
|
|
raise UserError(_( |
|
|
raise UserError(_( |
|
|
"Error evaluating tier validation conditions.\n %s") % error) |
|
|
"Error evaluating tier validation conditions.\n %s") % error) |
|
|
return res |
|
|
return res |
|
|