From 03ccb586bfd50cfd307ad85cebe2ff5e288f1ffb Mon Sep 17 00:00:00 2001 From: lreficent Date: Fri, 1 Dec 2017 16:56:59 -0500 Subject: [PATCH 001/154] [9.0][ADD] purchase_tier_validation --- purchase_tier_validation/README.rst | 84 +++++++++++++++++++ purchase_tier_validation/__init__.py | 4 + purchase_tier_validation/__openerp__.py | 22 +++++ purchase_tier_validation/models/__init__.py | 5 ++ .../models/purchase_order.py | 12 +++ .../models/tier_definition.py | 15 ++++ .../views/purchase_order_view.xml | 77 +++++++++++++++++ 7 files changed, 219 insertions(+) create mode 100644 purchase_tier_validation/README.rst create mode 100644 purchase_tier_validation/__init__.py create mode 100644 purchase_tier_validation/__openerp__.py create mode 100644 purchase_tier_validation/models/__init__.py create mode 100644 purchase_tier_validation/models/purchase_order.py create mode 100644 purchase_tier_validation/models/tier_definition.py create mode 100644 purchase_tier_validation/views/purchase_order_view.xml diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst new file mode 100644 index 00000000000..fd17f195ed1 --- /dev/null +++ b/purchase_tier_validation/README.rst @@ -0,0 +1,84 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +======================== +Purchase Tier Validation +======================== + +This module extends the functionality of Purchase Orders to support a tier +validation process. + +Installation +============ + +This module depends on ``base_tier_validation``. You can find it at +`OCA/server-tools `_ + +Configuration +============= + +To configure this module, you need to: + +#. Go to *Settings > Technical > Tier Validations > Tier Definition*. +#. Create as many tiers as you want for Purchase Order model. + +Usage +===== + +To use this module, you need to: + +#. Create a Purchase 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 POs requesting your review through the filter *Needs my + Review*. +* User with rights to confirm the PO (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. + +.. 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/9.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. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Lois Rilo + +Do not contact contributors directly about support or help with technical issues. + +Maintainer +---------- + +.. 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. diff --git a/purchase_tier_validation/__init__.py b/purchase_tier_validation/__init__.py new file mode 100644 index 00000000000..b44d765940f --- /dev/null +++ b/purchase_tier_validation/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/purchase_tier_validation/__openerp__.py b/purchase_tier_validation/__openerp__.py new file mode 100644 index 00000000000..acbbcfc48e3 --- /dev/null +++ b/purchase_tier_validation/__openerp__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Purchase Tier Validation", + "summary": "Extends the functionality of Purchase Orders to " + "support a tier validation process.", + "version": "9.0.1.0.0", + "category": "Purchases", + "website": "https://github.com/OCA/purchase-workflow", + "author": "Eficent, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "purchase", + "base_tier_validation", + ], + "data": [ + "views/purchase_order_view.xml", + ], +} diff --git a/purchase_tier_validation/models/__init__.py b/purchase_tier_validation/models/__init__.py new file mode 100644 index 00000000000..d171191c762 --- /dev/null +++ b/purchase_tier_validation/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import purchase_order +from . import tier_definition diff --git a/purchase_tier_validation/models/purchase_order.py b/purchase_tier_validation/models/purchase_order.py new file mode 100644 index 00000000000..d8e28a9cbcc --- /dev/null +++ b/purchase_tier_validation/models/purchase_order.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from openerp import models + + +class PurchaseOrder(models.Model): + _name = "purchase.order" + _inherit = ['purchase.order', 'tier.validation'] + _state_from = ['draft', 'sent'] + _state_to = ['purchase', 'approved'] diff --git a/purchase_tier_validation/models/tier_definition.py b/purchase_tier_validation/models/tier_definition.py new file mode 100644 index 00000000000..56bdc5f49e3 --- /dev/null +++ b/purchase_tier_validation/models/tier_definition.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from openerp 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("purchase.order") + return res diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml new file mode 100644 index 00000000000..fe9643e8ab8 --- /dev/null +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -0,0 +1,77 @@ + + + + + + purchase.order.form - test + purchase.order + + + +
+ + + +
+

This PO needs to be + validated. +

+
+

Operation has been validated!

+
+
+

Operation has been rejected.

+
+
+ + + + + +
+
+ + + purchase.order.select - purchase_tier_validation + purchase.order + + + + + + + + + +
From e976762167de7a74466df8b0fcd6a84f87efb51d Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Fri, 23 Mar 2018 10:51:03 +0100 Subject: [PATCH 002/154] [9.0][IMP] purchase_tier_validation: * able to restart validation process. * view fixes. --- purchase_tier_validation/__openerp__.py | 2 +- .../views/purchase_order_view.xml | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/purchase_tier_validation/__openerp__.py b/purchase_tier_validation/__openerp__.py index acbbcfc48e3..36f2abbbf9c 100644 --- a/purchase_tier_validation/__openerp__.py +++ b/purchase_tier_validation/__openerp__.py @@ -5,7 +5,7 @@ "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "9.0.1.0.0", + "version": "9.0.1.1.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "Eficent, Odoo Community Association (OCA)", diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index fe9643e8ab8..71e2cd7e8b9 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -11,16 +11,21 @@

This PO needs to be validated. @@ -28,24 +33,22 @@ string="Validate" attrs="{'invisible': [('review_ids', '=', [])]}" type="object" - states="draft" class="oe_inline oe_button btn-success" icon="fa-thumbs-up"/>

Operation has been validated!

Operation has been rejected.

From a84b96c309bf0b2f1458b8ee74c9abaf09ebe1e2 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 26 Mar 2018 13:29:26 +0200 Subject: [PATCH 003/154] [10.0][MIG] purchase_tier_validation --- purchase_tier_validation/README.rst | 2 +- purchase_tier_validation/{__openerp__.py => __manifest__.py} | 2 +- purchase_tier_validation/models/purchase_order.py | 2 +- purchase_tier_validation/models/tier_definition.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename purchase_tier_validation/{__openerp__.py => __manifest__.py} (95%) diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index fd17f195ed1..c45943b93ab 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -43,7 +43,7 @@ Additional features: .. 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/9.0 + :target: https://runbot.odoo-community.org/runbot/142/10.0 Bug Tracker =========== diff --git a/purchase_tier_validation/__openerp__.py b/purchase_tier_validation/__manifest__.py similarity index 95% rename from purchase_tier_validation/__openerp__.py rename to purchase_tier_validation/__manifest__.py index 36f2abbbf9c..40617fb7362 100644 --- a/purchase_tier_validation/__openerp__.py +++ b/purchase_tier_validation/__manifest__.py @@ -5,7 +5,7 @@ "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "9.0.1.1.0", + "version": "10.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "Eficent, Odoo Community Association (OCA)", diff --git a/purchase_tier_validation/models/purchase_order.py b/purchase_tier_validation/models/purchase_order.py index d8e28a9cbcc..0c295493307 100644 --- a/purchase_tier_validation/models/purchase_order.py +++ b/purchase_tier_validation/models/purchase_order.py @@ -2,7 +2,7 @@ # Copyright 2017 Eficent Business and IT Consulting Services S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from openerp import models +from odoo import models class PurchaseOrder(models.Model): diff --git a/purchase_tier_validation/models/tier_definition.py b/purchase_tier_validation/models/tier_definition.py index 56bdc5f49e3..03101d5b5a9 100644 --- a/purchase_tier_validation/models/tier_definition.py +++ b/purchase_tier_validation/models/tier_definition.py @@ -2,7 +2,7 @@ # Copyright 2017 Eficent Business and IT Consulting Services S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from openerp import api, models +from odoo import api, models class TierDefinition(models.Model): From 087968b234dd2ce9694a1cfad0df2133b1198404 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Wed, 9 May 2018 17:06:30 +0200 Subject: [PATCH 004/154] [11.0][MIG] purchase_tier_validation --- purchase_tier_validation/README.rst | 6 +++--- purchase_tier_validation/__init__.py | 1 - purchase_tier_validation/__manifest__.py | 3 +-- purchase_tier_validation/models/__init__.py | 1 - purchase_tier_validation/models/purchase_order.py | 1 - purchase_tier_validation/models/tier_definition.py | 1 - purchase_tier_validation/views/purchase_order_view.xml | 2 +- 7 files changed, 5 insertions(+), 10 deletions(-) diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index c45943b93ab..0232cc2f5f2 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -13,7 +13,7 @@ Installation ============ This module depends on ``base_tier_validation``. You can find it at -`OCA/server-tools `_ +`OCA/server-ux `_ Configuration ============= @@ -43,13 +43,13 @@ Additional features: .. 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/10.0 + :target: https://runbot.odoo-community.org/runbot/142/11.0 Bug Tracker =========== Bugs are tracked on `GitHub Issues -`_. In case of trouble, please +`_. 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. diff --git a/purchase_tier_validation/__init__.py b/purchase_tier_validation/__init__.py index b44d765940f..31660d6a965 100644 --- a/purchase_tier_validation/__init__.py +++ b/purchase_tier_validation/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import models diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index 40617fb7362..bae6cc71eda 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Eficent Business and IT Consulting Services S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "10.0.1.0.0", + "version": "11.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "Eficent, Odoo Community Association (OCA)", diff --git a/purchase_tier_validation/models/__init__.py b/purchase_tier_validation/models/__init__.py index d171191c762..a426f80ded5 100644 --- a/purchase_tier_validation/models/__init__.py +++ b/purchase_tier_validation/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import purchase_order diff --git a/purchase_tier_validation/models/purchase_order.py b/purchase_tier_validation/models/purchase_order.py index 0c295493307..b8fc1affc35 100644 --- a/purchase_tier_validation/models/purchase_order.py +++ b/purchase_tier_validation/models/purchase_order.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Eficent Business and IT Consulting Services S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). diff --git a/purchase_tier_validation/models/tier_definition.py b/purchase_tier_validation/models/tier_definition.py index 03101d5b5a9..0464d8dd96c 100644 --- a/purchase_tier_validation/models/tier_definition.py +++ b/purchase_tier_validation/models/tier_definition.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Eficent Business and IT Consulting Services S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index 71e2cd7e8b9..7ece68a449d 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -68,7 +68,7 @@ Date: Tue, 3 Jul 2018 17:26:20 +0200 Subject: [PATCH 005/154] - add support for field 'can_review' to hide the approve/reject buttons - add possibility to restart the validation at any point in time during the approval process. --- .../views/purchase_order_view.xml | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index 7ece68a449d..6aa11e7093d 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -15,7 +15,7 @@ type="object"/>
@@ -29,17 +29,19 @@ style="margin-bottom:0px;">

