This SO needs to be
+ style="margin-bottom:0px;"
+ >
+
This SO needs to be
validated.
-
-
-
+
+
+
-
-
Operation has been validated!
+
+
Operation has been validated!
-
-
Operation has been rejected.
+
+
Operation has been rejected.
-
+
-
sale.order.select - sale_tier_validationsale.order
-
+
-
-
+
+
-
From c2dc5181407ca1d1679beaa095a94388ee462af3 Mon Sep 17 00:00:00 2001
From: Sergio Teruel
Date: Mon, 25 May 2020 15:57:44 +0200
Subject: [PATCH 08/55] [MIG] sale_tier_validation: Migration to v13.0
---
sale_tier_validation/README.rst | 70 ++-
sale_tier_validation/__manifest__.py | 6 +-
sale_tier_validation/i18n/es.po | 19 +-
.../i18n/sale_tier_validation.pot | 12 +-
.../models/tier_definition.py | 2 +-
sale_tier_validation/readme/CONFIGURE.rst | 4 +
sale_tier_validation/readme/CONTRIBUTORS.rst | 5 +
sale_tier_validation/readme/DESCRIPTION.rst | 2 +
sale_tier_validation/readme/INSTALL.rst | 2 +
sale_tier_validation/readme/USAGE.rst | 14 +
.../static/description/index.html | 458 ++++++++++++++++++
sale_tier_validation/tests/__init__.py | 2 +
.../tests/test_tier_validation.py | 71 +++
13 files changed, 623 insertions(+), 44 deletions(-)
create mode 100644 sale_tier_validation/readme/CONFIGURE.rst
create mode 100644 sale_tier_validation/readme/CONTRIBUTORS.rst
create mode 100644 sale_tier_validation/readme/DESCRIPTION.rst
create mode 100644 sale_tier_validation/readme/INSTALL.rst
create mode 100644 sale_tier_validation/readme/USAGE.rst
create mode 100644 sale_tier_validation/static/description/index.html
create mode 100644 sale_tier_validation/tests/__init__.py
create mode 100644 sale_tier_validation/tests/test_tier_validation.py
diff --git a/sale_tier_validation/README.rst b/sale_tier_validation/README.rst
index 612adc6b9..13d2815ff 100644
--- a/sale_tier_validation/README.rst
+++ b/sale_tier_validation/README.rst
@@ -1,14 +1,38 @@
-.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
- :target: https://www.gnu.org/licenses/agpl
- :alt: License: AGPL-3
-
====================
Sale Tier Validation
====================
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
+ :target: https://odoo-community.org/page/development-status
+ :alt: Beta
+.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
+ :target: https://github.com/OCA/sale-workflow/tree/13.0/sale_tier_validation
+ :alt: OCA/sale-workflow
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_tier_validation
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/167/13.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
This module extends the functionality of Sale Orders to support a tier
validation process.
+**Table of contents**
+
+.. contents::
+ :local:
+
Installation
============
@@ -41,44 +65,46 @@ Additional features:
be generated) can directly do the operation, this is, there is no need for
her/him to request a validation.
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/142/12.0
-
Bug Tracker
===========
-Bugs are tracked on `GitHub Issues
-`_. In case of trouble, please
-check there if your issue has already been reported. If you spotted it first,
-help us smash it by providing detailed and welcomed feedback.
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+`feedback `_.
+
+Do not contact contributors directly about support or help with technical issues.
Credits
=======
-Images
-------
+Authors
+~~~~~~~
-* Odoo Community Association: `Icon `_.
+* Open Source Integrators
Contributors
-------------
+~~~~~~~~~~~~
* Mayank Gosai
-Do not contact contributors directly about support or help with technical issues.
+* `Tecnativa `__:
+
+ * Sergio Teruel
-Maintainer
-----------
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
-This module is maintained by the OCA.
-
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-To contribute to this module, please visit https://odoo-community.org.
+This module is part of the `OCA/sale-workflow `_ project on GitHub.
+
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/sale_tier_validation/__manifest__.py b/sale_tier_validation/__manifest__.py
index 0a9cd2602..10af69080 100644
--- a/sale_tier_validation/__manifest__.py
+++ b/sale_tier_validation/__manifest__.py
@@ -4,13 +4,13 @@
"name": "Sale Tier Validation",
"summary": "Extends the functionality of Sale Orders to "
"support a tier validation process.",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.0",
"category": "Sale",
"website": "https://github.com/OCA/sale-workflow",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
- "depends": ["sale", "base_tier_validation",],
- "data": ["views/sale_order_view.xml",],
+ "depends": ["sale", "base_tier_validation"],
+ "data": ["views/sale_order_view.xml"],
}
diff --git a/sale_tier_validation/i18n/es.po b/sale_tier_validation/i18n/es.po
index bb6ff5514..c8b50a2e0 100644
--- a/sale_tier_validation/i18n/es.po
+++ b/sale_tier_validation/i18n/es.po
@@ -6,15 +6,17 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-05-25 14:07+0000\n"
+"PO-Revision-Date: \n"
"Last-Translator: Enric Tobella \n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
+"Content-Transfer-Encoding: 8bit\n"
"SO-Revision-Date: 2019-05-08 12:03+0000\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.5.1\n"
+"X-Generator: Poedit 2.0.6\n"
#. module: sale_tier_validation
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form_tier
@@ -37,10 +39,8 @@ msgstr "La operación ha sido validada!"
#. module: sale_tier_validation
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
-#, fuzzy
-#| msgid "My sales to review"
msgid "My Sales to review"
-msgstr "Mis Compras a revisar"
+msgstr "Mis ventas a revisar"
#. module: sale_tier_validation
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
@@ -69,10 +69,8 @@ msgstr "SOs validadas y preparadas para ser confirmadas"
#. module: sale_tier_validation
#: model:ir.model,name:sale_tier_validation.model_sale_order
-#, fuzzy
-#| msgid "sale Order"
-msgid "Sale Order"
-msgstr "Orden de Compra"
+msgid "Sales Order"
+msgstr "Pedidos"
#. module: sale_tier_validation
#: model:ir.model,name:sale_tier_validation.model_tier_definition
@@ -90,6 +88,3 @@ msgstr "Validar"
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
msgid "Validated"
msgstr "Validada"
-
-#~ msgid "Reviews"
-#~ msgstr "Revisiones"
diff --git a/sale_tier_validation/i18n/sale_tier_validation.pot b/sale_tier_validation/i18n/sale_tier_validation.pot
index 3463ab2f8..a69ddf42d 100644
--- a/sale_tier_validation/i18n/sale_tier_validation.pot
+++ b/sale_tier_validation/i18n/sale_tier_validation.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * sale_tier_validation
+# * sale_tier_validation
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -15,7 +15,8 @@ msgstr ""
#. module: sale_tier_validation
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form_tier
-msgid "This SO needs to be\n"
+msgid ""
+"This SO needs to be\n"
" validated."
msgstr ""
@@ -61,7 +62,7 @@ msgstr ""
#. module: sale_tier_validation
#: model:ir.model,name:sale_tier_validation.model_sale_order
-msgid "Sale Order"
+msgid "Sales Order"
msgstr ""
#. module: sale_tier_validation
@@ -78,4 +79,3 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
msgid "Validated"
msgstr ""
-
diff --git a/sale_tier_validation/models/tier_definition.py b/sale_tier_validation/models/tier_definition.py
index e289fddc9..f08a2a966 100644
--- a/sale_tier_validation/models/tier_definition.py
+++ b/sale_tier_validation/models/tier_definition.py
@@ -9,6 +9,6 @@ class TierDefinition(models.Model):
@api.model
def _get_tier_validation_model_names(self):
- res = super(TierDefinition, self)._get_tier_validation_model_names()
+ res = super()._get_tier_validation_model_names()
res.append("sale.order")
return res
diff --git a/sale_tier_validation/readme/CONFIGURE.rst b/sale_tier_validation/readme/CONFIGURE.rst
new file mode 100644
index 000000000..c1a5a4001
--- /dev/null
+++ b/sale_tier_validation/readme/CONFIGURE.rst
@@ -0,0 +1,4 @@
+To configure this module, you need to:
+
+#. Go to *Settings > Technical > Tier Validations > Tier Definition*.
+#. Create as many tiers as you want for Sale Order model.
diff --git a/sale_tier_validation/readme/CONTRIBUTORS.rst b/sale_tier_validation/readme/CONTRIBUTORS.rst
new file mode 100644
index 000000000..39113c1d8
--- /dev/null
+++ b/sale_tier_validation/readme/CONTRIBUTORS.rst
@@ -0,0 +1,5 @@
+* Mayank Gosai
+
+* `Tecnativa `__:
+
+ * Sergio Teruel
diff --git a/sale_tier_validation/readme/DESCRIPTION.rst b/sale_tier_validation/readme/DESCRIPTION.rst
new file mode 100644
index 000000000..9333ac3bd
--- /dev/null
+++ b/sale_tier_validation/readme/DESCRIPTION.rst
@@ -0,0 +1,2 @@
+This module extends the functionality of Sale Orders to support a tier
+validation process.
diff --git a/sale_tier_validation/readme/INSTALL.rst b/sale_tier_validation/readme/INSTALL.rst
new file mode 100644
index 000000000..638fbd2d6
--- /dev/null
+++ b/sale_tier_validation/readme/INSTALL.rst
@@ -0,0 +1,2 @@
+This module depends on ``base_tier_validation``. You can find it at
+`OCA/server-ux `_
diff --git a/sale_tier_validation/readme/USAGE.rst b/sale_tier_validation/readme/USAGE.rst
new file mode 100644
index 000000000..a661117e7
--- /dev/null
+++ b/sale_tier_validation/readme/USAGE.rst
@@ -0,0 +1,14 @@
+To use this module, you need to:
+
+#. Create a Sale Order triggering at least one "Tier Definition".
+#. Click on *Request Validation* button.
+#. Under the tab *Reviews* have a look to pending reviews and their statuses.
+#. Once all reviews are validated click on *Confirm Order*.
+
+Additional features:
+
+* You can filter the SOs requesting your review through the filter *Needs my
+ Review*.
+* User with rights to confirm the SO (validate all tiers that would
+ be generated) can directly do the operation, this is, there is no need for
+ her/him to request a validation.
diff --git a/sale_tier_validation/static/description/index.html b/sale_tier_validation/static/description/index.html
new file mode 100644
index 000000000..6e533dd30
--- /dev/null
+++ b/sale_tier_validation/static/description/index.html
@@ -0,0 +1,458 @@
+
+
+
+
+
+
+Sale Tier Validation
+
+
+
+
+
Sale Tier Validation
+
+
+
+
This module extends the functionality of Sale Orders to support a tier
+validation process.
Create a Sale Order triggering at least one “Tier Definition”.
+
Click on Request Validation button.
+
Under the tab Reviews have a look to pending reviews and their statuses.
+
Once all reviews are validated click on Confirm Order.
+
+
Additional features:
+
+
You can filter the SOs requesting your review through the filter Needs my
+Review.
+
User with rights to confirm the SO (validate all tiers that would
+be generated) can directly do the operation, this is, there is no need for
+her/him to request a validation.
Bugs are tracked on GitHub Issues.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+feedback.
+
Do not contact contributors directly about support or help with technical issues.
OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
The sales order, when moved to the state sent, will still
+send the email even if the validation is not approved by the
+corresponding tier. Code to consider this particular case is
+not developed.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
@@ -425,15 +435,15 @@
The sales order, when moved to the state sent, will still send the
email even if the validation is not approved by the corresponding
@@ -435,7 +440,7 @@
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
@@ -443,15 +448,15 @@
From 9acc4e90398efca186c7c241834c5109d8e93ddc Mon Sep 17 00:00:00 2001
From: Kiril Vangelovski
Date: Tue, 7 Jul 2026 14:58:19 +0200
Subject: [PATCH 49/55] [IMP] sale_tier_validation: pre-commit auto fixes
---
sale_tier_validation/README.rst | 16 ++++++++--------
sale_tier_validation/__manifest__.py | 2 +-
.../static/description/index.html | 8 ++++----
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/sale_tier_validation/README.rst b/sale_tier_validation/README.rst
index 16681b53b..cf67d1796 100644
--- a/sale_tier_validation/README.rst
+++ b/sale_tier_validation/README.rst
@@ -20,14 +20,14 @@ Sale Tier Validation
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
-.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
- :target: https://github.com/OCA/sale-workflow/tree/18.0/sale_tier_validation
- :alt: OCA/sale-workflow
+.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftier--validation-lightgray.png?logo=github
+ :target: https://github.com/OCA/tier-validation/tree/19.0/sale_tier_validation
+ :alt: OCA/tier-validation
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_tier_validation
+ :target: https://translation.odoo-community.org/projects/tier-validation-19-0/tier-validation-19-0-sale_tier_validation
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
- :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/tier-validation&target_branch=19.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -90,10 +90,10 @@ Known issues / Roadmap
Bug Tracker
===========
-Bugs are tracked on `GitHub Issues `_.
+Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -132,6 +132,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/sale-workflow `_ project on GitHub.
+This module is part of the `OCA/tier-validation `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/sale_tier_validation/__manifest__.py b/sale_tier_validation/__manifest__.py
index f2c0ac2b0..61ac4c15e 100644
--- a/sale_tier_validation/__manifest__.py
+++ b/sale_tier_validation/__manifest__.py
@@ -6,7 +6,7 @@
"support a tier validation process.",
"version": "18.0.1.1.0",
"category": "Sale",
- "website": "https://github.com/OCA/sale-workflow",
+ "website": "https://github.com/OCA/tier-validation",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
diff --git a/sale_tier_validation/static/description/index.html b/sale_tier_validation/static/description/index.html
index f87a3c7c9..afed0bb84 100644
--- a/sale_tier_validation/static/description/index.html
+++ b/sale_tier_validation/static/description/index.html
@@ -374,7 +374,7 @@
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-feedback.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
From 810584fa6bda94c1b707476a9eea190d16b3a07a Mon Sep 17 00:00:00 2001
From: Kiril Vangelovski
Date: Tue, 7 Jul 2026 16:23:29 +0200
Subject: [PATCH 50/55] [MIG] sale_tier_validation: Migration to 19.0
---
sale_tier_validation/__manifest__.py | 2 +-
sale_tier_validation/reports/sale_report.py | 10 +++++++---
sale_tier_validation/tests/test_tier_validation.py | 2 +-
sale_tier_validation/views/sale_order_view.xml | 2 +-
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/sale_tier_validation/__manifest__.py b/sale_tier_validation/__manifest__.py
index 61ac4c15e..285e16771 100644
--- a/sale_tier_validation/__manifest__.py
+++ b/sale_tier_validation/__manifest__.py
@@ -4,7 +4,7 @@
"name": "Sale Tier Validation",
"summary": "Extends the functionality of Sale Orders to "
"support a tier validation process.",
- "version": "18.0.1.1.0",
+ "version": "19.0.1.0.0",
"category": "Sale",
"website": "https://github.com/OCA/tier-validation",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
diff --git a/sale_tier_validation/reports/sale_report.py b/sale_tier_validation/reports/sale_report.py
index 4fcbfd739..6939d09b4 100644
--- a/sale_tier_validation/reports/sale_report.py
+++ b/sale_tier_validation/reports/sale_report.py
@@ -1,7 +1,7 @@
# Copyright 2024 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo import _, api, models
+from odoo import api, models
from odoo.exceptions import UserError
@@ -15,9 +15,13 @@ def _get_report_values(self, docids, data=None):
for order in docs:
if not order.company_id.sale_report_print_block:
continue
- if order.need_validation or (order.review_ids and not order.validated):
+ if order.need_validation or (
+ order.review_ids and order.validation_status != "validated"
+ ):
raise UserError(
- _("Quotation printing is blocked until the order is approved.")
+ self.env._(
+ "Quotation printing is blocked until the order is approved."
+ )
)
return {
"doc_ids": docids,
diff --git a/sale_tier_validation/tests/test_tier_validation.py b/sale_tier_validation/tests/test_tier_validation.py
index 7d11845b9..ec28ef62e 100644
--- a/sale_tier_validation/tests/test_tier_validation.py
+++ b/sale_tier_validation/tests/test_tier_validation.py
@@ -46,7 +46,7 @@ def setUpClass(cls):
"name": "Test line",
"product_id": cls.product.id,
"product_uom_qty": 1,
- "product_uom": cls.product.uom_id.id,
+ "product_uom_id": cls.product.uom_id.id,
"price_unit": cls.product.list_price,
},
)
diff --git a/sale_tier_validation/views/sale_order_view.xml b/sale_tier_validation/views/sale_order_view.xml
index 832d90734..35731ef47 100644
--- a/sale_tier_validation/views/sale_order_view.xml
+++ b/sale_tier_validation/views/sale_order_view.xml
@@ -36,7 +36,7 @@
From 87b2ce8016f77d7797a974b4bf5ff175d4c75de5 Mon Sep 17 00:00:00 2001
From: Kiril Vangelovski
Date: Tue, 7 Jul 2026 17:12:23 +0200
Subject: [PATCH 51/55] [IMP] sale_tier_validation: increase code coverage
---
sale_tier_validation/tests/test_tier_validation.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sale_tier_validation/tests/test_tier_validation.py b/sale_tier_validation/tests/test_tier_validation.py
index ec28ef62e..fc355c7a2 100644
--- a/sale_tier_validation/tests/test_tier_validation.py
+++ b/sale_tier_validation/tests/test_tier_validation.py
@@ -70,9 +70,10 @@ def test_validation_sale_order(self):
self.assertEqual(self.sale_order.state, "sale")
def test_block_print_unvalidated_sale_order(self):
- self.sale_order.company_id.sale_report_print_block = True
report = self.env["report.sale.report_saleorder"]
# Attempt to render the report before validation
+ report._get_report_values(docids=[self.sale_order.id])
+ self.sale_order.company_id.sale_report_print_block = True
with self.assertRaises(UserError):
report._get_report_values(docids=[self.sale_order.id])
self.sale_order.request_validation()
From d5fca1e6ef38f3423a1691d0bf6710a7f4642b23 Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Tue, 21 Jul 2026 13:09:40 +0000
Subject: [PATCH 52/55] [UPD] Update sale_tier_validation.pot
---
.../i18n/sale_tier_validation.pot | 34 +++++++++++++++----
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/sale_tier_validation/i18n/sale_tier_validation.pot b/sale_tier_validation/i18n/sale_tier_validation.pot
index eedefe827..be2070206 100644
--- a/sale_tier_validation/i18n/sale_tier_validation.pot
+++ b/sale_tier_validation/i18n/sale_tier_validation.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 18.0\n"
+"Project-Id-Version: Odoo Server 19.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -21,6 +21,11 @@ msgid ""
"Block the printing of the sale order report if the order is not validated."
msgstr ""
+#. module: sale_tier_validation
+#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__can_forward
+msgid "Can Forward"
+msgstr ""
+
#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__can_review
msgid "Can Review"
@@ -36,6 +41,15 @@ msgstr ""
msgid "Config Settings"
msgstr ""
+#. module: sale_tier_validation
+#: model:ir.model.fields,field_description:sale_tier_validation.field_report_sale_report_saleorder__display_name
+#: model:ir.model.fields,field_description:sale_tier_validation.field_res_company__display_name
+#: model:ir.model.fields,field_description:sale_tier_validation.field_res_config_settings__display_name
+#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__display_name
+#: model:ir.model.fields,field_description:sale_tier_validation.field_tier_definition__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: sale_tier_validation
#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__has_comment
msgid "Has Comment"
@@ -46,6 +60,15 @@ msgstr ""
msgid "Hide Reviews"
msgstr ""
+#. module: sale_tier_validation
+#: model:ir.model.fields,field_description:sale_tier_validation.field_report_sale_report_saleorder__id
+#: model:ir.model.fields,field_description:sale_tier_validation.field_res_company__id
+#: model:ir.model.fields,field_description:sale_tier_validation.field_res_config_settings__id
+#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__id
+#: model:ir.model.fields,field_description:sale_tier_validation.field_tier_definition__id
+msgid "ID"
+msgstr ""
+
#. module: sale_tier_validation
#: model:ir.model.fields,help:sale_tier_validation.field_sale_order__has_comment
msgid "If set, Allow the reviewer to leave a comment on the review."
@@ -78,13 +101,13 @@ msgid "Quotation printing is blocked until the order is approved."
msgstr ""
#. module: sale_tier_validation
-#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__rejected
-msgid "Rejected"
+#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__rejected_message
+msgid "Rejected Message"
msgstr ""
#. module: sale_tier_validation
-#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__rejected_message
-msgid "Rejected Message"
+#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__require_authentication
+msgid "Require Authentication"
msgstr ""
#. module: sale_tier_validation
@@ -142,7 +165,6 @@ msgid "To Validate Message"
msgstr ""
#. module: sale_tier_validation
-#: model:ir.model.fields,field_description:sale_tier_validation.field_sale_order__validated
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter
msgid "Validated"
msgstr ""
From 1f2a84a7a3b9111c88d4b31d0b66ec5ec76ee7f2 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Tue, 21 Jul 2026 13:13:13 +0000
Subject: [PATCH 53/55] [BOT] post-merge updates
---
sale_tier_validation/README.rst | 2 +-
sale_tier_validation/static/description/index.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sale_tier_validation/README.rst b/sale_tier_validation/README.rst
index cf67d1796..ad425bd66 100644
--- a/sale_tier_validation/README.rst
+++ b/sale_tier_validation/README.rst
@@ -11,7 +11,7 @@ Sale Tier Validation
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:d49d5b7af2a6407de5473bba71dcfe2c52f6593395afc274ce411eaa56f2b232
+ !! source digest: sha256:04da168efaba0424fafb4a57d4a45d505e2bb3b9e163ecf798a297e2f5228370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/sale_tier_validation/static/description/index.html b/sale_tier_validation/static/description/index.html
index afed0bb84..578173694 100644
--- a/sale_tier_validation/static/description/index.html
+++ b/sale_tier_validation/static/description/index.html
@@ -372,7 +372,7 @@
Sale Tier Validation
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:d49d5b7af2a6407de5473bba71dcfe2c52f6593395afc274ce411eaa56f2b232
+!! source digest: sha256:04da168efaba0424fafb4a57d4a45d505e2bb3b9e163ecf798a297e2f5228370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
This module extends the functionality of Sale Orders to support a tier
From 338531c580111e6f488c68e9a00a7338a8e856ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jes=C3=BAs=20Alan=20Ramos=20Rodr=C3=ADguez?=
Date: Sat, 10 Oct 2026 07:38:43 -0600
Subject: [PATCH 54/55] [IMP] sale_tier_validation: pre-commit auto fixes
Assisted-by: Claude Fable 5.1
---
sale_tier_validation/data/mail_data.xml | 2 +-
sale_tier_validation/views/res_config_settings_views.xml | 4 ++--
sale_tier_validation/views/sale_order_view.xml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sale_tier_validation/data/mail_data.xml b/sale_tier_validation/data/mail_data.xml
index 407ed3627..9d20a9d2d 100644
--- a/sale_tier_validation/data/mail_data.xml
+++ b/sale_tier_validation/data/mail_data.xml
@@ -1,4 +1,4 @@
-
+
+
-
+ res.config.settings.formres.config.settings
diff --git a/sale_tier_validation/views/sale_order_view.xml b/sale_tier_validation/views/sale_order_view.xml
index 35731ef47..f9a4a2ca3 100644
--- a/sale_tier_validation/views/sale_order_view.xml
+++ b/sale_tier_validation/views/sale_order_view.xml
@@ -1,4 +1,4 @@
-
+
From 5399a86cb2ade6b84e45df61c94ae956a3439aa3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jes=C3=BAs=20Alan=20Ramos=20Rodr=C3=ADguez?=
Date: Sat, 10 Oct 2026 07:38:43 -0600
Subject: [PATCH 55/55] [MIG] sale_tier_validation: Migration to 20.0
- Add ruff RUF012 noqa on the mutable class attributes (_inherit, _state_from,
_state_to), as done in base_tier_validation.
- Tests: BaseCommon now runs each test as a dedicated test user instead of the
superuser, so declare _test_user_groups (sales manager + system, the test
confirms orders and toggles the company print-block setting). Without it
the tests fail with AccessError on sale.order.
- No other functional change needed: the sale.order form buttons, search
filters, settings block and report template extended by the module still
exist in 20.0.
Assisted-by: Claude Fable 5.1
---
sale_tier_validation/README.rst | 10 +++++-----
sale_tier_validation/__manifest__.py | 2 +-
sale_tier_validation/models/sale_order.py | 6 +++---
sale_tier_validation/static/description/index.html | 8 ++++----
sale_tier_validation/tests/test_tier_validation.py | 4 ++++
5 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/sale_tier_validation/README.rst b/sale_tier_validation/README.rst
index ad425bd66..4390cff3b 100644
--- a/sale_tier_validation/README.rst
+++ b/sale_tier_validation/README.rst
@@ -21,13 +21,13 @@ Sale Tier Validation
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftier--validation-lightgray.png?logo=github
- :target: https://github.com/OCA/tier-validation/tree/19.0/sale_tier_validation
+ :target: https://github.com/OCA/tier-validation/tree/20.0/sale_tier_validation
:alt: OCA/tier-validation
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/tier-validation-19-0/tier-validation-19-0-sale_tier_validation
+ :target: https://translation.odoo-community.org/projects/tier-validation-20-0/tier-validation-20-0-sale_tier_validation
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
- :target: https://runboat.odoo-community.org/builds?repo=OCA/tier-validation&target_branch=19.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/tier-validation&target_branch=20.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -93,7 +93,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -132,6 +132,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/tier-validation `_ project on GitHub.
+This module is part of the `OCA/tier-validation `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/sale_tier_validation/__manifest__.py b/sale_tier_validation/__manifest__.py
index 285e16771..760be3976 100644
--- a/sale_tier_validation/__manifest__.py
+++ b/sale_tier_validation/__manifest__.py
@@ -4,7 +4,7 @@
"name": "Sale Tier Validation",
"summary": "Extends the functionality of Sale Orders to "
"support a tier validation process.",
- "version": "19.0.1.0.0",
+ "version": "20.0.1.0.0",
"category": "Sale",
"website": "https://github.com/OCA/tier-validation",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
diff --git a/sale_tier_validation/models/sale_order.py b/sale_tier_validation/models/sale_order.py
index 3ada3bd14..86b944e1e 100644
--- a/sale_tier_validation/models/sale_order.py
+++ b/sale_tier_validation/models/sale_order.py
@@ -6,9 +6,9 @@
class SaleOrder(models.Model):
_name = "sale.order"
- _inherit = ["sale.order", "tier.validation"]
- _state_from = ["draft", "sent"]
- _state_to = ["sale"]
+ _inherit = ["sale.order", "tier.validation"] # noqa: RUF012
+ _state_from = ["draft", "sent"] # noqa: RUF012
+ _state_to = ["sale"] # noqa: RUF012
_tier_validation_manual_config = False
diff --git a/sale_tier_validation/static/description/index.html b/sale_tier_validation/static/description/index.html
index 578173694..27d4a69fe 100644
--- a/sale_tier_validation/static/description/index.html
+++ b/sale_tier_validation/static/description/index.html
@@ -3,7 +3,7 @@
-README.rst
+Sale Tier Validation