This PO needs to be validated. +

@@ -24,7 +24,7 @@

This PO needs to be @@ -45,12 +45,12 @@

Operation has been validated!

Operation has been rejected.

@@ -70,7 +70,7 @@ Date: Wed, 8 May 2019 14:13:50 +0200 Subject: [PATCH 011/154] Move review view to button box --- purchase_tier_validation/views/purchase_order_view.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index 65b91f061e1..1e425ba7772 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -55,11 +55,9 @@

Operation has been rejected.

- - - - - +
+ +
From 74fdb879cdffae501c34b4b6c9278a00d4b22c42 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 8 May 2019 09:09:21 +0000 Subject: [PATCH 012/154] Translated using Weblate (Spanish) Currently translated at 100.0% (14 of 14 strings) Translation: purchase-workflow-11.0/purchase-workflow-11.0-purchase_tier_validation Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-11-0/purchase-workflow-11-0-purchase_tier_validation/es/ --- purchase_tier_validation/i18n/es.po | 32 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/purchase_tier_validation/i18n/es.po b/purchase_tier_validation/i18n/es.po index 205f3b6a341..0efe899847f 100644 --- a/purchase_tier_validation/i18n/es.po +++ b/purchase_tier_validation/i18n/es.po @@ -6,81 +6,85 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2019-05-08 12:03+0000\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" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.5.1\n" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "This PO needs to be\n" " validated." msgstr "" +"Esta PO debe ser\n" +" validada." #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid " Operation has been rejected." -msgstr "" +msgstr "La operación ha sido rechazada." #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid " Operation has been validated!" -msgstr "" +msgstr "La operación ha sido validada!" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "My Purchases to review" -msgstr "" +msgstr "Mis Compras a revisar" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Needs my Review" -msgstr "" +msgstr "Necesita mi Revisión" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "POs validated and ready to be confirmed" -msgstr "" +msgstr "POs validadas y preparadas para ser confirmadas" #. module: purchase_tier_validation #: model:ir.model,name:purchase_tier_validation.model_purchase_order msgid "Purchase Order" -msgstr "" +msgstr "Orden de Compra" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Reject" -msgstr "" +msgstr "Rechazar" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Request Validation" -msgstr "" +msgstr "Solicitar Validación" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Restart Validation" -msgstr "" +msgstr "Reiniciar Validación" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Reviews" -msgstr "" +msgstr "Revisiones" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Validate" -msgstr "" +msgstr "Validar" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" -msgstr "" +msgstr "Validada" #. module: purchase_tier_validation #: model:ir.model,name:purchase_tier_validation.model_tier_definition msgid "tier.definition" -msgstr "" +msgstr "tier.definition" From abe3086db968f1086dad89c3d20126c8fddf263b Mon Sep 17 00:00:00 2001 From: oca-travis Date: Wed, 8 May 2019 13:45:52 +0000 Subject: [PATCH 013/154] [UPD] Update purchase_tier_validation.pot --- purchase_tier_validation/i18n/purchase_tier_validation.pot | 5 ----- 1 file changed, 5 deletions(-) diff --git a/purchase_tier_validation/i18n/purchase_tier_validation.pot b/purchase_tier_validation/i18n/purchase_tier_validation.pot index 8f8373c10f4..d8df704fdab 100644 --- a/purchase_tier_validation/i18n/purchase_tier_validation.pot +++ b/purchase_tier_validation/i18n/purchase_tier_validation.pot @@ -64,11 +64,6 @@ msgstr "" msgid "Restart Validation" msgstr "" -#. module: purchase_tier_validation -#: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Reviews" -msgstr "" - #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Validate" From 003dc478e76066bb457c93d4e1edc48aea18e129 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Wed, 8 May 2019 13:46:05 +0000 Subject: [PATCH 014/154] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-11.0/purchase-workflow-11.0-purchase_tier_validation Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-11-0/purchase-workflow-11-0-purchase_tier_validation/ --- purchase_tier_validation/i18n/es.po | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/purchase_tier_validation/i18n/es.po b/purchase_tier_validation/i18n/es.po index 0efe899847f..1d3b3353ab4 100644 --- a/purchase_tier_validation/i18n/es.po +++ b/purchase_tier_validation/i18n/es.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * purchase_tier_validation +# * purchase_tier_validation # msgid "" msgstr "" @@ -18,7 +18,8 @@ msgstr "" #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "This PO needs to be\n" +msgid "" +"This PO needs to be\n" " validated." msgstr "" "Esta PO debe ser\n" @@ -69,11 +70,6 @@ msgstr "Solicitar Validación" msgid "Restart Validation" msgstr "Reiniciar Validación" -#. module: purchase_tier_validation -#: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Reviews" -msgstr "Revisiones" - #. module: purchase_tier_validation #: model:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Validate" @@ -88,3 +84,6 @@ msgstr "Validada" #: model:ir.model,name:purchase_tier_validation.model_tier_definition msgid "tier.definition" msgstr "tier.definition" + +#~ msgid "Reviews" +#~ msgstr "Revisiones" From da8d209e178e0cab72f3891456a997c5cbe9f946 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Fri, 15 Feb 2019 11:55:03 +0200 Subject: [PATCH 015/154] [MIG] purchase_tier_validation: Migration to 12.0 --- purchase_tier_validation/README.rst | 1 + purchase_tier_validation/__manifest__.py | 2 +- purchase_tier_validation/views/purchase_order_view.xml | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index 0232cc2f5f2..d59a9fe19b3 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -65,6 +65,7 @@ Contributors ------------ * Lois Rilo +* Naglis Jonaitis Do not contact contributors directly about support or help with technical issues. diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index 967c9f028c7..4ccf4bfbf75 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -4,7 +4,7 @@ "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "11.0.1.0.1", + "version": "12.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "Eficent, Odoo Community Association (OCA)", diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index 1e425ba7772..62c045f6bb3 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -23,6 +23,7 @@
-
- -
+ + +
From e230fc653d4766609832dea9dd6b9bb481b341d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com> Date: Mon, 2 Sep 2019 13:16:44 +0000 Subject: [PATCH 019/154] Added translation using Weblate (Chinese (Simplified)) --- purchase_tier_validation/i18n/zh_CN.po | 85 ++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 purchase_tier_validation/i18n/zh_CN.po diff --git a/purchase_tier_validation/i18n/zh_CN.po b/purchase_tier_validation/i18n/zh_CN.po new file mode 100644 index 00000000000..2520355c155 --- /dev/null +++ b/purchase_tier_validation/i18n/zh_CN.po @@ -0,0 +1,85 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_tier_validation +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-09-02 19:23+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\n" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form +msgid "This PO needs to be\n" +" validated." +msgstr "" +"这个采购订单需要\n" +" 验证。" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form +msgid " Operation has been rejected." +msgstr " 操作已被拒绝." + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form +msgid " Operation has been validated!" +msgstr " 操作已被 验证!" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter +msgid "My Purchases to review" +msgstr "查看我的采购" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter +msgid "Needs my Review" +msgstr "需要我审查的" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter +msgid "POs validated and ready to be confirmed" +msgstr "采购订单已验证,待确认" + +#. module: purchase_tier_validation +#: model:ir.model,name:purchase_tier_validation.model_purchase_order +msgid "Purchase Order" +msgstr "采购订单" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form +msgid "Reject" +msgstr "拒绝" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form +msgid "Request Validation" +msgstr "请求验证" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form +msgid "Restart Validation" +msgstr "重新启动验证" + +#. module: purchase_tier_validation +#: model:ir.model,name:purchase_tier_validation.model_tier_definition +msgid "Tier Definition" +msgstr "层定义" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form +msgid "Validate" +msgstr "验证" + +#. module: purchase_tier_validation +#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter +msgid "Validated" +msgstr "已验证" From f91555946a74caa81327d09c7fd4248d35e1d99c Mon Sep 17 00:00:00 2001 From: "pedro.gonzalez@pesol.es" Date: Thu, 28 Nov 2019 13:06:46 +0100 Subject: [PATCH 020/154] [IMP] purchase_tier_validation: black, isort --- purchase_tier_validation/__manifest__.py | 11 +++-------- purchase_tier_validation/models/purchase_order.py | 6 +++--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index 4ccf4bfbf75..0b2aa250ba3 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " - "support a tier validation process.", + "support a tier validation process.", "version": "12.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", @@ -11,11 +11,6 @@ "license": "AGPL-3", "application": False, "installable": True, - "depends": [ - "purchase", - "base_tier_validation", - ], - "data": [ - "views/purchase_order_view.xml", - ], + "depends": ["purchase", "base_tier_validation"], + "data": ["views/purchase_order_view.xml"], } diff --git a/purchase_tier_validation/models/purchase_order.py b/purchase_tier_validation/models/purchase_order.py index c92a0da9e54..71ddb25c44d 100644 --- a/purchase_tier_validation/models/purchase_order.py +++ b/purchase_tier_validation/models/purchase_order.py @@ -6,6 +6,6 @@ class PurchaseOrder(models.Model): _name = "purchase.order" - _inherit = ['purchase.order', 'tier.validation'] - _state_from = ['draft', 'sent', 'to approve'] - _state_to = ['purchase', 'approved'] + _inherit = ["purchase.order", "tier.validation"] + _state_from = ["draft", "sent", "to approve"] + _state_to = ["purchase", "approved"] From 9f6a529d9fc3a515ce0a92d9816cea583613afb9 Mon Sep 17 00:00:00 2001 From: "pedro.gonzalez@pesol.es" Date: Thu, 28 Nov 2019 13:07:37 +0100 Subject: [PATCH 021/154] [MIG] 13.0 purchase_tier_validation --- purchase_tier_validation/README.rst | 1 + purchase_tier_validation/__manifest__.py | 2 +- .../i18n/purchase_tier_validation.pot | 2 +- purchase_tier_validation/i18n/zh_CN.po | 2 +- purchase_tier_validation/tests/__init__.py | 4 ++ purchase_tier_validation/tests/common.py | 20 ++++++ .../tests/test_tier_validation.py | 65 +++++++++++++++++++ .../tests/tier_validation_tester.py | 24 +++++++ .../views/purchase_order_view.xml | 3 +- 9 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 purchase_tier_validation/tests/__init__.py create mode 100644 purchase_tier_validation/tests/common.py create mode 100644 purchase_tier_validation/tests/test_tier_validation.py create mode 100644 purchase_tier_validation/tests/tier_validation_tester.py diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index d59a9fe19b3..4cfe832d503 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -66,6 +66,7 @@ Contributors * Lois Rilo * Naglis Jonaitis +* Pedro Gonzalez Do not contact contributors directly about support or help with technical issues. diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index 0b2aa250ba3..ee7792084c1 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -4,7 +4,7 @@ "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "Eficent, Odoo Community Association (OCA)", diff --git a/purchase_tier_validation/i18n/purchase_tier_validation.pot b/purchase_tier_validation/i18n/purchase_tier_validation.pot index 29cbaac50de..cb80497d1c3 100644 --- a/purchase_tier_validation/i18n/purchase_tier_validation.pot +++ b/purchase_tier_validation/i18n/purchase_tier_validation.pot @@ -4,7 +4,7 @@ # 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" "Language-Team: \n" diff --git a/purchase_tier_validation/i18n/zh_CN.po b/purchase_tier_validation/i18n/zh_CN.po index 2520355c155..255fe8c4fec 100644 --- a/purchase_tier_validation/i18n/zh_CN.po +++ b/purchase_tier_validation/i18n/zh_CN.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2019-09-02 19:23+0000\n" "Last-Translator: 黎伟杰 <674416404@qq.com>\n" diff --git a/purchase_tier_validation/tests/__init__.py b/purchase_tier_validation/tests/__init__.py new file mode 100644 index 00000000000..c5d19b19342 --- /dev/null +++ b/purchase_tier_validation/tests/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import common +from . import test_tier_validation diff --git a/purchase_tier_validation/tests/common.py b/purchase_tier_validation/tests/common.py new file mode 100644 index 00000000000..cf70a07283d --- /dev/null +++ b/purchase_tier_validation/tests/common.py @@ -0,0 +1,20 @@ +# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + + +def setup_test_model(env, model_clses): + for model_cls in model_clses: + model_cls._build_model(env.registry, env.cr) + + env.registry.setup_models(env.cr) + env.registry.init_models( + env.cr, + [model_cls._name for model_cls in model_clses], + dict(env.context, update_custom_fields=True), + ) + + +def teardown_test_model(env, model_clses): + for model_cls in model_clses: + del env.registry.models[model_cls._name] + env.registry.setup_models(env.cr) diff --git a/purchase_tier_validation/tests/test_tier_validation.py b/purchase_tier_validation/tests/test_tier_validation.py new file mode 100644 index 00000000000..a4fa9073500 --- /dev/null +++ b/purchase_tier_validation/tests/test_tier_validation.py @@ -0,0 +1,65 @@ +# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +from odoo.tests import common + +from .common import setup_test_model, teardown_test_model +from .tier_validation_tester import TierValidationTester + + +@common.at_install(False) +@common.post_install(True) +class TestPurchaseTierValidation(common.SavepointCase): + @classmethod + def setUpClass(cls): + super(TestPurchaseTierValidation, cls).setUpClass() + + setup_test_model(cls.env, [TierValidationTester]) + + cls.test_model = cls.env[TierValidationTester._name] + + cls.tester_model = cls.env["ir.model"].search( + [("model", "=", "tier.validation.tester")] + ) + + # Access record: + cls.env["ir.model.access"].create( + { + "name": "access.tester", + "model_id": cls.tester_model.id, + "perm_read": 1, + "perm_write": 1, + "perm_create": 1, + "perm_unlink": 1, + } + ) + + # Create users: + group_ids = cls.env.ref("base.group_system").ids + cls.test_user_1 = cls.env["res.users"].create( + {"name": "John", "login": "test1", "groups_id": [(6, 0, group_ids)]} + ) + + # Create tier definitions: + cls.tier_def_obj = cls.env["tier.definition"] + cls.tier_def_obj.create( + { + "model_id": cls.tester_model.id, + "review_type": "individual", + "reviewer_id": cls.test_user_1.id, + "definition_domain": "[('test_field', '>', 1.0)]", + } + ) + + cls.test_record = cls.test_model.create({"test_field": 2.5}) + + @classmethod + def tearDownClass(cls): + teardown_test_model(cls.env, [TierValidationTester]) + super(TestPurchaseTierValidation, cls).tearDownClass() + + def test_01_tier_definition_models(self): + """When the user can validate all future reviews, it is not needed + to request a validation, the action can be done straight forward.""" + res = self.tier_def_obj._get_tier_validation_model_names() + self.assertIn("purchase.order", res) diff --git a/purchase_tier_validation/tests/tier_validation_tester.py b/purchase_tier_validation/tests/tier_validation_tester.py new file mode 100644 index 00000000000..c870243c639 --- /dev/null +++ b/purchase_tier_validation/tests/tier_validation_tester.py @@ -0,0 +1,24 @@ +# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class TierValidationTester(models.Model): + _name = "tier.validation.tester" + _description = "Tier Validation Tester" + _inherit = ["tier.validation"] + + state = fields.Selection( + selection=[ + ("draft", "Draft"), + ("confirmed", "Confirmed"), + ("cancel", "Cancel"), + ], + default="draft", + ) + test_field = fields.Float() + user_id = fields.Many2one(string="Assigned to:", comodel_name="res.users") + + def action_confirm(self): + self.write({"state": "confirmed"}) diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index bc4df6ba125..a7b8b3d3053 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -69,7 +69,8 @@ purchase.order - + + From c09f1992c1e498be2bf137e01fd517144d8489db Mon Sep 17 00:00:00 2001 From: oca-travis Date: Mon, 9 Dec 2019 11:25:46 +0000 Subject: [PATCH 022/154] [UPD] Update purchase_tier_validation.pot --- .../i18n/purchase_tier_validation.pot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/purchase_tier_validation/i18n/purchase_tier_validation.pot b/purchase_tier_validation/i18n/purchase_tier_validation.pot index cb80497d1c3..29426b3a573 100644 --- a/purchase_tier_validation/i18n/purchase_tier_validation.pot +++ b/purchase_tier_validation/i18n/purchase_tier_validation.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * purchase_tier_validation +# * purchase_tier_validation # msgid "" msgstr "" "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: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "This PO needs to be\n" +msgid "" +"This PO needs to be\n" " validated." msgstr "" @@ -78,4 +79,3 @@ msgstr "" #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" msgstr "" - From dcc267336a1f518c2e5a7a347dc6a4ccbf262152 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sat, 14 Mar 2020 12:18:45 +0100 Subject: [PATCH 023/154] pre-commit update --- .../views/purchase_order_view.xml | 121 +++++++++++------- 1 file changed, 72 insertions(+), 49 deletions(-) diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index a7b8b3d3053..62c01c092b7 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -1,84 +1,107 @@ - + - purchase.order.form - test purchase.order - +
- - - -
- +
- purchase.order.select - purchase_tier_validation purchase.order - + - - - + + + -
From 033fa78ae0323fdb38314d7e0a2995aae2f950f3 Mon Sep 17 00:00:00 2001 From: Dong Date: Mon, 23 Mar 2020 11:20:12 +0000 Subject: [PATCH 024/154] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (13 of 13 strings) Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_tier_validation Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_tier_validation/zh_CN/ --- purchase_tier_validation/i18n/zh_CN.po | 32 ++++++++++++-------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/purchase_tier_validation/i18n/zh_CN.po b/purchase_tier_validation/i18n/zh_CN.po index 255fe8c4fec..c45414f0a94 100644 --- a/purchase_tier_validation/i18n/zh_CN.po +++ b/purchase_tier_validation/i18n/zh_CN.po @@ -6,48 +6,46 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2019-09-02 19:23+0000\n" -"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"PO-Revision-Date: 2020-03-28 16:13+0000\n" +"Last-Translator: Dong \n" "Language-Team: none\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 3.8\n" +"X-Generator: Weblate 3.10\n" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "This PO needs to be\n" " validated." -msgstr "" -"这个采购订单需要\n" -" 验证。" +msgstr "这个采购订单需要审批。" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid " Operation has been rejected." -msgstr " 操作已被拒绝." +msgstr " 操作已被驳回。" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid " Operation has been validated!" -msgstr " 操作已被 验证!" +msgstr " 操作已 批准!" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "My Purchases to review" -msgstr "查看我的采购" +msgstr "等待我审核的采购" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Needs my Review" -msgstr "需要我审查的" +msgstr "需要我审核" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "POs validated and ready to be confirmed" -msgstr "采购订单已验证,待确认" +msgstr "采购订单已批准并等待确认" #. module: purchase_tier_validation #: model:ir.model,name:purchase_tier_validation.model_purchase_order @@ -57,29 +55,29 @@ msgstr "采购订单" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Reject" -msgstr "拒绝" +msgstr "驳回" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Request Validation" -msgstr "请求验证" +msgstr "请求审批" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Restart Validation" -msgstr "重新启动验证" +msgstr "撤回审批" #. module: purchase_tier_validation #: model:ir.model,name:purchase_tier_validation.model_tier_definition msgid "Tier Definition" -msgstr "层定义" +msgstr "层级定义" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Validate" -msgstr "验证" +msgstr "批准" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" -msgstr "已验证" +msgstr "已批准" From 0dc3e4fa01c9cece97ee86b083131fafbe87899b Mon Sep 17 00:00:00 2001 From: Yoshi Tashiro Date: Sun, 26 Apr 2020 15:25:01 +0900 Subject: [PATCH 025/154] [FIX] README.rst: runbot target --- purchase_tier_validation/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index 4cfe832d503..550f256c9b6 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -43,7 +43,7 @@ Additional features: .. 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/11.0 + :target: https://runbot.odoo-community.org/runbot/142/13.0 Bug Tracker =========== From b8f1c688a12d0c1c6aa80637cb84b8389bdbeedb Mon Sep 17 00:00:00 2001 From: mreficent Date: Wed, 30 Sep 2020 11:47:21 +0200 Subject: [PATCH 026/154] [UPD] Eficent -> ForgeFlow --- purchase_tier_validation/README.rst | 2 +- purchase_tier_validation/__manifest__.py | 4 ++-- purchase_tier_validation/models/purchase_order.py | 2 +- purchase_tier_validation/models/tier_definition.py | 2 +- purchase_tier_validation/tests/common.py | 2 +- purchase_tier_validation/tests/test_tier_validation.py | 2 +- purchase_tier_validation/tests/tier_validation_tester.py | 2 +- purchase_tier_validation/views/purchase_order_view.xml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index 550f256c9b6..f29a5dd0283 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -64,7 +64,7 @@ Images Contributors ------------ -* Lois Rilo +* Lois Rilo * Naglis Jonaitis * Pedro Gonzalez diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index ee7792084c1..7d1c5e135a7 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -1,4 +1,4 @@ -# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Purchase Tier Validation", @@ -7,7 +7,7 @@ "version": "13.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", - "author": "Eficent, Odoo Community Association (OCA)", + "author": "ForgeFlow, Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, "installable": True, diff --git a/purchase_tier_validation/models/purchase_order.py b/purchase_tier_validation/models/purchase_order.py index 71ddb25c44d..a8ced5ffddf 100644 --- a/purchase_tier_validation/models/purchase_order.py +++ b/purchase_tier_validation/models/purchase_order.py @@ -1,4 +1,4 @@ -# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import models diff --git a/purchase_tier_validation/models/tier_definition.py b/purchase_tier_validation/models/tier_definition.py index 0464d8dd96c..606d5689497 100644 --- a/purchase_tier_validation/models/tier_definition.py +++ b/purchase_tier_validation/models/tier_definition.py @@ -1,4 +1,4 @@ -# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# Copyright 2017 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models diff --git a/purchase_tier_validation/tests/common.py b/purchase_tier_validation/tests/common.py index cf70a07283d..56c6b014718 100644 --- a/purchase_tier_validation/tests/common.py +++ b/purchase_tier_validation/tests/common.py @@ -1,4 +1,4 @@ -# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# Copyright 2018 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). diff --git a/purchase_tier_validation/tests/test_tier_validation.py b/purchase_tier_validation/tests/test_tier_validation.py index a4fa9073500..d04ff8f96df 100644 --- a/purchase_tier_validation/tests/test_tier_validation.py +++ b/purchase_tier_validation/tests/test_tier_validation.py @@ -1,4 +1,4 @@ -# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# Copyright 2018 ForgeFlow S.L. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo.tests import common diff --git a/purchase_tier_validation/tests/tier_validation_tester.py b/purchase_tier_validation/tests/tier_validation_tester.py index c870243c639..21bb4fef261 100644 --- a/purchase_tier_validation/tests/tier_validation_tester.py +++ b/purchase_tier_validation/tests/tier_validation_tester.py @@ -1,4 +1,4 @@ -# Copyright 2018 Eficent Business and IT Consulting Services S.L. +# Copyright 2018 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index 62c01c092b7..720c5de9f67 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -1,5 +1,5 @@ - From b669ebbbdcf8888096ef7f82220c0205c0381dd9 Mon Sep 17 00:00:00 2001 From: Kitti U Date: Mon, 26 Oct 2020 13:20:15 +0700 Subject: [PATCH 027/154] [IMP] : black, isort, prettier --- .../views/purchase_order_view.xml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index 720c5de9f67..f0c00635c0d 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -33,7 +33,9 @@ ('rejected', '=', True), ('review_ids', '=', [])]}" style="margin-bottom:0px;" > -

This PO needs to be +

+ + This PO needs to be validated.

From 98c99f9fd795bc586417c2d30180e8f74c3d5a27 Mon Sep 17 00:00:00 2001 From: Kitti U Date: Mon, 26 Oct 2020 14:34:13 +0700 Subject: [PATCH 028/154] [14.0][MIG] purchase_tier_validation --- purchase_tier_validation/README.rst | 86 ------------------- purchase_tier_validation/__manifest__.py | 2 +- purchase_tier_validation/readme/CONFIGURE.rst | 4 + .../readme/CONTRIBUTORS.rst | 4 + .../readme/DESCRIPTION.rst | 2 + purchase_tier_validation/readme/INSTALL.rst | 2 + purchase_tier_validation/readme/USAGE.rst | 14 +++ .../tests/test_tier_validation.py | 4 +- 8 files changed, 29 insertions(+), 89 deletions(-) delete mode 100644 purchase_tier_validation/README.rst create mode 100644 purchase_tier_validation/readme/CONFIGURE.rst create mode 100644 purchase_tier_validation/readme/CONTRIBUTORS.rst create mode 100644 purchase_tier_validation/readme/DESCRIPTION.rst create mode 100644 purchase_tier_validation/readme/INSTALL.rst create mode 100644 purchase_tier_validation/readme/USAGE.rst diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst deleted file mode 100644 index f29a5dd0283..00000000000 --- a/purchase_tier_validation/README.rst +++ /dev/null @@ -1,86 +0,0 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - -======================== -Purchase Tier Validation -======================== - -This module extends the functionality of Purchase Orders to support a tier -validation process. - -Installation -============ - -This module depends on ``base_tier_validation``. You can find it at -`OCA/server-ux `_ - -Configuration -============= - -To configure this module, you need to: - -#. Go to *Settings > Technical > Tier Validations > Tier Definition*. -#. Create as many tiers as you want for Purchase Order model. - -Usage -===== - -To use this module, you need to: - -#. Create a Purchase 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 POs requesting your review through the filter *Needs my - Review*. -* User with rights to confirm the PO (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. - -.. 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/13.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. - -Credits -======= - -Images ------- - -* Odoo Community Association: `Icon `_. - -Contributors ------------- - -* Lois Rilo -* Naglis Jonaitis -* Pedro Gonzalez - -Do not contact contributors directly about support or help with technical issues. - -Maintainer ----------- - -.. 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. diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index 7d1c5e135a7..9affdf0361d 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -4,7 +4,7 @@ "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "ForgeFlow, Odoo Community Association (OCA)", diff --git a/purchase_tier_validation/readme/CONFIGURE.rst b/purchase_tier_validation/readme/CONFIGURE.rst new file mode 100644 index 00000000000..b7c0ef30f04 --- /dev/null +++ b/purchase_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 Purchase Order model. diff --git a/purchase_tier_validation/readme/CONTRIBUTORS.rst b/purchase_tier_validation/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..01d24644dea --- /dev/null +++ b/purchase_tier_validation/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Lois Rilo +* Naglis Jonaitis +* Pedro Gonzalez +* Kitti U. (migrate to v14) diff --git a/purchase_tier_validation/readme/DESCRIPTION.rst b/purchase_tier_validation/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..9e217e4d4bd --- /dev/null +++ b/purchase_tier_validation/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the functionality of Purchase Orders to support a tier +validation process. diff --git a/purchase_tier_validation/readme/INSTALL.rst b/purchase_tier_validation/readme/INSTALL.rst new file mode 100644 index 00000000000..638fbd2d688 --- /dev/null +++ b/purchase_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/purchase_tier_validation/readme/USAGE.rst b/purchase_tier_validation/readme/USAGE.rst new file mode 100644 index 00000000000..31a17ed5185 --- /dev/null +++ b/purchase_tier_validation/readme/USAGE.rst @@ -0,0 +1,14 @@ +To use this module, you need to: + +#. Create a Purchase 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 POs requesting your review through the filter *Needs my + Review*. +* User with rights to confirm the PO (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/purchase_tier_validation/tests/test_tier_validation.py b/purchase_tier_validation/tests/test_tier_validation.py index d04ff8f96df..3ad163b400c 100644 --- a/purchase_tier_validation/tests/test_tier_validation.py +++ b/purchase_tier_validation/tests/test_tier_validation.py @@ -2,13 +2,13 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo.tests import common +from odoo.tests.common import tagged from .common import setup_test_model, teardown_test_model from .tier_validation_tester import TierValidationTester -@common.at_install(False) -@common.post_install(True) +@tagged("post_install", "-at_install") class TestPurchaseTierValidation(common.SavepointCase): @classmethod def setUpClass(cls): From 623ca1e3a2645874acf47bfb512995459e2fcaef Mon Sep 17 00:00:00 2001 From: oca-travis Date: Wed, 2 Dec 2020 08:42:11 +0000 Subject: [PATCH 029/154] [UPD] Update purchase_tier_validation.pot --- .../i18n/purchase_tier_validation.pot | 66 +++++++++++++++++-- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/purchase_tier_validation/i18n/purchase_tier_validation.pot b/purchase_tier_validation/i18n/purchase_tier_validation.pot index 29426b3a573..4066ca7999b 100644 --- a/purchase_tier_validation/i18n/purchase_tier_validation.pot +++ b/purchase_tier_validation/i18n/purchase_tier_validation.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -16,18 +16,55 @@ msgstr "" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "" -"This PO needs to be\n" +"\n" +" This PO needs to be\n" " validated." msgstr "" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid " Operation has been rejected." +msgid "" +"\n" +" Operation has been\n" +" rejected\n" +" ." msgstr "" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid " Operation has been validated!" +msgid "" +"\n" +" Operation has been\n" +" validated\n" +" !" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__can_review +msgid "Can Review" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__display_name +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__display_name +msgid "Display Name" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__has_comment +msgid "Has Comment" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__id +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__id +msgid "ID" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order____last_update +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition____last_update +msgid "Last Modified on" msgstr "" #. module: purchase_tier_validation @@ -35,6 +72,11 @@ msgstr "" msgid "My Purchases to review" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__need_validation +msgid "Need Validation" +msgstr "" + #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Needs my Review" @@ -55,6 +97,11 @@ msgstr "" msgid "Reject" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected +msgid "Rejected" +msgstr "" + #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form msgid "Request Validation" @@ -65,6 +112,11 @@ msgstr "" msgid "Restart Validation" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__reviewer_ids +msgid "Reviewers" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model,name:purchase_tier_validation.model_tier_definition msgid "Tier Definition" @@ -76,6 +128,12 @@ msgid "Validate" msgstr "" #. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__review_ids +msgid "Validations" +msgstr "" From 06c42e0e5f93213b12a34e1934da47dd02605931 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 2 Dec 2020 08:58:12 +0000 Subject: [PATCH 030/154] [UPD] README.rst --- purchase_tier_validation/README.rst | 109 +++++ .../static/description/index.html | 457 ++++++++++++++++++ 2 files changed, 566 insertions(+) create mode 100644 purchase_tier_validation/README.rst create mode 100644 purchase_tier_validation/static/description/index.html diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst new file mode 100644 index 00000000000..b0ca3d26e75 --- /dev/null +++ b/purchase_tier_validation/README.rst @@ -0,0 +1,109 @@ +======================== +Purchase 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%2Fpurchase--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/purchase-workflow/tree/14.0/purchase_tier_validation + :alt: OCA/purchase-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_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/142/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of Purchase Orders to support a tier +validation process. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +This module depends on ``base_tier_validation``. You can find it at +`OCA/server-ux `_ + +Configuration +============= + +To configure this module, you need to: + +#. Go to *Settings > Technical > Tier Validations > Tier Definition*. +#. Create as many tiers as you want for Purchase Order model. + +Usage +===== + +To use this module, you need to: + +#. Create a Purchase 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 POs requesting your review through the filter *Needs my + Review*. +* User with rights to confirm the PO (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. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* Lois Rilo +* Naglis Jonaitis +* Pedro Gonzalez +* Kitti U. (migrate to v14) + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/purchase-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_tier_validation/static/description/index.html b/purchase_tier_validation/static/description/index.html new file mode 100644 index 00000000000..49ad54ca7ea --- /dev/null +++ b/purchase_tier_validation/static/description/index.html @@ -0,0 +1,457 @@ + + + + + + +Purchase Tier Validation + + + +
+

Purchase Tier Validation

+ + +

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

+

This module extends the functionality of Purchase Orders to support a tier +validation process.

+

Table of contents

+ +
+

Installation

+

This module depends on base_tier_validation. You can find it at +OCA/server-ux

+
+
+

Configuration

+

To configure this module, you need to:

+
    +
  1. Go to Settings > Technical > Tier Validations > Tier Definition.
  2. +
  3. Create as many tiers as you want for Purchase Order model.
  4. +
+
+
+

Usage

+

To use this module, you need to:

+
    +
  1. Create a Purchase Order triggering at least one “Tier Definition”.
  2. +
  3. Click on Request Validation button.
  4. +
  5. Under the tab Reviews have a look to pending reviews and their statuses.
  6. +
  7. Once all reviews are validated click on Confirm Order.
  8. +
+

Additional features:

+
    +
  • You can filter the POs requesting your review through the filter Needs my +Review.
  • +
  • User with rights to confirm the PO (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.
  • +
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • ForgeFlow
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/purchase-workflow project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + From 9b32bfdd9c0328a91abb311b7dac9aff34337faf Mon Sep 17 00:00:00 2001 From: Kitti U Date: Wed, 16 Dec 2020 21:33:39 +0700 Subject: [PATCH 031/154] [14.0][FIX] purchase_tier_validation, set manual view = False --- .../models/purchase_order.py | 2 + .../views/purchase_order_view.xml | 90 ------------------- 2 files changed, 2 insertions(+), 90 deletions(-) diff --git a/purchase_tier_validation/models/purchase_order.py b/purchase_tier_validation/models/purchase_order.py index a8ced5ffddf..a82eb494e5b 100644 --- a/purchase_tier_validation/models/purchase_order.py +++ b/purchase_tier_validation/models/purchase_order.py @@ -9,3 +9,5 @@ class PurchaseOrder(models.Model): _inherit = ["purchase.order", "tier.validation"] _state_from = ["draft", "sent", "to approve"] _state_to = ["purchase", "approved"] + + _tier_validation_manual_config = False diff --git a/purchase_tier_validation/views/purchase_order_view.xml b/purchase_tier_validation/views/purchase_order_view.xml index f0c00635c0d..3992868a140 100644 --- a/purchase_tier_validation/views/purchase_order_view.xml +++ b/purchase_tier_validation/views/purchase_order_view.xml @@ -2,96 +2,6 @@ - - purchase.order.form - test - purchase.order - - - -
- - - - - - -
- - - -
-
purchase.order.select - purchase_tier_validation purchase.order From 6305b3a0b5c05943de61a5570c2fc00b7b32290b Mon Sep 17 00:00:00 2001 From: oca-travis Date: Thu, 14 Jan 2021 18:29:14 +0000 Subject: [PATCH 032/154] [UPD] Update purchase_tier_validation.pot --- .../i18n/purchase_tier_validation.pot | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/purchase_tier_validation/i18n/purchase_tier_validation.pot b/purchase_tier_validation/i18n/purchase_tier_validation.pot index 4066ca7999b..c881b5b380c 100644 --- a/purchase_tier_validation/i18n/purchase_tier_validation.pot +++ b/purchase_tier_validation/i18n/purchase_tier_validation.pot @@ -13,32 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "" -"\n" -" This PO needs to be\n" -" validated." -msgstr "" - -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "" -"\n" -" Operation has been\n" -" rejected\n" -" ." -msgstr "" - -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "" -"\n" -" Operation has been\n" -" validated\n" -" !" -msgstr "" - #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__can_review msgid "Can Review" @@ -92,26 +66,11 @@ msgstr "" msgid "Purchase Order" msgstr "" -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Reject" -msgstr "" - #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected msgid "Rejected" msgstr "" -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Request Validation" -msgstr "" - -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Restart Validation" -msgstr "" - #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__reviewer_ids msgid "Reviewers" @@ -122,11 +81,6 @@ msgstr "" msgid "Tier Definition" msgstr "" -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Validate" -msgstr "" - #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter From 2e01bb42a37e9c9bad25a6cc021d622bf1ba5aed Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 14 Jan 2021 19:09:16 +0000 Subject: [PATCH 033/154] purchase_tier_validation 14.0.2.0.0 --- purchase_tier_validation/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index 9affdf0361d..cd211213472 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -4,7 +4,7 @@ "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "14.0.1.0.0", + "version": "14.0.2.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "ForgeFlow, Odoo Community Association (OCA)", From 36aa3cf865e695d63678df657c4e0ed29473e107 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Mon, 29 Nov 2021 14:06:49 +0000 Subject: [PATCH 034/154] [UPD] Update purchase_tier_validation.pot --- purchase_tier_validation/i18n/purchase_tier_validation.pot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/purchase_tier_validation/i18n/purchase_tier_validation.pot b/purchase_tier_validation/i18n/purchase_tier_validation.pot index c881b5b380c..2fe6943a03c 100644 --- a/purchase_tier_validation/i18n/purchase_tier_validation.pot +++ b/purchase_tier_validation/i18n/purchase_tier_validation.pot @@ -56,6 +56,11 @@ msgstr "" msgid "Needs my Review" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__next_review +msgid "Next Review" +msgstr "" + #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "POs validated and ready to be confirmed" From d4bfaba93017dc251ba66b023fada462fcf67c43 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Thu, 14 Jan 2021 19:09:30 +0000 Subject: [PATCH 035/154] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-14.0/purchase-workflow-14.0-purchase_tier_validation Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_tier_validation/ --- purchase_tier_validation/i18n/es.po | 98 ++++++++++++++++++-------- purchase_tier_validation/i18n/zh_CN.po | 95 ++++++++++++++++++------- 2 files changed, 137 insertions(+), 56 deletions(-) diff --git a/purchase_tier_validation/i18n/es.po b/purchase_tier_validation/i18n/es.po index 44e8a0dcaec..2c6480550b9 100644 --- a/purchase_tier_validation/i18n/es.po +++ b/purchase_tier_validation/i18n/es.po @@ -17,34 +17,53 @@ msgstr "" "X-Generator: Weblate 3.5.1\n" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "" -"This PO needs to be\n" -" validated." +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__can_review +msgid "Can Review" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__display_name +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__display_name +msgid "Display Name" msgstr "" -"Esta PO debe ser\n" -" validada." #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid " Operation has been rejected." -msgstr "La operación ha sido rechazada." +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__has_comment +msgid "Has Comment" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__id +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__id +msgid "ID" +msgstr "" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid " Operation has been validated!" -msgstr "La operación ha sido validada!" +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order____last_update +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition____last_update +msgid "Last Modified on" +msgstr "" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "My Purchases to review" msgstr "Mis Compras a revisar" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__need_validation +msgid "Need Validation" +msgstr "" + #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Needs my Review" msgstr "Necesita mi Revisión" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__next_review +msgid "Next Review" +msgstr "" + #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "POs validated and ready to be confirmed" @@ -56,36 +75,57 @@ msgid "Purchase Order" msgstr "Orden de Compra" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Reject" -msgstr "Rechazar" - -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Request Validation" -msgstr "Solicitar Validación" +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected +msgid "Rejected" +msgstr "" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Restart Validation" -msgstr "Reiniciar Validación" +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__reviewer_ids +msgid "Reviewers" +msgstr "" #. module: purchase_tier_validation #: model:ir.model,name:purchase_tier_validation.model_tier_definition #, fuzzy -#| msgid "tier.definition" msgid "Tier Definition" msgstr "tier.definition" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Validate" -msgstr "Validar" - -#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" msgstr "Validada" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__review_ids +msgid "Validations" +msgstr "" + +#~ msgid "" +#~ "This PO needs to be\n" +#~ " validated." +#~ msgstr "" +#~ "Esta PO debe ser\n" +#~ " validada." + +#~ msgid " Operation has been rejected." +#~ msgstr "" +#~ "La operación ha sido rechazada." + +#~ msgid " Operation has been validated!" +#~ msgstr "La operación ha sido validada!" + +#~ msgid "Reject" +#~ msgstr "Rechazar" + +#~ msgid "Request Validation" +#~ msgstr "Solicitar Validación" + +#~ msgid "Restart Validation" +#~ msgstr "Reiniciar Validación" + +#~ msgid "Validate" +#~ msgstr "Validar" + #~ msgid "Reviews" #~ msgstr "Revisiones" diff --git a/purchase_tier_validation/i18n/zh_CN.po b/purchase_tier_validation/i18n/zh_CN.po index c45414f0a94..6c4096be623 100644 --- a/purchase_tier_validation/i18n/zh_CN.po +++ b/purchase_tier_validation/i18n/zh_CN.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * purchase_tier_validation +# * purchase_tier_validation # msgid "" msgstr "" @@ -17,31 +17,53 @@ msgstr "" "X-Generator: Weblate 3.10\n" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "This PO needs to be\n" -" validated." -msgstr "这个采购订单需要审批。" +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__can_review +msgid "Can Review" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__display_name +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__display_name +msgid "Display Name" +msgstr "" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid " Operation has been rejected." -msgstr " 操作已被驳回。" +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__has_comment +msgid "Has Comment" +msgstr "" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__id +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__id +msgid "ID" +msgstr "" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid " Operation has been validated!" -msgstr " 操作已 批准!" +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order____last_update +#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition____last_update +msgid "Last Modified on" +msgstr "" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "My Purchases to review" msgstr "等待我审核的采购" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__need_validation +msgid "Need Validation" +msgstr "" + #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Needs my Review" msgstr "需要我审核" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__next_review +msgid "Next Review" +msgstr "" + #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "POs validated and ready to be confirmed" @@ -53,19 +75,14 @@ msgid "Purchase Order" msgstr "采购订单" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Reject" -msgstr "驳回" - -#. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Request Validation" -msgstr "请求审批" +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected +msgid "Rejected" +msgstr "" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Restart Validation" -msgstr "撤回审批" +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__reviewer_ids +msgid "Reviewers" +msgstr "" #. module: purchase_tier_validation #: model:ir.model,name:purchase_tier_validation.model_tier_definition @@ -73,11 +90,35 @@ msgid "Tier Definition" msgstr "层级定义" #. module: purchase_tier_validation -#: model_terms:ir.ui.view,arch_db:purchase_tier_validation.purchase_order_form -msgid "Validate" -msgstr "批准" - -#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" msgstr "已批准" + +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__review_ids +msgid "Validations" +msgstr "" + +#~ msgid "" +#~ "This PO needs to be\n" +#~ " validated." +#~ msgstr "这个采购订单需要审批。" + +#~ msgid " Operation has been rejected." +#~ msgstr " 操作已被驳回。" + +#~ msgid " Operation has been validated!" +#~ msgstr " 操作已 批准!" + +#~ msgid "Reject" +#~ msgstr "驳回" + +#~ msgid "Request Validation" +#~ msgstr "请求审批" + +#~ msgid "Restart Validation" +#~ msgstr "撤回审批" + +#~ msgid "Validate" +#~ msgstr "批准" From d8414123a4fc26b3f5f2642214107e0094dc70f2 Mon Sep 17 00:00:00 2001 From: Jasmin Solanki Date: Mon, 20 Dec 2021 17:43:56 +0530 Subject: [PATCH 036/154] [MIG] purchase_tier_validation: Migration to 15.0 --- purchase_tier_validation/__manifest__.py | 2 +- purchase_tier_validation/tests/__init__.py | 1 - purchase_tier_validation/tests/common.py | 20 ------------------- .../tests/test_tier_validation.py | 18 ++++++++++------- 4 files changed, 12 insertions(+), 29 deletions(-) delete mode 100644 purchase_tier_validation/tests/common.py diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index cd211213472..7cdc4046c0f 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -4,7 +4,7 @@ "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "14.0.2.0.0", + "version": "15.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "ForgeFlow, Odoo Community Association (OCA)", diff --git a/purchase_tier_validation/tests/__init__.py b/purchase_tier_validation/tests/__init__.py index c5d19b19342..f39596410e7 100644 --- a/purchase_tier_validation/tests/__init__.py +++ b/purchase_tier_validation/tests/__init__.py @@ -1,4 +1,3 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from . import common from . import test_tier_validation diff --git a/purchase_tier_validation/tests/common.py b/purchase_tier_validation/tests/common.py deleted file mode 100644 index 56c6b014718..00000000000 --- a/purchase_tier_validation/tests/common.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2018 ForgeFlow S.L. -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). - - -def setup_test_model(env, model_clses): - for model_cls in model_clses: - model_cls._build_model(env.registry, env.cr) - - env.registry.setup_models(env.cr) - env.registry.init_models( - env.cr, - [model_cls._name for model_cls in model_clses], - dict(env.context, update_custom_fields=True), - ) - - -def teardown_test_model(env, model_clses): - for model_cls in model_clses: - del env.registry.models[model_cls._name] - env.registry.setup_models(env.cr) diff --git a/purchase_tier_validation/tests/test_tier_validation.py b/purchase_tier_validation/tests/test_tier_validation.py index 3ad163b400c..512282a30e9 100644 --- a/purchase_tier_validation/tests/test_tier_validation.py +++ b/purchase_tier_validation/tests/test_tier_validation.py @@ -1,20 +1,24 @@ # Copyright 2018 ForgeFlow S.L. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). +from odoo_test_helper import FakeModelLoader + from odoo.tests import common from odoo.tests.common import tagged -from .common import setup_test_model, teardown_test_model -from .tier_validation_tester import TierValidationTester - @tagged("post_install", "-at_install") -class TestPurchaseTierValidation(common.SavepointCase): +class TestPurchaseTierValidation(common.TransactionCase): @classmethod def setUpClass(cls): super(TestPurchaseTierValidation, cls).setUpClass() + cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + cls.loader = FakeModelLoader(cls.env, cls.__module__) + cls.loader.backup_registry() + + from .tier_validation_tester import TierValidationTester - setup_test_model(cls.env, [TierValidationTester]) + cls.loader.update_registry((TierValidationTester,)) cls.test_model = cls.env[TierValidationTester._name] @@ -55,8 +59,8 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): - teardown_test_model(cls.env, [TierValidationTester]) - super(TestPurchaseTierValidation, cls).tearDownClass() + cls.loader.restore_registry() + return super(TestPurchaseTierValidation, cls).tearDownClass() def test_01_tier_definition_models(self): """When the user can validate all future reviews, it is not needed From 39ceda7d013225a5a85ba802922c9963a5c2faf8 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 29 Aug 2022 09:40:56 +0000 Subject: [PATCH 037/154] [UPD] Update purchase_tier_validation.pot --- .../i18n/purchase_tier_validation.pot | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/purchase_tier_validation/i18n/purchase_tier_validation.pot b/purchase_tier_validation/i18n/purchase_tier_validation.pot index 2fe6943a03c..7ba845c656b 100644 --- a/purchase_tier_validation/i18n/purchase_tier_validation.pot +++ b/purchase_tier_validation/i18n/purchase_tier_validation.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,29 +18,11 @@ msgstr "" msgid "Can Review" msgstr "" -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__display_name -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__display_name -msgid "Display Name" -msgstr "" - #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__has_comment msgid "Has Comment" msgstr "" -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__id -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__id -msgid "ID" -msgstr "" - -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order____last_update -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition____last_update -msgid "Last Modified on" -msgstr "" - #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "My Purchases to review" @@ -76,6 +58,11 @@ msgstr "" msgid "Rejected" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected_message +msgid "Rejected Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__reviewer_ids msgid "Reviewers" @@ -86,12 +73,22 @@ msgstr "" msgid "Tier Definition" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__to_validate_message +msgid "To Validate Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated_message +msgid "Validated Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__review_ids msgid "Validations" From 5569bdfda98cfec75e14aaabe3f39d02bb571383 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 29 Aug 2022 09:45:07 +0000 Subject: [PATCH 038/154] [UPD] README.rst --- purchase_tier_validation/README.rst | 10 +++++----- purchase_tier_validation/static/description/index.html | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index b0ca3d26e75..bbb1748537a 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -14,13 +14,13 @@ Purchase 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%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/purchase-workflow/tree/14.0/purchase_tier_validation + :target: https://github.com/OCA/purchase-workflow/tree/15.0/purchase_tier_validation :alt: OCA/purchase-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_tier_validation + :target: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_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/142/14.0 + :target: https://runbot.odoo-community.org/runbot/142/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -71,7 +71,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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -104,6 +104,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/purchase-workflow `_ project on GitHub. +This module is part of the `OCA/purchase-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_tier_validation/static/description/index.html b/purchase_tier_validation/static/description/index.html index 49ad54ca7ea..717e4feb363 100644 --- a/purchase_tier_validation/static/description/index.html +++ b/purchase_tier_validation/static/description/index.html @@ -367,7 +367,7 @@

Purchase Tier Validation

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

This module extends the functionality of Purchase Orders to support a tier validation process.

Table of contents

@@ -421,7 +421,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 smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -448,7 +448,7 @@

Maintainers

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/purchase-workflow project on GitHub.

+

This module is part of the OCA/purchase-workflow project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

From 646c28533c704e426f0a1eecfda3cc02c8c34486 Mon Sep 17 00:00:00 2001 From: arulbalamurugan Date: Mon, 5 Dec 2022 13:56:02 +0530 Subject: [PATCH 039/154] [MIG] purchase_tier_validation: Migration to 16.0 --- purchase_tier_validation/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase_tier_validation/__manifest__.py b/purchase_tier_validation/__manifest__.py index 7cdc4046c0f..2b60926a2f8 100644 --- a/purchase_tier_validation/__manifest__.py +++ b/purchase_tier_validation/__manifest__.py @@ -4,7 +4,7 @@ "name": "Purchase Tier Validation", "summary": "Extends the functionality of Purchase Orders to " "support a tier validation process.", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Purchases", "website": "https://github.com/OCA/purchase-workflow", "author": "ForgeFlow, Odoo Community Association (OCA)", From 0ba34330f0ff19b78deda24be5d03b0d83d90798 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 23 Feb 2023 10:08:53 +0000 Subject: [PATCH 040/154] [UPD] Update purchase_tier_validation.pot --- purchase_tier_validation/i18n/purchase_tier_validation.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase_tier_validation/i18n/purchase_tier_validation.pot b/purchase_tier_validation/i18n/purchase_tier_validation.pot index 7ba845c656b..b98aacd37e5 100644 --- a/purchase_tier_validation/i18n/purchase_tier_validation.pot +++ b/purchase_tier_validation/i18n/purchase_tier_validation.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" From 922b0b64b2fcb535e27027988ab772b91271354a Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 23 Feb 2023 10:12:19 +0000 Subject: [PATCH 041/154] [UPD] README.rst --- purchase_tier_validation/README.rst | 10 +++++----- purchase_tier_validation/static/description/index.html | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index bbb1748537a..e8f4dd732eb 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -14,13 +14,13 @@ Purchase 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%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/purchase-workflow/tree/15.0/purchase_tier_validation + :target: https://github.com/OCA/purchase-workflow/tree/16.0/purchase_tier_validation :alt: OCA/purchase-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_tier_validation + :target: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_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/142/15.0 + :target: https://runbot.odoo-community.org/runbot/142/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -71,7 +71,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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -104,6 +104,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/purchase-workflow `_ project on GitHub. +This module is part of the `OCA/purchase-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_tier_validation/static/description/index.html b/purchase_tier_validation/static/description/index.html index 717e4feb363..1afb5b6dd69 100644 --- a/purchase_tier_validation/static/description/index.html +++ b/purchase_tier_validation/static/description/index.html @@ -367,7 +367,7 @@

Purchase Tier Validation

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

This module extends the functionality of Purchase Orders to support a tier validation process.

Table of contents

@@ -421,7 +421,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 smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -448,7 +448,7 @@

Maintainers

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/purchase-workflow project on GitHub.

+

This module is part of the OCA/purchase-workflow project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

From 3ed4b2e0e24ba1f99028c7e80ff40532db6a1d89 Mon Sep 17 00:00:00 2001 From: Weblate Date: Thu, 23 Feb 2023 12:11:55 +0000 Subject: [PATCH 042/154] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_tier_validation Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_tier_validation/ --- purchase_tier_validation/i18n/es.po | 33 ++++++++++++-------------- purchase_tier_validation/i18n/zh_CN.po | 33 ++++++++++++-------------- 2 files changed, 30 insertions(+), 36 deletions(-) diff --git a/purchase_tier_validation/i18n/es.po b/purchase_tier_validation/i18n/es.po index 2c6480550b9..ae3cafbcf47 100644 --- a/purchase_tier_validation/i18n/es.po +++ b/purchase_tier_validation/i18n/es.po @@ -21,29 +21,11 @@ msgstr "" msgid "Can Review" msgstr "" -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__display_name -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__display_name -msgid "Display Name" -msgstr "" - #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__has_comment msgid "Has Comment" msgstr "" -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__id -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__id -msgid "ID" -msgstr "" - -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order____last_update -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition____last_update -msgid "Last Modified on" -msgstr "" - #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "My Purchases to review" @@ -79,6 +61,11 @@ msgstr "Orden de Compra" msgid "Rejected" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected_message +msgid "Rejected Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__reviewer_ids msgid "Reviewers" @@ -90,12 +77,22 @@ msgstr "" msgid "Tier Definition" msgstr "tier.definition" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__to_validate_message +msgid "To Validate Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" msgstr "Validada" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated_message +msgid "Validated Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__review_ids msgid "Validations" diff --git a/purchase_tier_validation/i18n/zh_CN.po b/purchase_tier_validation/i18n/zh_CN.po index 6c4096be623..11051cd7f2d 100644 --- a/purchase_tier_validation/i18n/zh_CN.po +++ b/purchase_tier_validation/i18n/zh_CN.po @@ -21,29 +21,11 @@ msgstr "" msgid "Can Review" msgstr "" -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__display_name -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__display_name -msgid "Display Name" -msgstr "" - #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__has_comment msgid "Has Comment" msgstr "" -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__id -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition__id -msgid "ID" -msgstr "" - -#. module: purchase_tier_validation -#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order____last_update -#: model:ir.model.fields,field_description:purchase_tier_validation.field_tier_definition____last_update -msgid "Last Modified on" -msgstr "" - #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "My Purchases to review" @@ -79,6 +61,11 @@ msgstr "采购订单" msgid "Rejected" msgstr "" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected_message +msgid "Rejected Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__reviewer_ids msgid "Reviewers" @@ -89,12 +76,22 @@ msgstr "" msgid "Tier Definition" msgstr "层级定义" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__to_validate_message +msgid "To Validate Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter msgid "Validated" msgstr "已批准" +#. module: purchase_tier_validation +#: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated_message +msgid "Validated Message" +msgstr "" + #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__review_ids msgid "Validations" From 0d695b77d66b3f003ee0465c9bde2d6ad77e4b3c Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Thu, 20 Jul 2023 20:38:24 +0000 Subject: [PATCH 043/154] Translated using Weblate (Spanish) Currently translated at 100.0% (16 of 16 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_tier_validation Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_tier_validation/es/ --- purchase_tier_validation/i18n/es.po | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/purchase_tier_validation/i18n/es.po b/purchase_tier_validation/i18n/es.po index ae3cafbcf47..504611035d2 100644 --- a/purchase_tier_validation/i18n/es.po +++ b/purchase_tier_validation/i18n/es.po @@ -6,25 +6,25 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2019-05-08 12:03+0000\n" -"Last-Translator: Enric Tobella \n" +"PO-Revision-Date: 2023-07-20 23:11+0000\n" +"Last-Translator: Ivorra78 \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" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.5.1\n" +"X-Generator: Weblate 4.17\n" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__can_review msgid "Can Review" -msgstr "" +msgstr "Puede Revisar" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__has_comment msgid "Has Comment" -msgstr "" +msgstr "Tiene Comentario" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter @@ -34,7 +34,7 @@ msgstr "Mis Compras a revisar" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__need_validation msgid "Need Validation" -msgstr "" +msgstr "Necesita validación" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter @@ -44,7 +44,7 @@ msgstr "Necesita mi Revisión" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__next_review msgid "Next Review" -msgstr "" +msgstr "Siguiente revisión" #. module: purchase_tier_validation #: model_terms:ir.ui.view,arch_db:purchase_tier_validation.view_purchase_order_filter @@ -59,28 +59,27 @@ msgstr "Orden de Compra" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected msgid "Rejected" -msgstr "" +msgstr "Rechazado" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__rejected_message msgid "Rejected Message" -msgstr "" +msgstr "Mensaje rechazado" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__reviewer_ids msgid "Reviewers" -msgstr "" +msgstr "Revisores" #. module: purchase_tier_validation #: model:ir.model,name:purchase_tier_validation.model_tier_definition -#, fuzzy msgid "Tier Definition" -msgstr "tier.definition" +msgstr "Definición del nivel" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__to_validate_message msgid "To Validate Message" -msgstr "" +msgstr "Para validar el mensaje" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated @@ -91,12 +90,12 @@ msgstr "Validada" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__validated_message msgid "Validated Message" -msgstr "" +msgstr "Mensaje validado" #. module: purchase_tier_validation #: model:ir.model.fields,field_description:purchase_tier_validation.field_purchase_order__review_ids msgid "Validations" -msgstr "" +msgstr "Validaciones" #~ msgid "" #~ "This PO needs to be\n" From 979d2767eb844c2cb39c7473040a34f7d93b719c Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 3 Sep 2023 15:50:22 +0000 Subject: [PATCH 044/154] [UPD] README.rst --- purchase_tier_validation/README.rst | 15 +++--- .../static/description/index.html | 46 ++++++++++--------- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/purchase_tier_validation/README.rst b/purchase_tier_validation/README.rst index e8f4dd732eb..96dadb28413 100644 --- a/purchase_tier_validation/README.rst +++ b/purchase_tier_validation/README.rst @@ -2,10 +2,13 @@ Purchase Tier Validation ======================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:171430eb7c77d844022b1a2eb547eff1711b321bf0ff8c2de6588466514761e2 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Purchase Tier Validation .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_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/142/16.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module extends the functionality of Purchase Orders to support a tier validation process. @@ -70,7 +73,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 smashing it by providing a detailed and welcomed +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/purchase_tier_validation/static/description/index.html b/purchase_tier_validation/static/description/index.html index 1afb5b6dd69..c8dd66ed019 100644 --- a/purchase_tier_validation/static/description/index.html +++ b/purchase_tier_validation/static/description/index.html @@ -1,20 +1,20 @@ - + - + Purchase Tier Validation + + +
+

Purchase Invoice Plan

+ + +

License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

+

By standard feature, user can gradually create partial invoices, one by one and +in step create invoice the standard call invoice. +This module add ability to create invoices based on the predefined invoice plan, +either all at once, or one by one.

+

Table of contents

+ +
+

Usage

+
    +
  • Create new purchase quotation as per normal process
  • +
  • Select option “Use Invoice Plan”, a new Invoice Plan tab will appear
  • +
  • Click on “=> Create Invoice Plan” link to open invoice planning wizard
  • +
  • Do plan for number of installment, start date and interval
  • +
  • Double check that each installment has correct plan percentage
  • +
  • After confirm purchases order, we have new option to “Create Invoice by Plan”
  • +
  • User can create only next invoice or create all invoices at the same time
  • +
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Ecosoft
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/purchase-workflow project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/purchase_invoice_plan/tests/__init__.py b/purchase_invoice_plan/tests/__init__.py new file mode 100644 index 00000000000..f718d3b69c9 --- /dev/null +++ b/purchase_invoice_plan/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from . import test_purchase_invoice_plan diff --git a/purchase_invoice_plan/tests/test_purchase_invoice_plan.py b/purchase_invoice_plan/tests/test_purchase_invoice_plan.py new file mode 100644 index 00000000000..f4561b512ad --- /dev/null +++ b/purchase_invoice_plan/tests/test_purchase_invoice_plan.py @@ -0,0 +1,102 @@ +# Copyright 2019 Ecosoft (http://ecosoft.co.th) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) + +from odoo.tests.common import TransactionCase, Form +from odoo import fields +from odoo.exceptions import ValidationError + + +class TestPurchaseInvoicePlan(TransactionCase): + + def setUp(self): + super(TestPurchaseInvoicePlan, self).setUp() + # Create a PO + self.PurchaseOrder = self.env['purchase.order'] + self.PurchaseInvoicePlan = self.env['purchase.create.invoice.plan'] + self.StockBackorderConfirm = self.env['stock.backorder.confirmation'] + self.StockPicking = self.env['stock.picking'] + + self.test_partner = self.env.ref('base.res_partner_12') + self.test_service = self.env.ref('product.product_product_2') + self.test_product = self.env.ref('product.product_product_7') + + self.test_po_service = self.env['purchase.order'].create({ + 'partner_id': self.test_partner.id, + 'use_invoice_plan': True, + 'order_line': [ + (0, 0, {'name': 'PO-Service', + 'product_id': self.test_service.id, + 'date_planned': fields.Datetime.now(), + 'product_qty': 1, + 'product_uom': self.test_service.uom_id.id, + 'price_unit': 500, + }) + ], + }) + self.test_po_product = self.env['purchase.order'].create({ + 'partner_id': self.test_partner.id, + 'use_invoice_plan': True, + 'order_line': [ + (0, 0, {'name': 'PO-Product', + 'product_id': self.test_product.id, + 'date_planned': fields.Datetime.now(), + 'product_qty': 10, + 'product_uom': self.test_product.uom_id.id, + 'price_unit': 1000, + }) + ], + }) + + def test_invoice_plan(self): + ctx = {'active_id': self.test_po_product.id, + 'active_ids': [self.test_po_product.id], + 'all_remain_invoices': True} + # Create purchase plan + with Form(self.PurchaseInvoicePlan) as p: + p.num_installment = 5 + purchase_plan = p.save() + purchase_plan.with_context(ctx).purchase_create_invoice_plan() + self.test_po_product.button_confirm() + self.assertEqual(self.test_po_product.state, 'purchase') + # Receive all products + receive = self.test_po_product.picking_ids.filtered(lambda l: + l.state != 'done') + receive.move_ids_without_package.quantity_done = 10.0 + receive.action_done() + purchase_create = self.env['purchase.make.planned.invoice'].create({}) + purchase_create.with_context(ctx).create_invoices_by_plan() + + def test_unlink_invoice_plan(self): + ctx = {'active_id': self.test_po_product.id, + 'active_ids': [self.test_po_product.id]} + with Form(self.PurchaseInvoicePlan) as p: + p.num_installment = 5 + plan = p.save() + plan.with_context(ctx).purchase_create_invoice_plan() + # Remove it + self.test_po_product.remove_invoice_plan() + self.assertFalse(self.test_po_product.invoice_plan_ids) + + def test_error(self): + ctx = {'active_id': self.test_po_product.id, + 'active_ids': [self.test_po_product.id], + 'all_remain_invoices': True} + # Create purchase plan + with Form(self.PurchaseInvoicePlan) as p: + p.num_installment = 5 + purchase_plan = p.save() + purchase_plan.with_context(ctx).purchase_create_invoice_plan() + self.test_po_product.button_confirm() + self.assertEqual(self.test_po_product.state, 'purchase') + # Receive product 1 unit + receive = self.test_po_product.picking_ids.filtered(lambda l: + l.state != 'done') + receive.move_ids_without_package.quantity_done = 1.0 + receive.action_done() + # ValidationError Create all invoice plan - Receive < Invoice require + purchase_create = self.env['purchase.make.planned.invoice'].create({}) + with self.assertRaises(ValidationError) as e: + purchase_create.with_context(ctx).create_invoices_by_plan() + error_message = ('Plan quantity: 2.0, exceed invoiceable quantity: 1.0' + '\nProduct should be delivered before invoice') + self.assertEqual(e.exception.name, error_message) diff --git a/purchase_invoice_plan/views/purchase_view.xml b/purchase_invoice_plan/views/purchase_view.xml new file mode 100644 index 00000000000..c5e36039e98 --- /dev/null +++ b/purchase_invoice_plan/views/purchase_view.xml @@ -0,0 +1,149 @@ + + + + view.purchase.invoice.plan.tree + purchase.invoice.plan + + + + + + + + + + + + + + view.purchase.invoice.plan.form + purchase.invoice.plan + +
+ + + + + + + + + + + + + + + + +
+ + + purchase_order_form + purchase.order + + + +
+ +
+
+ + +