From 47946c1426ac34c6c427eddfc279b43521d1ff4f Mon Sep 17 00:00:00 2001
From: rgarnau
Date: Thu, 31 Aug 2017 12:16:18 +0200
Subject: [PATCH 01/32] [ADD] Purchase Minimum Amount
---
purchase_minimum_amount/README.rst | 99 ++++++++++++++
purchase_minimum_amount/__init__.py | 5 +
purchase_minimum_amount/__manifest__.py | 21 +++
.../data/purchase_block_reason_data.xml | 12 ++
purchase_minimum_amount/models/__init__.py | 7 +
purchase_minimum_amount/models/partner.py | 12 ++
.../models/purchase_order.py | 70 ++++++++++
purchase_minimum_amount/tests/__init__.py | 6 +
.../tests/test_po_minimum_amount_block.py | 127 ++++++++++++++++++
.../views/purchase_order_view.xml | 32 +++++
.../views/res_partner_view.xml | 20 +++
11 files changed, 411 insertions(+)
create mode 100644 purchase_minimum_amount/README.rst
create mode 100644 purchase_minimum_amount/__init__.py
create mode 100644 purchase_minimum_amount/__manifest__.py
create mode 100644 purchase_minimum_amount/data/purchase_block_reason_data.xml
create mode 100644 purchase_minimum_amount/models/__init__.py
create mode 100644 purchase_minimum_amount/models/partner.py
create mode 100644 purchase_minimum_amount/models/purchase_order.py
create mode 100644 purchase_minimum_amount/tests/__init__.py
create mode 100644 purchase_minimum_amount/tests/test_po_minimum_amount_block.py
create mode 100644 purchase_minimum_amount/views/purchase_order_view.xml
create mode 100644 purchase_minimum_amount/views/res_partner_view.xml
diff --git a/purchase_minimum_amount/README.rst b/purchase_minimum_amount/README.rst
new file mode 100644
index 00000000000..4bb25a4e7e9
--- /dev/null
+++ b/purchase_minimum_amount/README.rst
@@ -0,0 +1,99 @@
+.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
+ :alt: License LGPL-3
+
+=======================
+Purchase Minimum Amount
+=======================
+
+This module allows you to establish and automate a specific Purchase Order
+Approval Block Reason in the system: the 'Minimum Purchase Order Amount per
+Vendor'.
+
+Configuration
+=============
+
+* Go to 'Purchases / Vendors'
+* Click on a Vendor and inside the 'Sales & Purchases' page specify the
+ non-required field 'Minimum Purchase Amount'.
+* Assign the security group 'Release blocked RFQ' to users that should be able
+ to release the block. Users in group 'Purchase / Managers' are by default
+ assigned to this group.
+
+Usage
+=====
+
+Set the Purchase Approval Block
+-------------------------------
+
+#. Go to 'Purchases / Purchase / Requests for Quotation'
+#. Create a new RFQ and upon saving if the Untaxed Amount is below the
+ Purchase Minimum Amount specified in that vendor, then the Approval Block
+ Reason is automatically set and the Approval Block Reason is not editable
+ anymore.
+
+Search existing RFQ
+-------------------
+
+There is a filter 'Blocked' to search for orders that are blocked.
+It is also possible to search RFQ’s with the Approval Block Reason 'Minimum
+Purchase Order Amount per Vendor'.
+
+Confirm the RFQ
+---------------
+
+#. Press the button ‘Confirm’. If there’s an approval block, the order will
+ be set to status 'To Approve'. You will then need to request a Purchase
+ Manager to approve it.
+
+Release the purchase approval block
+-----------------------------------
+
+#. All the RFQ’s with a total amount surpassing the specified Minimum Purchase
+ Order Amount for that vendor (excluding taxes) are automatically released.
+#. If a blocked RFQ without surpassing the minimum amount wants to be
+ released, a user member of the security group 'Release RFQ with approval
+ block' can see a button 'Release Approval Block'. When pressing it, anyone
+ seeing that RFQ is able to validate it.
+
+Notifications to followers
+--------------------------
+
+#. Followers of the RFQ receive notifications when an approval block has been
+ set or released.
+
+.. 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
+
+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.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Jordi Ballester Alomar
+* Roser Garcia
+* Darshan Patel
+
+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_minimum_amount/__init__.py b/purchase_minimum_amount/__init__.py
new file mode 100644
index 00000000000..dfe325b927f
--- /dev/null
+++ b/purchase_minimum_amount/__init__.py
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# Copyright 2016 Eficent Business and IT Consulting Services S.L.
+# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
+
+from . import models
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
new file mode 100644
index 00000000000..5fc1583bd18
--- /dev/null
+++ b/purchase_minimum_amount/__manifest__.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Copyright 2016 Eficent Business and IT Consulting Services S.L.
+# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
+
+{
+ "name": "Purchase Minimum Amount",
+ "author": "Eficent, Odoo Community Association (OCA)",
+ "version": "10.0.1.0.0",
+ "website": "https://github.com/OCA/purchase-workflow",
+ "depends": [
+ 'purchase',
+ 'purchase_order_approval_block',
+ ],
+ "data": [
+ 'data/purchase_block_reason_data.xml',
+ 'views/purchase_order_view.xml',
+ 'views/res_partner_view.xml',
+ ],
+ "license": 'LGPL-3',
+ "installable": True
+}
diff --git a/purchase_minimum_amount/data/purchase_block_reason_data.xml b/purchase_minimum_amount/data/purchase_block_reason_data.xml
new file mode 100644
index 00000000000..3443f2e968d
--- /dev/null
+++ b/purchase_minimum_amount/data/purchase_block_reason_data.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ Minimum Amount per Vendor
+ Set total minimum amount (before taxes) for a vendor.
+
+
diff --git a/purchase_minimum_amount/models/__init__.py b/purchase_minimum_amount/models/__init__.py
new file mode 100644
index 00000000000..8d87332e89c
--- /dev/null
+++ b/purchase_minimum_amount/models/__init__.py
@@ -0,0 +1,7 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
+# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+
+from . import purchase_order
+from . import partner
diff --git a/purchase_minimum_amount/models/partner.py b/purchase_minimum_amount/models/partner.py
new file mode 100644
index 00000000000..9fcf0382ba1
--- /dev/null
+++ b/purchase_minimum_amount/models/partner.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
+# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+
+from odoo import fields, models
+
+
+class ResPartner(models.Model):
+ _inherit = 'res.partner'
+
+ minimum_po_amount = fields.Float(string="Minimum Purchase Amount")
diff --git a/purchase_minimum_amount/models/purchase_order.py b/purchase_minimum_amount/models/purchase_order.py
new file mode 100644
index 00000000000..87a4fadf8b5
--- /dev/null
+++ b/purchase_minimum_amount/models/purchase_order.py
@@ -0,0 +1,70 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
+# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+
+from odoo import api, fields, models
+
+
+class PurchaseOrder(models.Model):
+ _inherit = "purchase.order"
+
+ minimum_po_amount = fields.Float(
+ related='partner_id.minimum_po_amount',
+ string="Purchase Minimum Amount",
+ readonly=True,
+ )
+
+ @api.multi
+ def _check_minimum_amount(self):
+ for rec in self:
+ po_amt_block = rec.env.ref('purchase_minimum_amount.'
+ 'minimum_amount_block_reason',
+ raise_if_not_found=False)
+ under_min = rec.amount_untaxed < rec.minimum_po_amount
+ force_release = rec.env.context.get(
+ 'force_po_approval_block_release', False)
+ if under_min and not rec.approval_block_id and not force_release:
+ rec.approval_block_id = po_amt_block
+ elif not under_min and rec.approval_block_id == po_amt_block:
+ rec.approval_block_id = False
+ return True
+
+ @api.model
+ def create(self, vals):
+ po = super(PurchaseOrder, self).create(vals)
+ po._check_minimum_amount()
+ return po
+
+ @api.multi
+ def write(self, vals):
+ res = super(PurchaseOrder, self).write(vals)
+ for rec in self:
+ if 'partner_id' in vals:
+ rec._check_minimum_amount()
+ return res
+
+
+class PurchaseOrderLine(models.Model):
+ _inherit = "purchase.order.line"
+
+ @api.model
+ def _check_minimum_amount_fields(self):
+ return ['product_qty', 'price_unit']
+
+ @api.model
+ def create(self, vals):
+ res = super(PurchaseOrderLine, self).create(vals)
+ fields = self._check_minimum_amount_fields()
+ if any(field in vals for field in fields):
+ res.order_id._check_minimum_amount()
+ return res
+
+ @api.multi
+ def write(self, vals):
+ res = super(PurchaseOrderLine, self).write(vals)
+ fields = self._check_minimum_amount_fields()
+ for rec in self:
+ if any(field in vals for field in fields):
+ rec.order_id._check_minimum_amount()
+ return res
diff --git a/purchase_minimum_amount/tests/__init__.py b/purchase_minimum_amount/tests/__init__.py
new file mode 100644
index 00000000000..a6b2f805bbd
--- /dev/null
+++ b/purchase_minimum_amount/tests/__init__.py
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
+# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+
+from . import test_po_minimum_amount_block
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
new file mode 100644
index 00000000000..522e5a5c1c5
--- /dev/null
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -0,0 +1,127 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
+# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+
+import time
+from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
+from odoo.tests.common import TransactionCase
+
+
+class TestPoAmountBlock(TransactionCase):
+
+ def setUp(self):
+ super(TestPoAmountBlock, self).setUp()
+ self.users_obj = self.env['res.users']
+ self.po_obj = self.env['purchase.order']
+ self.po_block_obj = self.env['purchase.approval.block.reason']
+ # company
+ self.company1 = self.env.ref('base.main_company')
+ # groups
+ self.group_purchase_user = self.env.ref('purchase.group_purchase_user')
+ self.group_purchase_manager = self.env.ref(
+ 'purchase.group_purchase_manager')
+ # Partner
+ self.partner1 = self.env.ref('base.res_partner_1')
+ # Products
+ self.product1 = self.env.ref('product.product_product_7')
+ self.product2 = self.env.ref('product.product_product_9')
+ self.product3 = self.env.ref('product.product_product_11')
+ # Create users
+ self.user1_id = self._create_user(
+ 'user_1',
+ [self.group_purchase_user],
+ self.company1,
+ )
+ self.user2_id = self._create_user(
+ 'user_2',
+ [self.group_purchase_manager],
+ self.company1,
+ )
+
+ def _create_user(self, login, groups, company):
+ """ Create a user."""
+ group_ids = [group.id for group in groups]
+ user =\
+ self.users_obj.with_context({'no_reset_password': True}).\
+ create({
+ 'name': 'Purchase User',
+ 'login': login,
+ 'password': 'test',
+ 'email': 'test@yourcompany.com',
+ 'company_id': company.id,
+ 'company_ids': [(4, company.id)],
+ 'groups_id': [(6, 0, group_ids)],
+ })
+ return user.id
+
+ def _create_purchase(self, line_products):
+ """ Create a purchase order.
+ ``line_products`` is a list of tuple [(product, qty)]
+ """
+ lines = []
+ for product, qty in line_products:
+ line_values = {
+ 'name': product.name,
+ 'product_id': product.id,
+ 'product_qty': qty,
+ 'product_uom': product.uom_id.id,
+ 'price_unit': 100,
+ 'date_planned': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT),
+ }
+ lines.append((0, 0, line_values))
+ purchase = self.po_obj.create({
+ 'partner_id': self.partner1.id,
+ 'approval_block_id': self.po_block_obj.id,
+ 'order_line': lines,
+ 'company_id': self.company1.id,
+ })
+ return purchase
+
+ def test_po_amount_block_1(self):
+ "Test PO Block for Minimum Threshold Vendor Amount"
+ self.partner1.write({'minimum_po_amount': 1500.00})
+
+ # Create a PO with an amount below the minimum and check that the
+ # Approval Block Reason is correctly assign
+ purchase1 = self._create_purchase(
+ [(self.product1, 1),
+ (self.product2, 5),
+ (self.product3, 8),
+ ]
+ )
+
+ self.assertEquals(
+ purchase1.approval_block_id,
+ self.env.ref(
+ 'purchase_minimum_amount.minimum_amount_block_reason'))
+
+ # Release the PO by pressing the button and then confirming the order
+ purchase1.sudo(self.user2_id).button_release_approval_block()
+ purchase1.sudo(self.user1_id).button_confirm()
+ self.assertEquals(purchase1.state, 'purchase')
+
+ def test_po_amount_block_2(self):
+ "Test PO Block for Minimum Threshold Vendor Amount"
+ self.partner1.write({'minimum_po_amount': 1500.00})
+
+ purchase1 = self._create_purchase(
+ [(self.product1, 1),
+ (self.product2, 5),
+ (self.product3, 8)])
+
+ self.assertEquals(
+ purchase1.approval_block_id,
+ self.env.ref(
+ 'purchase_minimum_amount.minimum_amount_block_reason'))
+
+ for po_line in purchase1.order_line:
+ if po_line.product_id == self.product1:
+ po_line.product_qty = 10
+
+ self.assertEquals(
+ purchase1.approval_block_id,
+ self.env['purchase.approval.block.reason'])
+
+ purchase1.sudo(self.user1_id).button_confirm()
+ self.assertEquals(purchase1.state, 'purchase')
diff --git a/purchase_minimum_amount/views/purchase_order_view.xml b/purchase_minimum_amount/views/purchase_order_view.xml
new file mode 100644
index 00000000000..ef4e054bcc9
--- /dev/null
+++ b/purchase_minimum_amount/views/purchase_order_view.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ purchase.order.form.minimum.po.amount
+ purchase.order
+
+
+
+
+
+
+ {'invisible': ['|','|',('approval_block_id', '=', False),('state', 'not in', ['draft', 'sent', 'to approve'])]}
+
+
+
+
+ request.quotation.minimum.block.reason
+ purchase.order
+
+
+
+ [('approval_block_id', '!=', False)]
+
+
+
+
diff --git a/purchase_minimum_amount/views/res_partner_view.xml b/purchase_minimum_amount/views/res_partner_view.xml
new file mode 100644
index 00000000000..1396da35c97
--- /dev/null
+++ b/purchase_minimum_amount/views/res_partner_view.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ res.partner.form.block.reason
+ res.partner
+
+
+
+
+
+
+
+
From 4daee85d2b0901844f673afd8c96bf8681594e7e Mon Sep 17 00:00:00 2001
From: rgarnau
Date: Tue, 14 Nov 2017 15:14:28 +0100
Subject: [PATCH 02/32] [MIG] purchase_minimum_amount: Migration to 11.0
---
purchase_minimum_amount/README.rst | 12 +++++++++---
purchase_minimum_amount/__init__.py | 3 +--
purchase_minimum_amount/__manifest__.py | 5 ++---
.../data/purchase_block_reason_data.xml | 6 ++++--
purchase_minimum_amount/models/__init__.py | 1 -
purchase_minimum_amount/models/partner.py | 1 -
purchase_minimum_amount/models/purchase_order.py | 1 -
purchase_minimum_amount/tests/__init__.py | 1 -
.../tests/test_po_minimum_amount_block.py | 1 -
.../views/purchase_order_view.xml | 6 ++++--
purchase_minimum_amount/views/res_partner_view.xml | 6 ++++--
11 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/purchase_minimum_amount/README.rst b/purchase_minimum_amount/README.rst
index 4bb25a4e7e9..57e963940cd 100644
--- a/purchase_minimum_amount/README.rst
+++ b/purchase_minimum_amount/README.rst
@@ -1,5 +1,6 @@
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
- :alt: License LGPL-3
+ :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
+ :alt: License LGPL-3
=======================
Purchase Minimum Amount
@@ -12,7 +13,7 @@ Vendor'.
Configuration
=============
-* Go to 'Purchases / Vendors'
+* Go to 'Purchases / Purchase / Vendors'
* Click on a Vendor and inside the 'Sales & Purchases' page specify the
non-required field 'Minimum Purchase Amount'.
* Assign the security group 'Release blocked RFQ' to users that should be able
@@ -63,7 +64,7 @@ Notifications to followers
.. 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
===========
@@ -76,6 +77,11 @@ help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
+Images
+------
+
+* Odoo Community Association: `Icon `_.
+
Contributors
------------
diff --git a/purchase_minimum_amount/__init__.py b/purchase_minimum_amount/__init__.py
index dfe325b927f..c2e157b0af2 100644
--- a/purchase_minimum_amount/__init__.py
+++ b/purchase_minimum_amount/__init__.py
@@ -1,5 +1,4 @@
-# -*- coding: utf-8 -*-
# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
+# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
from . import models
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index 5fc1583bd18..c4847549359 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -1,11 +1,10 @@
-# -*- coding: utf-8 -*-
# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
+# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
{
"name": "Purchase Minimum Amount",
"author": "Eficent, Odoo Community Association (OCA)",
- "version": "10.0.1.0.0",
+ "version": "11.0.1.0.0",
"website": "https://github.com/OCA/purchase-workflow",
"depends": [
'purchase',
diff --git a/purchase_minimum_amount/data/purchase_block_reason_data.xml b/purchase_minimum_amount/data/purchase_block_reason_data.xml
index 3443f2e968d..9e413e5d7dc 100644
--- a/purchase_minimum_amount/data/purchase_block_reason_data.xml
+++ b/purchase_minimum_amount/data/purchase_block_reason_data.xml
@@ -1,8 +1,10 @@
-
+ License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
+-->
diff --git a/purchase_minimum_amount/models/__init__.py b/purchase_minimum_amount/models/__init__.py
index 8d87332e89c..0bc5066bc89 100644
--- a/purchase_minimum_amount/models/__init__.py
+++ b/purchase_minimum_amount/models/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
diff --git a/purchase_minimum_amount/models/partner.py b/purchase_minimum_amount/models/partner.py
index 9fcf0382ba1..27f6307a4d1 100644
--- a/purchase_minimum_amount/models/partner.py
+++ b/purchase_minimum_amount/models/partner.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
diff --git a/purchase_minimum_amount/models/purchase_order.py b/purchase_minimum_amount/models/purchase_order.py
index 87a4fadf8b5..97dd65c85b9 100644
--- a/purchase_minimum_amount/models/purchase_order.py
+++ b/purchase_minimum_amount/models/purchase_order.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
diff --git a/purchase_minimum_amount/tests/__init__.py b/purchase_minimum_amount/tests/__init__.py
index a6b2f805bbd..e2e190cf72f 100644
--- a/purchase_minimum_amount/tests/__init__.py
+++ b/purchase_minimum_amount/tests/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index 522e5a5c1c5..75220b4c36d 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
diff --git a/purchase_minimum_amount/views/purchase_order_view.xml b/purchase_minimum_amount/views/purchase_order_view.xml
index ef4e054bcc9..35b55cc2233 100644
--- a/purchase_minimum_amount/views/purchase_order_view.xml
+++ b/purchase_minimum_amount/views/purchase_order_view.xml
@@ -1,8 +1,10 @@
-
+ License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
+-->
diff --git a/purchase_minimum_amount/views/res_partner_view.xml b/purchase_minimum_amount/views/res_partner_view.xml
index 1396da35c97..38eca31adf9 100644
--- a/purchase_minimum_amount/views/res_partner_view.xml
+++ b/purchase_minimum_amount/views/res_partner_view.xml
@@ -1,8 +1,10 @@
-
+ License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
+-->
From 90c2a77becac1a6f2588424cd6e7f24fc22c6a22 Mon Sep 17 00:00:00 2001
From: OCA Transbot
Date: Sat, 3 Mar 2018 11:22:29 +0100
Subject: [PATCH 03/32] OCA Transbot updated translations from Transifex
[UPD] Update purchase_minimum_amount.pot
---
purchase_minimum_amount/i18n/de.po | 45 ++++++++++++++++++
purchase_minimum_amount/i18n/es.po | 45 ++++++++++++++++++
purchase_minimum_amount/i18n/es_MX.po | 46 +++++++++++++++++++
purchase_minimum_amount/i18n/fr.po | 46 +++++++++++++++++++
purchase_minimum_amount/i18n/it.po | 45 ++++++++++++++++++
purchase_minimum_amount/i18n/pt_BR.po | 46 +++++++++++++++++++
.../i18n/purchase_minimum_amount.pot | 41 +++++++++++++++++
purchase_minimum_amount/i18n/sl.po | 46 +++++++++++++++++++
8 files changed, 360 insertions(+)
create mode 100644 purchase_minimum_amount/i18n/de.po
create mode 100644 purchase_minimum_amount/i18n/es.po
create mode 100644 purchase_minimum_amount/i18n/es_MX.po
create mode 100644 purchase_minimum_amount/i18n/fr.po
create mode 100644 purchase_minimum_amount/i18n/it.po
create mode 100644 purchase_minimum_amount/i18n/pt_BR.po
create mode 100644 purchase_minimum_amount/i18n/purchase_minimum_amount.pot
create mode 100644 purchase_minimum_amount/i18n/sl.po
diff --git a/purchase_minimum_amount/i18n/de.po b/purchase_minimum_amount/i18n/de.po
new file mode 100644
index 00000000000..482876c54ec
--- /dev/null
+++ b/purchase_minimum_amount/i18n/de.po
@@ -0,0 +1,45 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * purchase_minimum_amount
+#
+# Translators:
+# OCA Transbot , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-23 17:50+0000\n"
+"PO-Revision-Date: 2018-02-23 17:50+0000\n"
+"Last-Translator: OCA Transbot , 2018\n"
+"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
+"Language: de\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"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+msgid "Minimum Purchase Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+msgid "Purchase Minimum Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Bestellposition"
diff --git a/purchase_minimum_amount/i18n/es.po b/purchase_minimum_amount/i18n/es.po
new file mode 100644
index 00000000000..712eb666387
--- /dev/null
+++ b/purchase_minimum_amount/i18n/es.po
@@ -0,0 +1,45 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * purchase_minimum_amount
+#
+# Translators:
+# OCA Transbot , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-23 17:50+0000\n"
+"PO-Revision-Date: 2018-02-23 17:50+0000\n"
+"Last-Translator: OCA Transbot , 2018\n"
+"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+msgid "Minimum Purchase Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+msgid "Purchase Minimum Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Línea orden de compra"
diff --git a/purchase_minimum_amount/i18n/es_MX.po b/purchase_minimum_amount/i18n/es_MX.po
new file mode 100644
index 00000000000..61737a411e3
--- /dev/null
+++ b/purchase_minimum_amount/i18n/es_MX.po
@@ -0,0 +1,46 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * purchase_minimum_amount
+#
+# Translators:
+# OCA Transbot , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-23 17:50+0000\n"
+"PO-Revision-Date: 2018-02-23 17:50+0000\n"
+"Last-Translator: OCA Transbot , 2018\n"
+"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/"
+"es_MX/)\n"
+"Language: es_MX\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"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+msgid "Minimum Purchase Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+msgid "Purchase Minimum Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Línea de orden de compra"
diff --git a/purchase_minimum_amount/i18n/fr.po b/purchase_minimum_amount/i18n/fr.po
new file mode 100644
index 00000000000..b0222fe3f1a
--- /dev/null
+++ b/purchase_minimum_amount/i18n/fr.po
@@ -0,0 +1,46 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * purchase_minimum_amount
+#
+# Translators:
+# OCA Transbot , 2018
+# Quentin THEURET , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-23 17:50+0000\n"
+"PO-Revision-Date: 2018-02-23 17:50+0000\n"
+"Last-Translator: Quentin THEURET , 2018\n"
+"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
+"Language: fr\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"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+msgid "Minimum Purchase Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+msgid "Purchase Minimum Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
+msgid "Purchase Order"
+msgstr "Commande"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Ligne de commande d'achat"
diff --git a/purchase_minimum_amount/i18n/it.po b/purchase_minimum_amount/i18n/it.po
new file mode 100644
index 00000000000..a277960fe5d
--- /dev/null
+++ b/purchase_minimum_amount/i18n/it.po
@@ -0,0 +1,45 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * purchase_minimum_amount
+#
+# Translators:
+# OCA Transbot , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-23 17:50+0000\n"
+"PO-Revision-Date: 2018-02-23 17:50+0000\n"
+"Last-Translator: OCA Transbot , 2018\n"
+"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
+"Language: it\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"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+msgid "Minimum Purchase Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+msgid "Purchase Minimum Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Riga Ordine d'Acquisto"
diff --git a/purchase_minimum_amount/i18n/pt_BR.po b/purchase_minimum_amount/i18n/pt_BR.po
new file mode 100644
index 00000000000..b6cf535443c
--- /dev/null
+++ b/purchase_minimum_amount/i18n/pt_BR.po
@@ -0,0 +1,46 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * purchase_minimum_amount
+#
+# Translators:
+# OCA Transbot , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-23 17:50+0000\n"
+"PO-Revision-Date: 2018-02-23 17:50+0000\n"
+"Last-Translator: OCA Transbot , 2018\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
+"Language: pt_BR\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"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+msgid "Minimum Purchase Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+msgid "Purchase Minimum Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Linha da Ordem de Compra"
diff --git a/purchase_minimum_amount/i18n/purchase_minimum_amount.pot b/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
new file mode 100644
index 00000000000..3fddd9014a6
--- /dev/null
+++ b/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
@@ -0,0 +1,41 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * purchase_minimum_amount
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+msgid "Minimum Purchase Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+msgid "Purchase Minimum Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr ""
+
diff --git a/purchase_minimum_amount/i18n/sl.po b/purchase_minimum_amount/i18n/sl.po
new file mode 100644
index 00000000000..99a49110af7
--- /dev/null
+++ b/purchase_minimum_amount/i18n/sl.po
@@ -0,0 +1,46 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * purchase_minimum_amount
+#
+# Translators:
+# OCA Transbot , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-02-23 17:50+0000\n"
+"PO-Revision-Date: 2018-02-23 17:50+0000\n"
+"Last-Translator: OCA Transbot , 2018\n"
+"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
+"Language: sl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
+"%100==4 ? 2 : 3);\n"
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+msgid "Minimum Purchase Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+msgid "Purchase Minimum Amount"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Postavka nabavnega naloga"
From cf5e3fd67f3e2aad7f81518f69b7eac13eec1358 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Wed, 3 Apr 2019 03:16:11 +0000
Subject: [PATCH 04/32] [ADD] icon.png
---
.../static/description/icon.png | Bin 0 -> 9455 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 purchase_minimum_amount/static/description/icon.png
diff --git a/purchase_minimum_amount/static/description/icon.png b/purchase_minimum_amount/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d
GIT binary patch
literal 9455
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
z
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
Xviia!U7SGha1wx#SCgwmn*{w2TRX*I
literal 0
HcmV?d00001
From d40c67f964b799e8cc37b6b9497defb09c2a8419 Mon Sep 17 00:00:00 2001
From: Roodin
Date: Mon, 23 Sep 2019 16:23:42 +0000
Subject: [PATCH 05/32] Translated using Weblate (Spanish)
Currently translated at 100.0% (5 of 5 strings)
Translation: purchase-workflow-11.0/purchase-workflow-11.0-purchase_minimum_amount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-11-0/purchase-workflow-11-0-purchase_minimum_amount/es/
---
purchase_minimum_amount/i18n/es.po | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/purchase_minimum_amount/i18n/es.po b/purchase_minimum_amount/i18n/es.po
index 712eb666387..0e1a1e335fa 100644
--- a/purchase_minimum_amount/i18n/es.po
+++ b/purchase_minimum_amount/i18n/es.po
@@ -9,35 +9,36 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
-"PO-Revision-Date: 2018-02-23 17:50+0000\n"
-"Last-Translator: OCA Transbot , 2018\n"
+"PO-Revision-Date: 2019-09-23 16:24+0000\n"
+"Last-Translator: Roodin \n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 3.8\n"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_res_partner
msgid "Contact"
-msgstr ""
+msgstr "Contacto"
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
msgid "Minimum Purchase Amount"
-msgstr ""
+msgstr "Importe mínimo de compra"
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
msgid "Purchase Minimum Amount"
-msgstr ""
+msgstr "Importe mínimo de compra"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
msgid "Purchase Order"
-msgstr ""
+msgstr "Orden de compra"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
From e103fa59c3fffdb08eedd9f0774577e46ef4d2c5 Mon Sep 17 00:00:00 2001
From: Nikul-Chaudhary
Date: Sat, 26 Jan 2019 23:32:31 +0530
Subject: [PATCH 06/32] [MIG] purchase_minimum_amount v11 to v12
---
purchase_minimum_amount/README.rst | 1 +
purchase_minimum_amount/__init__.py | 1 -
purchase_minimum_amount/__manifest__.py | 2 +-
purchase_minimum_amount/data/purchase_block_reason_data.xml | 2 ++
purchase_minimum_amount/models/__init__.py | 2 --
purchase_minimum_amount/models/partner.py | 2 +-
purchase_minimum_amount/models/purchase_order.py | 1 -
purchase_minimum_amount/tests/__init__.py | 2 --
purchase_minimum_amount/tests/test_po_minimum_amount_block.py | 4 ++--
9 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/purchase_minimum_amount/README.rst b/purchase_minimum_amount/README.rst
index 57e963940cd..783e13b8d2a 100644
--- a/purchase_minimum_amount/README.rst
+++ b/purchase_minimum_amount/README.rst
@@ -88,6 +88,7 @@ Contributors
* Jordi Ballester Alomar
* Roser Garcia
* Darshan Patel
+* Nikul Chaudhary
Maintainer
----------
diff --git a/purchase_minimum_amount/__init__.py b/purchase_minimum_amount/__init__.py
index c2e157b0af2..a933daa3335 100644
--- a/purchase_minimum_amount/__init__.py
+++ b/purchase_minimum_amount/__init__.py
@@ -1,4 +1,3 @@
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
from . import models
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index c4847549359..7561c513dc2 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Purchase Minimum Amount",
"author": "Eficent, Odoo Community Association (OCA)",
- "version": "11.0.1.0.0",
+ "version": "12.0.1.0.0",
"website": "https://github.com/OCA/purchase-workflow",
"depends": [
'purchase',
diff --git a/purchase_minimum_amount/data/purchase_block_reason_data.xml b/purchase_minimum_amount/data/purchase_block_reason_data.xml
index 9e413e5d7dc..575a5f9986c 100644
--- a/purchase_minimum_amount/data/purchase_block_reason_data.xml
+++ b/purchase_minimum_amount/data/purchase_block_reason_data.xml
@@ -7,8 +7,10 @@
-->
+
Minimum Amount per Vendor
Set total minimum amount (before taxes) for a vendor.
+
diff --git a/purchase_minimum_amount/models/__init__.py b/purchase_minimum_amount/models/__init__.py
index 0bc5066bc89..90ba8fa805b 100644
--- a/purchase_minimum_amount/models/__init__.py
+++ b/purchase_minimum_amount/models/__init__.py
@@ -1,5 +1,3 @@
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
-# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from . import purchase_order
diff --git a/purchase_minimum_amount/models/partner.py b/purchase_minimum_amount/models/partner.py
index 27f6307a4d1..050aceb8521 100644
--- a/purchase_minimum_amount/models/partner.py
+++ b/purchase_minimum_amount/models/partner.py
@@ -8,4 +8,4 @@
class ResPartner(models.Model):
_inherit = 'res.partner'
- minimum_po_amount = fields.Float(string="Minimum Purchase Amount")
+ minimum_po_amount = fields.Float("Minimum Purchase Amount")
diff --git a/purchase_minimum_amount/models/purchase_order.py b/purchase_minimum_amount/models/purchase_order.py
index 97dd65c85b9..8399c1c7563 100644
--- a/purchase_minimum_amount/models/purchase_order.py
+++ b/purchase_minimum_amount/models/purchase_order.py
@@ -11,7 +11,6 @@ class PurchaseOrder(models.Model):
minimum_po_amount = fields.Float(
related='partner_id.minimum_po_amount',
string="Purchase Minimum Amount",
- readonly=True,
)
@api.multi
diff --git a/purchase_minimum_amount/tests/__init__.py b/purchase_minimum_amount/tests/__init__.py
index e2e190cf72f..99432d05d32 100644
--- a/purchase_minimum_amount/tests/__init__.py
+++ b/purchase_minimum_amount/tests/__init__.py
@@ -1,5 +1,3 @@
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
-# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from . import test_po_minimum_amount_block
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index 75220b4c36d..c1c7b6a987f 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -97,7 +97,7 @@ def test_po_amount_block_1(self):
# Release the PO by pressing the button and then confirming the order
purchase1.sudo(self.user2_id).button_release_approval_block()
- purchase1.sudo(self.user1_id).button_confirm()
+ purchase1.sudo().button_confirm()
self.assertEquals(purchase1.state, 'purchase')
def test_po_amount_block_2(self):
@@ -122,5 +122,5 @@ def test_po_amount_block_2(self):
purchase1.approval_block_id,
self.env['purchase.approval.block.reason'])
- purchase1.sudo(self.user1_id).button_confirm()
+ purchase1.sudo().button_confirm()
self.assertEquals(purchase1.state, 'purchase')
From fe880a1cab633b70fac95bfb730b5757ae24dd61 Mon Sep 17 00:00:00 2001
From: Jaime Arroyo
Date: Tue, 24 Mar 2020 09:28:34 +0100
Subject: [PATCH 07/32] [12.0][FIX] finish migration
[UPD] Update purchase_minimum_amount.pot
---
purchase_minimum_amount/i18n/purchase_minimum_amount.pot | 8 ++++----
.../tests/test_po_minimum_amount_block.py | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/purchase_minimum_amount/i18n/purchase_minimum_amount.pot b/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
index 3fddd9014a6..1ea49639300 100644
--- a/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
+++ b/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 11.0\n"
+"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -19,13 +19,13 @@ msgid "Contact"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
msgstr ""
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index c1c7b6a987f..15df1850943 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -78,7 +78,7 @@ def _create_purchase(self, line_products):
return purchase
def test_po_amount_block_1(self):
- "Test PO Block for Minimum Threshold Vendor Amount"
+ """Test PO Block for Minimum Threshold Vendor Amount"""
self.partner1.write({'minimum_po_amount': 1500.00})
# Create a PO with an amount below the minimum and check that the
@@ -101,7 +101,7 @@ def test_po_amount_block_1(self):
self.assertEquals(purchase1.state, 'purchase')
def test_po_amount_block_2(self):
- "Test PO Block for Minimum Threshold Vendor Amount"
+ """Test PO Block for Minimum Threshold Vendor Amount"""
self.partner1.write({'minimum_po_amount': 1500.00})
purchase1 = self._create_purchase(
@@ -122,5 +122,5 @@ def test_po_amount_block_2(self):
purchase1.approval_block_id,
self.env['purchase.approval.block.reason'])
- purchase1.sudo().button_confirm()
+ purchase1.sudo(self.user1_id).button_confirm()
self.assertEquals(purchase1.state, 'purchase')
From 67e88414cd222a16a8bda2d0b2b063e08454f72d Mon Sep 17 00:00:00 2001
From: OCA Transbot
Date: Tue, 7 Apr 2020 10:07:21 +0000
Subject: [PATCH 08/32] Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_minimum_amount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_minimum_amount/
---
purchase_minimum_amount/i18n/de.po | 6 +++---
purchase_minimum_amount/i18n/es.po | 6 +++---
purchase_minimum_amount/i18n/es_MX.po | 6 +++---
purchase_minimum_amount/i18n/fr.po | 6 +++---
purchase_minimum_amount/i18n/it.po | 6 +++---
purchase_minimum_amount/i18n/pt_BR.po | 6 +++---
purchase_minimum_amount/i18n/sl.po | 6 +++---
7 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/purchase_minimum_amount/i18n/de.po b/purchase_minimum_amount/i18n/de.po
index 482876c54ec..94a1aecb61b 100644
--- a/purchase_minimum_amount/i18n/de.po
+++ b/purchase_minimum_amount/i18n/de.po
@@ -24,13 +24,13 @@ msgid "Contact"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
msgstr ""
diff --git a/purchase_minimum_amount/i18n/es.po b/purchase_minimum_amount/i18n/es.po
index 0e1a1e335fa..f60f62a11b2 100644
--- a/purchase_minimum_amount/i18n/es.po
+++ b/purchase_minimum_amount/i18n/es.po
@@ -25,13 +25,13 @@ msgid "Contact"
msgstr "Contacto"
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
msgstr "Importe mínimo de compra"
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
msgstr "Importe mínimo de compra"
diff --git a/purchase_minimum_amount/i18n/es_MX.po b/purchase_minimum_amount/i18n/es_MX.po
index 61737a411e3..cf9095cae78 100644
--- a/purchase_minimum_amount/i18n/es_MX.po
+++ b/purchase_minimum_amount/i18n/es_MX.po
@@ -25,13 +25,13 @@ msgid "Contact"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
msgstr ""
diff --git a/purchase_minimum_amount/i18n/fr.po b/purchase_minimum_amount/i18n/fr.po
index b0222fe3f1a..2363d84b6c2 100644
--- a/purchase_minimum_amount/i18n/fr.po
+++ b/purchase_minimum_amount/i18n/fr.po
@@ -25,13 +25,13 @@ msgid "Contact"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
msgstr ""
diff --git a/purchase_minimum_amount/i18n/it.po b/purchase_minimum_amount/i18n/it.po
index a277960fe5d..e217a018456 100644
--- a/purchase_minimum_amount/i18n/it.po
+++ b/purchase_minimum_amount/i18n/it.po
@@ -24,13 +24,13 @@ msgid "Contact"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
msgstr ""
diff --git a/purchase_minimum_amount/i18n/pt_BR.po b/purchase_minimum_amount/i18n/pt_BR.po
index b6cf535443c..efa8a8fedb2 100644
--- a/purchase_minimum_amount/i18n/pt_BR.po
+++ b/purchase_minimum_amount/i18n/pt_BR.po
@@ -25,13 +25,13 @@ msgid "Contact"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
msgstr ""
diff --git a/purchase_minimum_amount/i18n/sl.po b/purchase_minimum_amount/i18n/sl.po
index 99a49110af7..e8aeaed9e38 100644
--- a/purchase_minimum_amount/i18n/sl.po
+++ b/purchase_minimum_amount/i18n/sl.po
@@ -25,13 +25,13 @@ msgid "Contact"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner_minimum_po_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
msgstr ""
#. module: purchase_minimum_amount
-#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_minimum_po_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
msgstr ""
From 78be84f7cfbad1ce31751428cea8930a1b39bcc4 Mon Sep 17 00:00:00 2001
From: Matjaz Mozetic
Date: Wed, 12 Aug 2020 13:55:40 +0000
Subject: [PATCH 09/32] Translated using Weblate (Slovenian)
Currently translated at 40.0% (2 of 5 strings)
Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_minimum_amount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_minimum_amount/sl/
---
purchase_minimum_amount/i18n/sl.po | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/purchase_minimum_amount/i18n/sl.po b/purchase_minimum_amount/i18n/sl.po
index e8aeaed9e38..bc2b4d1f950 100644
--- a/purchase_minimum_amount/i18n/sl.po
+++ b/purchase_minimum_amount/i18n/sl.po
@@ -9,15 +9,16 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
-"PO-Revision-Date: 2018-02-23 17:50+0000\n"
-"Last-Translator: OCA Transbot , 2018\n"
+"PO-Revision-Date: 2020-08-12 15:59+0000\n"
+"Last-Translator: Matjaz Mozetic \n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
-"%100==4 ? 2 : 3);\n"
+"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
+"n%100==4 ? 2 : 3;\n"
+"X-Generator: Weblate 3.10\n"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_res_partner
@@ -38,7 +39,7 @@ msgstr ""
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
msgid "Purchase Order"
-msgstr ""
+msgstr "Nabavni nalog"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
From e6e0e277fba6cba720699404bd90ed3bfe7fa478 Mon Sep 17 00:00:00 2001
From: Sandie FAVRE
Date: Fri, 28 Aug 2020 14:43:37 +0000
Subject: [PATCH 10/32] Translated using Weblate (French)
Currently translated at 100.0% (5 of 5 strings)
Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_minimum_amount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_minimum_amount/fr/
---
purchase_minimum_amount/i18n/fr.po | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/purchase_minimum_amount/i18n/fr.po b/purchase_minimum_amount/i18n/fr.po
index 2363d84b6c2..9bf2d2d39a6 100644
--- a/purchase_minimum_amount/i18n/fr.po
+++ b/purchase_minimum_amount/i18n/fr.po
@@ -10,30 +10,31 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
-"PO-Revision-Date: 2018-02-23 17:50+0000\n"
-"Last-Translator: Quentin THEURET , 2018\n"
+"PO-Revision-Date: 2020-08-28 17:00+0000\n"
+"Last-Translator: Sandie FAVRE \n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"Language: fr\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"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 3.10\n"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_res_partner
msgid "Contact"
-msgstr ""
+msgstr "Contact"
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
-msgstr ""
+msgstr "Montant minimum d'achat"
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
-msgstr ""
+msgstr "Montant minimum d'achat"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
From 5a760307072a5b9174caef01c394954a072725af Mon Sep 17 00:00:00 2001
From: Matjaz Mozetic
Date: Wed, 24 Feb 2021 10:10:32 +0000
Subject: [PATCH 11/32] Translated using Weblate (Slovenian)
Currently translated at 100.0% (5 of 5 strings)
Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_minimum_amount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_minimum_amount/sl/
---
purchase_minimum_amount/i18n/sl.po | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/purchase_minimum_amount/i18n/sl.po b/purchase_minimum_amount/i18n/sl.po
index bc2b4d1f950..6541c584b29 100644
--- a/purchase_minimum_amount/i18n/sl.po
+++ b/purchase_minimum_amount/i18n/sl.po
@@ -9,32 +9,32 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
-"PO-Revision-Date: 2020-08-12 15:59+0000\n"
-"Last-Translator: Matjaz Mozetic \n"
+"PO-Revision-Date: 2021-02-24 11:45+0000\n"
+"Last-Translator: Matjaz Mozetic \n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
-"n%100==4 ? 2 : 3;\n"
-"X-Generator: Weblate 3.10\n"
+"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
+"%100==4 ? 2 : 3;\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_res_partner
msgid "Contact"
-msgstr ""
+msgstr "Stik"
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
-msgstr ""
+msgstr "Minimalni nabavni znesek"
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
-msgstr ""
+msgstr "Minimalni nabavni znesek"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
From cb881112561e07ce3e3f1ad00ac626b7c3075387 Mon Sep 17 00:00:00 2001
From: Alba Riera
Date: Wed, 24 Feb 2021 13:54:32 +0100
Subject: [PATCH 12/32] [IMP] purchase_minimum_amount: black, isort, prettier
---
purchase_minimum_amount/__manifest__.py | 15 +--
.../data/purchase_block_reason_data.xml | 10 +-
purchase_minimum_amount/models/partner.py | 2 +-
.../models/purchase_order.py | 17 +--
.../tests/test_po_minimum_amount_block.py | 111 ++++++++----------
.../views/purchase_order_view.xml | 27 +++--
.../views/res_partner_view.xml | 18 +--
7 files changed, 99 insertions(+), 101 deletions(-)
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index 7561c513dc2..0d0b04667c6 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -6,15 +6,12 @@
"author": "Eficent, Odoo Community Association (OCA)",
"version": "12.0.1.0.0",
"website": "https://github.com/OCA/purchase-workflow",
- "depends": [
- 'purchase',
- 'purchase_order_approval_block',
- ],
+ "depends": ["purchase", "purchase_order_approval_block",],
"data": [
- 'data/purchase_block_reason_data.xml',
- 'views/purchase_order_view.xml',
- 'views/res_partner_view.xml',
+ "data/purchase_block_reason_data.xml",
+ "views/purchase_order_view.xml",
+ "views/res_partner_view.xml",
],
- "license": 'LGPL-3',
- "installable": True
+ "license": "LGPL-3",
+ "installable": True,
}
diff --git a/purchase_minimum_amount/data/purchase_block_reason_data.xml b/purchase_minimum_amount/data/purchase_block_reason_data.xml
index 575a5f9986c..fe759666e29 100644
--- a/purchase_minimum_amount/data/purchase_block_reason_data.xml
+++ b/purchase_minimum_amount/data/purchase_block_reason_data.xml
@@ -1,16 +1,14 @@
-
-
+
-
-
Minimum Amount per Vendor
- Set total minimum amount (before taxes) for a vendor.
+ Set total minimum amount (before taxes) for a vendor.
-
diff --git a/purchase_minimum_amount/models/partner.py b/purchase_minimum_amount/models/partner.py
index 050aceb8521..17b1a08ffff 100644
--- a/purchase_minimum_amount/models/partner.py
+++ b/purchase_minimum_amount/models/partner.py
@@ -6,6 +6,6 @@
class ResPartner(models.Model):
- _inherit = 'res.partner'
+ _inherit = "res.partner"
minimum_po_amount = fields.Float("Minimum Purchase Amount")
diff --git a/purchase_minimum_amount/models/purchase_order.py b/purchase_minimum_amount/models/purchase_order.py
index 8399c1c7563..38a73099d85 100644
--- a/purchase_minimum_amount/models/purchase_order.py
+++ b/purchase_minimum_amount/models/purchase_order.py
@@ -9,19 +9,20 @@ class PurchaseOrder(models.Model):
_inherit = "purchase.order"
minimum_po_amount = fields.Float(
- related='partner_id.minimum_po_amount',
- string="Purchase Minimum Amount",
+ related="partner_id.minimum_po_amount", string="Purchase Minimum Amount",
)
@api.multi
def _check_minimum_amount(self):
for rec in self:
- po_amt_block = rec.env.ref('purchase_minimum_amount.'
- 'minimum_amount_block_reason',
- raise_if_not_found=False)
+ po_amt_block = rec.env.ref(
+ "purchase_minimum_amount." "minimum_amount_block_reason",
+ raise_if_not_found=False,
+ )
under_min = rec.amount_untaxed < rec.minimum_po_amount
force_release = rec.env.context.get(
- 'force_po_approval_block_release', False)
+ "force_po_approval_block_release", False
+ )
if under_min and not rec.approval_block_id and not force_release:
rec.approval_block_id = po_amt_block
elif not under_min and rec.approval_block_id == po_amt_block:
@@ -38,7 +39,7 @@ def create(self, vals):
def write(self, vals):
res = super(PurchaseOrder, self).write(vals)
for rec in self:
- if 'partner_id' in vals:
+ if "partner_id" in vals:
rec._check_minimum_amount()
return res
@@ -48,7 +49,7 @@ class PurchaseOrderLine(models.Model):
@api.model
def _check_minimum_amount_fields(self):
- return ['product_qty', 'price_unit']
+ return ["product_qty", "price_unit"]
@api.model
def create(self, vals):
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index 15df1850943..70a89d82029 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -3,55 +3,50 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
import time
-from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
+
from odoo.tests.common import TransactionCase
+from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
class TestPoAmountBlock(TransactionCase):
-
def setUp(self):
super(TestPoAmountBlock, self).setUp()
- self.users_obj = self.env['res.users']
- self.po_obj = self.env['purchase.order']
- self.po_block_obj = self.env['purchase.approval.block.reason']
+ self.users_obj = self.env["res.users"]
+ self.po_obj = self.env["purchase.order"]
+ self.po_block_obj = self.env["purchase.approval.block.reason"]
# company
- self.company1 = self.env.ref('base.main_company')
+ self.company1 = self.env.ref("base.main_company")
# groups
- self.group_purchase_user = self.env.ref('purchase.group_purchase_user')
- self.group_purchase_manager = self.env.ref(
- 'purchase.group_purchase_manager')
+ self.group_purchase_user = self.env.ref("purchase.group_purchase_user")
+ self.group_purchase_manager = self.env.ref("purchase.group_purchase_manager")
# Partner
- self.partner1 = self.env.ref('base.res_partner_1')
+ self.partner1 = self.env.ref("base.res_partner_1")
# Products
- self.product1 = self.env.ref('product.product_product_7')
- self.product2 = self.env.ref('product.product_product_9')
- self.product3 = self.env.ref('product.product_product_11')
+ self.product1 = self.env.ref("product.product_product_7")
+ self.product2 = self.env.ref("product.product_product_9")
+ self.product3 = self.env.ref("product.product_product_11")
# Create users
self.user1_id = self._create_user(
- 'user_1',
- [self.group_purchase_user],
- self.company1,
+ "user_1", [self.group_purchase_user], self.company1,
)
self.user2_id = self._create_user(
- 'user_2',
- [self.group_purchase_manager],
- self.company1,
+ "user_2", [self.group_purchase_manager], self.company1,
)
def _create_user(self, login, groups, company):
""" Create a user."""
group_ids = [group.id for group in groups]
- user =\
- self.users_obj.with_context({'no_reset_password': True}).\
- create({
- 'name': 'Purchase User',
- 'login': login,
- 'password': 'test',
- 'email': 'test@yourcompany.com',
- 'company_id': company.id,
- 'company_ids': [(4, company.id)],
- 'groups_id': [(6, 0, group_ids)],
- })
+ user = self.users_obj.with_context({"no_reset_password": True}).create(
+ {
+ "name": "Purchase User",
+ "login": login,
+ "password": "test",
+ "email": "test@yourcompany.com",
+ "company_id": company.id,
+ "company_ids": [(4, company.id)],
+ "groups_id": [(6, 0, group_ids)],
+ }
+ )
return user.id
def _create_purchase(self, line_products):
@@ -61,66 +56,64 @@ def _create_purchase(self, line_products):
lines = []
for product, qty in line_products:
line_values = {
- 'name': product.name,
- 'product_id': product.id,
- 'product_qty': qty,
- 'product_uom': product.uom_id.id,
- 'price_unit': 100,
- 'date_planned': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT),
+ "name": product.name,
+ "product_id": product.id,
+ "product_qty": qty,
+ "product_uom": product.uom_id.id,
+ "price_unit": 100,
+ "date_planned": time.strftime(DEFAULT_SERVER_DATETIME_FORMAT),
}
lines.append((0, 0, line_values))
- purchase = self.po_obj.create({
- 'partner_id': self.partner1.id,
- 'approval_block_id': self.po_block_obj.id,
- 'order_line': lines,
- 'company_id': self.company1.id,
- })
+ purchase = self.po_obj.create(
+ {
+ "partner_id": self.partner1.id,
+ "approval_block_id": self.po_block_obj.id,
+ "order_line": lines,
+ "company_id": self.company1.id,
+ }
+ )
return purchase
def test_po_amount_block_1(self):
"""Test PO Block for Minimum Threshold Vendor Amount"""
- self.partner1.write({'minimum_po_amount': 1500.00})
+ self.partner1.write({"minimum_po_amount": 1500.00})
# Create a PO with an amount below the minimum and check that the
# Approval Block Reason is correctly assign
purchase1 = self._create_purchase(
- [(self.product1, 1),
- (self.product2, 5),
- (self.product3, 8),
- ]
+ [(self.product1, 1), (self.product2, 5), (self.product3, 8),]
)
self.assertEquals(
purchase1.approval_block_id,
- self.env.ref(
- 'purchase_minimum_amount.minimum_amount_block_reason'))
+ self.env.ref("purchase_minimum_amount.minimum_amount_block_reason"),
+ )
# Release the PO by pressing the button and then confirming the order
purchase1.sudo(self.user2_id).button_release_approval_block()
purchase1.sudo().button_confirm()
- self.assertEquals(purchase1.state, 'purchase')
+ self.assertEquals(purchase1.state, "purchase")
def test_po_amount_block_2(self):
"""Test PO Block for Minimum Threshold Vendor Amount"""
- self.partner1.write({'minimum_po_amount': 1500.00})
+ self.partner1.write({"minimum_po_amount": 1500.00})
purchase1 = self._create_purchase(
- [(self.product1, 1),
- (self.product2, 5),
- (self.product3, 8)])
+ [(self.product1, 1), (self.product2, 5), (self.product3, 8)]
+ )
self.assertEquals(
purchase1.approval_block_id,
- self.env.ref(
- 'purchase_minimum_amount.minimum_amount_block_reason'))
+ self.env.ref("purchase_minimum_amount.minimum_amount_block_reason"),
+ )
for po_line in purchase1.order_line:
if po_line.product_id == self.product1:
po_line.product_qty = 10
self.assertEquals(
- purchase1.approval_block_id,
- self.env['purchase.approval.block.reason'])
+ purchase1.approval_block_id, self.env["purchase.approval.block.reason"]
+ )
purchase1.sudo(self.user1_id).button_confirm()
- self.assertEquals(purchase1.state, 'purchase')
+ self.assertEquals(purchase1.state, "purchase")
diff --git a/purchase_minimum_amount/views/purchase_order_view.xml b/purchase_minimum_amount/views/purchase_order_view.xml
index 35b55cc2233..32532491678 100644
--- a/purchase_minimum_amount/views/purchase_order_view.xml
+++ b/purchase_minimum_amount/views/purchase_order_view.xml
@@ -1,33 +1,40 @@
-
-
+
-
purchase.order.form.minimum.po.amount
purchase.order
-
+
-
+
-
- {'invisible': ['|','|',('approval_block_id', '=', False),('state', 'not in', ['draft', 'sent', 'to approve'])]}
+
+ {'invisible': ['|','|',('approval_block_id', '=', False),('state', 'not in', ['draft', 'sent', 'to approve'])]}
request.quotation.minimum.block.reason
purchase.order
-
+
- [('approval_block_id', '!=', False)]
+ [('approval_block_id', '!=', False)]
diff --git a/purchase_minimum_amount/views/res_partner_view.xml b/purchase_minimum_amount/views/res_partner_view.xml
index 38eca31adf9..f4e19b97055 100644
--- a/purchase_minimum_amount/views/res_partner_view.xml
+++ b/purchase_minimum_amount/views/res_partner_view.xml
@@ -1,21 +1,23 @@
-
-
+
-
res.partner.form.block.reason
res.partner
-
+
-
-
+
+
From 75cca4db53570c430e6cc7927af70bd330cc1e14 Mon Sep 17 00:00:00 2001
From: Alba Riera
Date: Wed, 24 Feb 2021 13:57:05 +0100
Subject: [PATCH 13/32] [MIG] purchase_minimum_amount: Migration to 13.0
[UPD] Update purchase_minimum_amount.pot
[UPD] Eficent -> ForgeFlow
---
purchase_minimum_amount/README.rst | 4 ++--
purchase_minimum_amount/__manifest__.py | 8 ++++----
.../data/purchase_block_reason_data.xml | 2 +-
.../i18n/purchase_minimum_amount.pot | 7 +++----
purchase_minimum_amount/i18n/sl.po | 16 +++++++--------
purchase_minimum_amount/models/partner.py | 2 +-
.../models/purchase_order.py | 20 +++----------------
.../tests/test_po_minimum_amount_block.py | 20 +++++++++----------
.../views/purchase_order_view.xml | 2 +-
.../views/res_partner_view.xml | 11 ++++------
10 files changed, 37 insertions(+), 55 deletions(-)
diff --git a/purchase_minimum_amount/README.rst b/purchase_minimum_amount/README.rst
index 783e13b8d2a..85cf8a10e3c 100644
--- a/purchase_minimum_amount/README.rst
+++ b/purchase_minimum_amount/README.rst
@@ -85,8 +85,8 @@ Images
Contributors
------------
-* Jordi Ballester Alomar
-* Roser Garcia
+* Jordi Ballester Alomar
+* Roser Garcia
* Darshan Patel
* Nikul Chaudhary
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index 0d0b04667c6..9a082a19d57 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -1,12 +1,12 @@
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
+# Copyright 2016 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
{
"name": "Purchase Minimum Amount",
- "author": "Eficent, Odoo Community Association (OCA)",
- "version": "12.0.1.0.0",
+ "author": "ForgeFlow, Odoo Community Association (OCA)",
+ "version": "13.0.1.0.0",
"website": "https://github.com/OCA/purchase-workflow",
- "depends": ["purchase", "purchase_order_approval_block",],
+ "depends": ["purchase", "purchase_order_approval_block"],
"data": [
"data/purchase_block_reason_data.xml",
"views/purchase_order_view.xml",
diff --git a/purchase_minimum_amount/data/purchase_block_reason_data.xml b/purchase_minimum_amount/data/purchase_block_reason_data.xml
index fe759666e29..fdf7e47d4b2 100644
--- a/purchase_minimum_amount/data/purchase_block_reason_data.xml
+++ b/purchase_minimum_amount/data/purchase_block_reason_data.xml
@@ -1,6 +1,6 @@
diff --git a/purchase_minimum_amount/i18n/purchase_minimum_amount.pot b/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
index 1ea49639300..e45c5913773 100644
--- a/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
+++ b/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * purchase_minimum_amount
+# * purchase_minimum_amount
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -38,4 +38,3 @@ msgstr ""
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
msgid "Purchase Order Line"
msgstr ""
-
diff --git a/purchase_minimum_amount/i18n/sl.po b/purchase_minimum_amount/i18n/sl.po
index 6541c584b29..bc2b4d1f950 100644
--- a/purchase_minimum_amount/i18n/sl.po
+++ b/purchase_minimum_amount/i18n/sl.po
@@ -9,32 +9,32 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
-"PO-Revision-Date: 2021-02-24 11:45+0000\n"
-"Last-Translator: Matjaz Mozetic \n"
+"PO-Revision-Date: 2020-08-12 15:59+0000\n"
+"Last-Translator: Matjaz Mozetic \n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
-"%100==4 ? 2 : 3;\n"
-"X-Generator: Weblate 4.3.2\n"
+"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
+"n%100==4 ? 2 : 3;\n"
+"X-Generator: Weblate 3.10\n"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_res_partner
msgid "Contact"
-msgstr "Stik"
+msgstr ""
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
-msgstr "Minimalni nabavni znesek"
+msgstr ""
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
-msgstr "Minimalni nabavni znesek"
+msgstr ""
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
diff --git a/purchase_minimum_amount/models/partner.py b/purchase_minimum_amount/models/partner.py
index 17b1a08ffff..823cde97096 100644
--- a/purchase_minimum_amount/models/partner.py
+++ b/purchase_minimum_amount/models/partner.py
@@ -1,4 +1,4 @@
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
diff --git a/purchase_minimum_amount/models/purchase_order.py b/purchase_minimum_amount/models/purchase_order.py
index 38a73099d85..d2b630d97ff 100644
--- a/purchase_minimum_amount/models/purchase_order.py
+++ b/purchase_minimum_amount/models/purchase_order.py
@@ -1,4 +1,4 @@
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
@@ -12,7 +12,7 @@ class PurchaseOrder(models.Model):
related="partner_id.minimum_po_amount", string="Purchase Minimum Amount",
)
- @api.multi
+ @api.constrains("partner_id")
def _check_minimum_amount(self):
for rec in self:
po_amt_block = rec.env.ref(
@@ -29,26 +29,13 @@ def _check_minimum_amount(self):
rec.approval_block_id = False
return True
- @api.model
- def create(self, vals):
- po = super(PurchaseOrder, self).create(vals)
- po._check_minimum_amount()
- return po
-
- @api.multi
- def write(self, vals):
- res = super(PurchaseOrder, self).write(vals)
- for rec in self:
- if "partner_id" in vals:
- rec._check_minimum_amount()
- return res
-
class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
@api.model
def _check_minimum_amount_fields(self):
+ """As we are adding a hook, we cannot use api.constrain"""
return ["product_qty", "price_unit"]
@api.model
@@ -59,7 +46,6 @@ def create(self, vals):
res.order_id._check_minimum_amount()
return res
- @api.multi
def write(self, vals):
res = super(PurchaseOrderLine, self).write(vals)
fields = self._check_minimum_amount_fields()
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index 70a89d82029..12f4bb91b1c 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -1,4 +1,4 @@
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
@@ -74,14 +74,14 @@ def _create_purchase(self, line_products):
)
return purchase
- def test_po_amount_block_1(self):
+ def test_po_amount_block_under_minimum_manager_user_release(self):
"""Test PO Block for Minimum Threshold Vendor Amount"""
self.partner1.write({"minimum_po_amount": 1500.00})
# Create a PO with an amount below the minimum and check that the
# Approval Block Reason is correctly assign
purchase1 = self._create_purchase(
- [(self.product1, 1), (self.product2, 5), (self.product3, 8),]
+ [(self.product1, 1), (self.product2, 5), (self.product3, 8)]
)
self.assertEquals(
@@ -89,12 +89,14 @@ def test_po_amount_block_1(self):
self.env.ref("purchase_minimum_amount.minimum_amount_block_reason"),
)
+ purchase1.with_user(self.user1_id).button_confirm()
+ self.assertEquals(purchase1.state, "draft")
# Release the PO by pressing the button and then confirming the order
- purchase1.sudo(self.user2_id).button_release_approval_block()
- purchase1.sudo().button_confirm()
+ purchase1.with_user(self.user2_id).button_release_approval_block()
+ purchase1.button_confirm()
self.assertEquals(purchase1.state, "purchase")
- def test_po_amount_block_2(self):
+ def test_po_amount_block_above_minimum_group_user(self):
"""Test PO Block for Minimum Threshold Vendor Amount"""
self.partner1.write({"minimum_po_amount": 1500.00})
@@ -111,9 +113,7 @@ def test_po_amount_block_2(self):
if po_line.product_id == self.product1:
po_line.product_qty = 10
- self.assertEquals(
- purchase1.approval_block_id, self.env["purchase.approval.block.reason"]
- )
+ self.assertFalse(purchase1.approval_block_id)
- purchase1.sudo(self.user1_id).button_confirm()
+ purchase1.with_user(self.user1_id).button_confirm()
self.assertEquals(purchase1.state, "purchase")
diff --git a/purchase_minimum_amount/views/purchase_order_view.xml b/purchase_minimum_amount/views/purchase_order_view.xml
index 32532491678..4a39cf8a336 100644
--- a/purchase_minimum_amount/views/purchase_order_view.xml
+++ b/purchase_minimum_amount/views/purchase_order_view.xml
@@ -1,6 +1,6 @@
diff --git a/purchase_minimum_amount/views/res_partner_view.xml b/purchase_minimum_amount/views/res_partner_view.xml
index f4e19b97055..5faa279358d 100644
--- a/purchase_minimum_amount/views/res_partner_view.xml
+++ b/purchase_minimum_amount/views/res_partner_view.xml
@@ -1,6 +1,6 @@
@@ -11,13 +11,10 @@
-
+
From 13248690953affc0261e64e9feabb8aea2378f6b Mon Sep 17 00:00:00 2001
From: mreficent
Date: Tue, 9 Mar 2021 13:49:47 +0100
Subject: [PATCH 14/32] [IMP] purchase_minimum_amount: add fragmented readme
[UPD] README.rst
---
purchase_minimum_amount/README.rst | 82 +--
purchase_minimum_amount/__manifest__.py | 2 +-
purchase_minimum_amount/readme/CONFIGURE.rst | 6 +
.../readme/CONTRIBUTORS.rst | 4 +
.../readme/DESCRIPTION.rst | 3 +
purchase_minimum_amount/readme/USAGE.rst | 38 ++
.../static/description/index.html | 489 ++++++++++++++++++
7 files changed, 594 insertions(+), 30 deletions(-)
create mode 100644 purchase_minimum_amount/readme/CONFIGURE.rst
create mode 100644 purchase_minimum_amount/readme/CONTRIBUTORS.rst
create mode 100644 purchase_minimum_amount/readme/DESCRIPTION.rst
create mode 100644 purchase_minimum_amount/readme/USAGE.rst
create mode 100644 purchase_minimum_amount/static/description/index.html
diff --git a/purchase_minimum_amount/README.rst b/purchase_minimum_amount/README.rst
index 85cf8a10e3c..44cf858aac6 100644
--- a/purchase_minimum_amount/README.rst
+++ b/purchase_minimum_amount/README.rst
@@ -1,30 +1,54 @@
-.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
- :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
- :alt: License LGPL-3
-
=======================
Purchase Minimum Amount
=======================
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! 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-LGPL--3-blue.png
+ :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
+ :alt: License: LGPL-3
+.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
+ :target: https://github.com/OCA/purchase-workflow/tree/13.0/purchase_minimum_amount
+ :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-13-0/purchase-workflow-13-0-purchase_minimum_amount
+ :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/13.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
This module allows you to establish and automate a specific Purchase Order
Approval Block Reason in the system: the 'Minimum Purchase Order Amount per
Vendor'.
+**Table of contents**
+
+.. contents::
+ :local:
+
Configuration
=============
* Go to 'Purchases / Purchase / Vendors'
* Click on a Vendor and inside the 'Sales & Purchases' page specify the
non-required field 'Minimum Purchase Amount'.
-* Assign the security group 'Release blocked RFQ' to users that should be able
- to release the block. Users in group 'Purchase / Managers' are by default
- assigned to this group.
+* Assign the security group 'Release RFQ with approval block' to users that
+ should be able to release the block. Users in group 'Purchase / Managers'
+ are by default assigned to this group.
Usage
=====
Set the Purchase Approval Block
--------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#. Go to 'Purchases / Purchase / Requests for Quotation'
#. Create a new RFQ and upon saving if the Untaxed Amount is below the
@@ -33,21 +57,21 @@ Set the Purchase Approval Block
anymore.
Search existing RFQ
--------------------
+~~~~~~~~~~~~~~~~~~~
There is a filter 'Blocked' to search for orders that are blocked.
It is also possible to search RFQ’s with the Approval Block Reason 'Minimum
Purchase Order Amount per Vendor'.
Confirm the RFQ
----------------
+~~~~~~~~~~~~~~~
#. Press the button ‘Confirm’. If there’s an approval block, the order will
be set to status 'To Approve'. You will then need to request a Purchase
Manager to approve it.
Release the purchase approval block
------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#. All the RFQ’s with a total amount surpassing the specified Minimum Purchase
Order Amount for that vendor (excluding taxes) are automatically released.
@@ -57,50 +81,50 @@ Release the purchase approval block
seeing that RFQ is able to validate it.
Notifications to followers
---------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~
#. Followers of the RFQ receive notifications when an approval block has been
set or released.
-.. 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
-
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.
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+`feedback `_.
+
+Do not contact contributors directly about support or help with technical issues.
Credits
=======
-Images
-------
+Authors
+~~~~~~~
-* Odoo Community Association: `Icon `_.
+* ForgeFlow
Contributors
-------------
+~~~~~~~~~~~~
* Jordi Ballester Alomar
* Roser Garcia
* Darshan Patel
* Nikul Chaudhary
-Maintainer
-----------
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
-This module is maintained by the OCA.
-
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-To contribute to this module, please visit https://odoo-community.org.
+This module is part of the `OCA/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_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index 9a082a19d57..dc216f959f0 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -6,7 +6,7 @@
"author": "ForgeFlow, Odoo Community Association (OCA)",
"version": "13.0.1.0.0",
"website": "https://github.com/OCA/purchase-workflow",
- "depends": ["purchase", "purchase_order_approval_block"],
+ "depends": ["purchase_order_approval_block"],
"data": [
"data/purchase_block_reason_data.xml",
"views/purchase_order_view.xml",
diff --git a/purchase_minimum_amount/readme/CONFIGURE.rst b/purchase_minimum_amount/readme/CONFIGURE.rst
new file mode 100644
index 00000000000..a6cf210838b
--- /dev/null
+++ b/purchase_minimum_amount/readme/CONFIGURE.rst
@@ -0,0 +1,6 @@
+* Go to 'Purchases / Purchase / Vendors'
+* Click on a Vendor and inside the 'Sales & Purchases' page specify the
+ non-required field 'Minimum Purchase Amount'.
+* Assign the security group 'Release RFQ with approval block' to users that
+ should be able to release the block. Users in group 'Purchase / Managers'
+ are by default assigned to this group.
diff --git a/purchase_minimum_amount/readme/CONTRIBUTORS.rst b/purchase_minimum_amount/readme/CONTRIBUTORS.rst
new file mode 100644
index 00000000000..df735396d7c
--- /dev/null
+++ b/purchase_minimum_amount/readme/CONTRIBUTORS.rst
@@ -0,0 +1,4 @@
+* Jordi Ballester Alomar
+* Roser Garcia
+* Darshan Patel
+* Nikul Chaudhary
diff --git a/purchase_minimum_amount/readme/DESCRIPTION.rst b/purchase_minimum_amount/readme/DESCRIPTION.rst
new file mode 100644
index 00000000000..ec47077a6c1
--- /dev/null
+++ b/purchase_minimum_amount/readme/DESCRIPTION.rst
@@ -0,0 +1,3 @@
+This module allows you to establish and automate a specific Purchase Order
+Approval Block Reason in the system: the 'Minimum Purchase Order Amount per
+Vendor'.
diff --git a/purchase_minimum_amount/readme/USAGE.rst b/purchase_minimum_amount/readme/USAGE.rst
new file mode 100644
index 00000000000..58037e5a402
--- /dev/null
+++ b/purchase_minimum_amount/readme/USAGE.rst
@@ -0,0 +1,38 @@
+Set the Purchase Approval Block
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#. Go to 'Purchases / Purchase / Requests for Quotation'
+#. Create a new RFQ and upon saving if the Untaxed Amount is below the
+ Purchase Minimum Amount specified in that vendor, then the Approval Block
+ Reason is automatically set and the Approval Block Reason is not editable
+ anymore.
+
+Search existing RFQ
+~~~~~~~~~~~~~~~~~~~
+
+There is a filter 'Blocked' to search for orders that are blocked.
+It is also possible to search RFQ’s with the Approval Block Reason 'Minimum
+Purchase Order Amount per Vendor'.
+
+Confirm the RFQ
+~~~~~~~~~~~~~~~
+
+#. Press the button ‘Confirm’. If there’s an approval block, the order will
+ be set to status 'To Approve'. You will then need to request a Purchase
+ Manager to approve it.
+
+Release the purchase approval block
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#. All the RFQ’s with a total amount surpassing the specified Minimum Purchase
+ Order Amount for that vendor (excluding taxes) are automatically released.
+#. If a blocked RFQ without surpassing the minimum amount wants to be
+ released, a user member of the security group 'Release RFQ with approval
+ block' can see a button 'Release Approval Block'. When pressing it, anyone
+ seeing that RFQ is able to validate it.
+
+Notifications to followers
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#. Followers of the RFQ receive notifications when an approval block has been
+ set or released.
diff --git a/purchase_minimum_amount/static/description/index.html b/purchase_minimum_amount/static/description/index.html
new file mode 100644
index 00000000000..d5302dbb34d
--- /dev/null
+++ b/purchase_minimum_amount/static/description/index.html
@@ -0,0 +1,489 @@
+
+
+
+
+
+
+Purchase Minimum Amount
+
+
+
+
+
Purchase Minimum Amount
+
+
+

+
This module allows you to establish and automate a specific Purchase Order
+Approval Block Reason in the system: the ‘Minimum Purchase Order Amount per
+Vendor’.
+
Table of contents
+
+
+
+
+- Go to ‘Purchases / Purchase / Vendors’
+- Click on a Vendor and inside the ‘Sales & Purchases’ page specify the
+non-required field ‘Minimum Purchase Amount’.
+- Assign the security group ‘Release RFQ with approval block’ to users that
+should be able to release the block. Users in group ‘Purchase / Managers’
+are by default assigned to this group.
+
+
+
+
+
+
+
+- Go to ‘Purchases / Purchase / Requests for Quotation’
+- Create a new RFQ and upon saving if the Untaxed Amount is below the
+Purchase Minimum Amount specified in that vendor, then the Approval Block
+Reason is automatically set and the Approval Block Reason is not editable
+anymore.
+
+
+
+
+
There is a filter ‘Blocked’ to search for orders that are blocked.
+It is also possible to search RFQ’s with the Approval Block Reason ‘Minimum
+Purchase Order Amount per Vendor’.
+
+
+
+
+- Press the button ‘Confirm’. If there’s an approval block, the order will
+be set to status ‘To Approve’. You will then need to request a Purchase
+Manager to approve it.
+
+
+
+
+
+- All the RFQ’s with a total amount surpassing the specified Minimum Purchase
+Order Amount for that vendor (excluding taxes) are automatically released.
+- If a blocked RFQ without surpassing the minimum amount wants to be
+released, a user member of the security group ‘Release RFQ with approval
+block’ can see a button ‘Release Approval Block’. When pressing it, anyone
+seeing that RFQ is able to validate it.
+
+
+
+
+
+- Followers of the RFQ receive notifications when an approval block has been
+set or released.
+
+
+
+
+
+
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.
+
+
+
+
+
+
+
+
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.
+
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 48cd05abe651f6600e30a59e5ab43e9a5df7082a Mon Sep 17 00:00:00 2001
From: mathieu
Date: Tue, 6 Jul 2021 09:21:23 +0200
Subject: [PATCH 15/32] [IMP] purchase_minimum_amount: black, isort, prettier
---
purchase_minimum_amount/models/purchase_order.py | 3 ++-
.../tests/test_po_minimum_amount_block.py | 10 +++++++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/purchase_minimum_amount/models/purchase_order.py b/purchase_minimum_amount/models/purchase_order.py
index d2b630d97ff..3405356c1a1 100644
--- a/purchase_minimum_amount/models/purchase_order.py
+++ b/purchase_minimum_amount/models/purchase_order.py
@@ -9,7 +9,8 @@ class PurchaseOrder(models.Model):
_inherit = "purchase.order"
minimum_po_amount = fields.Float(
- related="partner_id.minimum_po_amount", string="Purchase Minimum Amount",
+ related="partner_id.minimum_po_amount",
+ string="Purchase Minimum Amount",
)
@api.constrains("partner_id")
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index 12f4bb91b1c..96bdddaf08a 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -27,10 +27,14 @@ def setUp(self):
self.product3 = self.env.ref("product.product_product_11")
# Create users
self.user1_id = self._create_user(
- "user_1", [self.group_purchase_user], self.company1,
+ "user_1",
+ [self.group_purchase_user],
+ self.company1,
)
self.user2_id = self._create_user(
- "user_2", [self.group_purchase_manager], self.company1,
+ "user_2",
+ [self.group_purchase_manager],
+ self.company1,
)
def _create_user(self, login, groups, company):
@@ -50,7 +54,7 @@ def _create_user(self, login, groups, company):
return user.id
def _create_purchase(self, line_products):
- """ Create a purchase order.
+ """Create a purchase order.
``line_products`` is a list of tuple [(product, qty)]
"""
lines = []
From 8828fcc345fe70fa9dc98140a499e8500119307c Mon Sep 17 00:00:00 2001
From: mathieu
Date: Tue, 6 Jul 2021 09:25:53 +0200
Subject: [PATCH 16/32] [MIG] purchase_minimum_amount: Migration to 14.0
---
purchase_minimum_amount/__manifest__.py | 2 +-
.../tests/test_po_minimum_amount_block.py | 10 +++++-----
purchase_minimum_amount/views/purchase_order_view.xml | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index dc216f959f0..6a3ed371ab9 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Purchase Minimum Amount",
"author": "ForgeFlow, Odoo Community Association (OCA)",
- "version": "13.0.1.0.0",
+ "version": "14.0.1.0.0",
"website": "https://github.com/OCA/purchase-workflow",
"depends": ["purchase_order_approval_block"],
"data": [
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index 96bdddaf08a..91c76df5128 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -88,17 +88,17 @@ def test_po_amount_block_under_minimum_manager_user_release(self):
[(self.product1, 1), (self.product2, 5), (self.product3, 8)]
)
- self.assertEquals(
+ self.assertEqual(
purchase1.approval_block_id,
self.env.ref("purchase_minimum_amount.minimum_amount_block_reason"),
)
purchase1.with_user(self.user1_id).button_confirm()
- self.assertEquals(purchase1.state, "draft")
+ self.assertEqual(purchase1.state, "draft")
# Release the PO by pressing the button and then confirming the order
purchase1.with_user(self.user2_id).button_release_approval_block()
purchase1.button_confirm()
- self.assertEquals(purchase1.state, "purchase")
+ self.assertEqual(purchase1.state, "purchase")
def test_po_amount_block_above_minimum_group_user(self):
"""Test PO Block for Minimum Threshold Vendor Amount"""
@@ -108,7 +108,7 @@ def test_po_amount_block_above_minimum_group_user(self):
[(self.product1, 1), (self.product2, 5), (self.product3, 8)]
)
- self.assertEquals(
+ self.assertEqual(
purchase1.approval_block_id,
self.env.ref("purchase_minimum_amount.minimum_amount_block_reason"),
)
@@ -120,4 +120,4 @@ def test_po_amount_block_above_minimum_group_user(self):
self.assertFalse(purchase1.approval_block_id)
purchase1.with_user(self.user1_id).button_confirm()
- self.assertEquals(purchase1.state, "purchase")
+ self.assertEqual(purchase1.state, "purchase")
diff --git a/purchase_minimum_amount/views/purchase_order_view.xml b/purchase_minimum_amount/views/purchase_order_view.xml
index 4a39cf8a336..37766e1f2e5 100644
--- a/purchase_minimum_amount/views/purchase_order_view.xml
+++ b/purchase_minimum_amount/views/purchase_order_view.xml
@@ -19,7 +19,7 @@
>
{'invisible': ['|','|',('approval_block_id', '=', False),('state', 'not in', ['draft', 'sent', 'to approve'])]}
+ >{'invisible': ['|',('approval_block_id', '=', False),('state', 'not in', ['draft', 'sent', 'to approve'])]}
From db8d86709d1a5680283c79b21f151c16f1b7afdb Mon Sep 17 00:00:00 2001
From: oca-travis
Date: Mon, 19 Jul 2021 21:09:03 +0000
Subject: [PATCH 17/32] [UPD] Update purchase_minimum_amount.pot
---
.../i18n/purchase_minimum_amount.pot | 23 ++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/purchase_minimum_amount/i18n/purchase_minimum_amount.pot b/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
index e45c5913773..034c53f8aa1 100644
--- a/purchase_minimum_amount/i18n/purchase_minimum_amount.pot
+++ b/purchase_minimum_amount/i18n/purchase_minimum_amount.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"
@@ -18,6 +18,27 @@ msgstr ""
msgid "Contact"
msgstr ""
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__display_name
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_line__display_name
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__id
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_line__id
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__id
+msgid "ID"
+msgstr ""
+
+#. module: purchase_minimum_amount
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order____last_update
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order_line____last_update
+#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
From 3c5f2a5291b63e84facae07b1c58ba0e657fb33d Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Mon, 19 Jul 2021 21:55:24 +0000
Subject: [PATCH 18/32] [UPD] README.rst
---
purchase_minimum_amount/README.rst | 10 +++++-----
purchase_minimum_amount/static/description/index.html | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/purchase_minimum_amount/README.rst b/purchase_minimum_amount/README.rst
index 44cf858aac6..d81d89f8e4a 100644
--- a/purchase_minimum_amount/README.rst
+++ b/purchase_minimum_amount/README.rst
@@ -14,13 +14,13 @@ Purchase Minimum Amount
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
- :target: https://github.com/OCA/purchase-workflow/tree/13.0/purchase_minimum_amount
+ :target: https://github.com/OCA/purchase-workflow/tree/14.0/purchase_minimum_amount
: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-13-0/purchase-workflow-13-0-purchase_minimum_amount
+ :target: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_minimum_amount
: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/13.0
+ :target: https://runbot.odoo-community.org/runbot/142/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -92,7 +92,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.
@@ -125,6 +125,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_minimum_amount/static/description/index.html b/purchase_minimum_amount/static/description/index.html
index d5302dbb34d..46563bdf11e 100644
--- a/purchase_minimum_amount/static/description/index.html
+++ b/purchase_minimum_amount/static/description/index.html
@@ -367,7 +367,7 @@ Purchase Minimum Amount
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module allows you to establish and automate a specific Purchase Order
Approval Block Reason in the system: the ‘Minimum Purchase Order Amount per
Vendor’.
@@ -453,7 +453,7 @@
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -480,7 +480,7 @@
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 eedc4ff5649b756af5413a89b0b8fb91e10dd530 Mon Sep 17 00:00:00 2001
From: Alexandre Fayolle
Date: Wed, 15 Sep 2021 09:49:45 +0200
Subject: [PATCH 19/32] [FIX] purchase_minimum_ammount version
to work around an issue in PyPI
---
purchase_minimum_amount/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index 6a3ed371ab9..54078a88f00 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Purchase Minimum Amount",
"author": "ForgeFlow, Odoo Community Association (OCA)",
- "version": "14.0.1.0.0",
+ "version": "14.0.1.0.1",
"website": "https://github.com/OCA/purchase-workflow",
"depends": ["purchase_order_approval_block"],
"data": [
From 71cf805a1cd8a7438a0385718731e13cef9f7f31 Mon Sep 17 00:00:00 2001
From: oca-git-bot
Date: Thu, 31 Mar 2022 17:18:42 +0200
Subject: [PATCH 20/32] [IMP] update dotfiles [ci skip]
---
purchase_minimum_amount/tests/test_po_minimum_amount_block.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index 91c76df5128..ab8fd8083f0 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -38,7 +38,7 @@ def setUp(self):
)
def _create_user(self, login, groups, company):
- """ Create a user."""
+ """Create a user."""
group_ids = [group.id for group in groups]
user = self.users_obj.with_context({"no_reset_password": True}).create(
{
From cd1558f8a77f56836978ff7ed1413e090b17f316 Mon Sep 17 00:00:00 2001
From: Denis Roussel
Date: Wed, 6 Jul 2022 17:54:55 +0200
Subject: [PATCH 21/32] [CHG] purchase_minimum_amount: Change to AGPL as
depending on AGPL purchase_order_approval_block
---
purchase_minimum_amount/__init__.py | 2 +-
purchase_minimum_amount/__manifest__.py | 4 ++--
purchase_minimum_amount/data/purchase_block_reason_data.xml | 2 +-
purchase_minimum_amount/models/__init__.py | 2 +-
purchase_minimum_amount/models/partner.py | 2 +-
purchase_minimum_amount/models/purchase_order.py | 2 +-
purchase_minimum_amount/tests/__init__.py | 2 +-
purchase_minimum_amount/tests/test_po_minimum_amount_block.py | 2 +-
purchase_minimum_amount/views/purchase_order_view.xml | 2 +-
purchase_minimum_amount/views/res_partner_view.xml | 2 +-
10 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/purchase_minimum_amount/__init__.py b/purchase_minimum_amount/__init__.py
index a933daa3335..afa5023be15 100644
--- a/purchase_minimum_amount/__init__.py
+++ b/purchase_minimum_amount/__init__.py
@@ -1,3 +1,3 @@
-# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0).
from . import models
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index 54078a88f00..5c51f869287 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -1,5 +1,5 @@
# Copyright 2016 ForgeFlow S.L.
-# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0).
{
"name": "Purchase Minimum Amount",
@@ -12,6 +12,6 @@
"views/purchase_order_view.xml",
"views/res_partner_view.xml",
],
- "license": "LGPL-3",
+ "license": "AGPL-3",
"installable": True,
}
diff --git a/purchase_minimum_amount/data/purchase_block_reason_data.xml b/purchase_minimum_amount/data/purchase_block_reason_data.xml
index fdf7e47d4b2..110f93f233f 100644
--- a/purchase_minimum_amount/data/purchase_block_reason_data.xml
+++ b/purchase_minimum_amount/data/purchase_block_reason_data.xml
@@ -2,7 +2,7 @@
diff --git a/purchase_minimum_amount/models/__init__.py b/purchase_minimum_amount/models/__init__.py
index 90ba8fa805b..81b16a61fc8 100644
--- a/purchase_minimum_amount/models/__init__.py
+++ b/purchase_minimum_amount/models/__init__.py
@@ -1,4 +1,4 @@
-# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import purchase_order
from . import partner
diff --git a/purchase_minimum_amount/models/partner.py b/purchase_minimum_amount/models/partner.py
index 823cde97096..757e689e21d 100644
--- a/purchase_minimum_amount/models/partner.py
+++ b/purchase_minimum_amount/models/partner.py
@@ -1,6 +1,6 @@
# Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
-# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
diff --git a/purchase_minimum_amount/models/purchase_order.py b/purchase_minimum_amount/models/purchase_order.py
index 3405356c1a1..73ecea50545 100644
--- a/purchase_minimum_amount/models/purchase_order.py
+++ b/purchase_minimum_amount/models/purchase_order.py
@@ -1,6 +1,6 @@
# Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
-# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
diff --git a/purchase_minimum_amount/tests/__init__.py b/purchase_minimum_amount/tests/__init__.py
index 99432d05d32..93b5de3a7d4 100644
--- a/purchase_minimum_amount/tests/__init__.py
+++ b/purchase_minimum_amount/tests/__init__.py
@@ -1,3 +1,3 @@
-# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import test_po_minimum_amount_block
diff --git a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
index ab8fd8083f0..f3842241252 100644
--- a/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
+++ b/purchase_minimum_amount/tests/test_po_minimum_amount_block.py
@@ -1,6 +1,6 @@
# Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
-# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import time
diff --git a/purchase_minimum_amount/views/purchase_order_view.xml b/purchase_minimum_amount/views/purchase_order_view.xml
index 37766e1f2e5..4fe56eda74d 100644
--- a/purchase_minimum_amount/views/purchase_order_view.xml
+++ b/purchase_minimum_amount/views/purchase_order_view.xml
@@ -2,7 +2,7 @@
diff --git a/purchase_minimum_amount/views/res_partner_view.xml b/purchase_minimum_amount/views/res_partner_view.xml
index 5faa279358d..4b96a7fccf1 100644
--- a/purchase_minimum_amount/views/res_partner_view.xml
+++ b/purchase_minimum_amount/views/res_partner_view.xml
@@ -2,7 +2,7 @@
From d4a7556e206df41d18c5e307592bab977c37fb7a Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Wed, 6 Jul 2022 16:57:11 +0000
Subject: [PATCH 22/32] [UPD] README.rst
---
purchase_minimum_amount/README.rst | 6 +++---
purchase_minimum_amount/static/description/index.html | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/purchase_minimum_amount/README.rst b/purchase_minimum_amount/README.rst
index d81d89f8e4a..01d49bb597f 100644
--- a/purchase_minimum_amount/README.rst
+++ b/purchase_minimum_amount/README.rst
@@ -10,9 +10,9 @@ Purchase Minimum Amount
.. |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-LGPL--3-blue.png
- :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
- :alt: License: LGPL-3
+.. |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_minimum_amount
:alt: OCA/purchase-workflow
diff --git a/purchase_minimum_amount/static/description/index.html b/purchase_minimum_amount/static/description/index.html
index 46563bdf11e..db854c5ba0d 100644
--- a/purchase_minimum_amount/static/description/index.html
+++ b/purchase_minimum_amount/static/description/index.html
@@ -367,7 +367,7 @@ Purchase Minimum Amount
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module allows you to establish and automate a specific Purchase Order
Approval Block Reason in the system: the ‘Minimum Purchase Order Amount per
Vendor’.
From 1afd78332163f6d895ead53086c878be7aff4d44 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Wed, 6 Jul 2022 16:57:12 +0000
Subject: [PATCH 23/32] purchase_minimum_amount 14.0.1.0.2
---
purchase_minimum_amount/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/purchase_minimum_amount/__manifest__.py b/purchase_minimum_amount/__manifest__.py
index 5c51f869287..6880703e83f 100644
--- a/purchase_minimum_amount/__manifest__.py
+++ b/purchase_minimum_amount/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Purchase Minimum Amount",
"author": "ForgeFlow, Odoo Community Association (OCA)",
- "version": "14.0.1.0.1",
+ "version": "14.0.1.0.2",
"website": "https://github.com/OCA/purchase-workflow",
"depends": ["purchase_order_approval_block"],
"data": [
From d10f277ef7e6d2e68fb5c96b6ed1abaa23e4ff04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Douglas=20Cust=C3=B3dio?=
Date: Mon, 3 Oct 2022 15:10:36 +0000
Subject: [PATCH 24/32] Translated using Weblate (Portuguese (Brazil))
Currently translated at 20.0% (1 of 5 strings)
Translation: purchase-workflow-14.0/purchase-workflow-14.0-purchase_minimum_amount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_minimum_amount/pt_BR/
---
purchase_minimum_amount/i18n/pt_BR.po | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/purchase_minimum_amount/i18n/pt_BR.po b/purchase_minimum_amount/i18n/pt_BR.po
index efa8a8fedb2..920cb5f3212 100644
--- a/purchase_minimum_amount/i18n/pt_BR.po
+++ b/purchase_minimum_amount/i18n/pt_BR.po
@@ -9,15 +9,16 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
-"PO-Revision-Date: 2018-02-23 17:50+0000\n"
-"Last-Translator: OCA Transbot , 2018\n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
-"teams/23907/pt_BR/)\n"
+"PO-Revision-Date: 2022-10-03 17:36+0000\n"
+"Last-Translator: Douglas Custódio \n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
+"23907/pt_BR/)\n"
"Language: pt_BR\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"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_res_partner
@@ -43,4 +44,4 @@ msgstr ""
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
msgid "Purchase Order Line"
-msgstr "Linha da Ordem de Compra"
+msgstr "Linha do Pedido de Compra"
From c0b11041f7f06f9bb45b55bcce9b1497b379cb8e Mon Sep 17 00:00:00 2001
From: Francesco Foresti
Date: Wed, 16 Nov 2022 17:39:02 +0000
Subject: [PATCH 25/32] Translated using Weblate (Italian)
Currently translated at 40.0% (2 of 5 strings)
Translation: purchase-workflow-14.0/purchase-workflow-14.0-purchase_minimum_amount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_minimum_amount/it/
---
purchase_minimum_amount/i18n/it.po | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/purchase_minimum_amount/i18n/it.po b/purchase_minimum_amount/i18n/it.po
index e217a018456..9fc18c34b64 100644
--- a/purchase_minimum_amount/i18n/it.po
+++ b/purchase_minimum_amount/i18n/it.po
@@ -9,14 +9,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
-"PO-Revision-Date: 2018-02-23 17:50+0000\n"
-"Last-Translator: OCA Transbot , 2018\n"
+"PO-Revision-Date: 2022-11-16 19:44+0000\n"
+"Last-Translator: Francesco Foresti \n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"Language: it\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"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.14.1\n"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_res_partner
@@ -37,9 +38,9 @@ msgstr ""
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
msgid "Purchase Order"
-msgstr ""
+msgstr "Ordine di acquisto"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order_line
msgid "Purchase Order Line"
-msgstr "Riga Ordine d'Acquisto"
+msgstr "Riga ordine di acquisto"
From b6b935f6e54ccd0a7cfd1b11bb653ad4f34019e8 Mon Sep 17 00:00:00 2001
From: Francesco Foresti
Date: Thu, 17 Nov 2022 08:43:47 +0000
Subject: [PATCH 26/32] Translated using Weblate (Italian)
Currently translated at 100.0% (5 of 5 strings)
Translation: purchase-workflow-14.0/purchase-workflow-14.0-purchase_minimum_amount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_minimum_amount/it/
---
purchase_minimum_amount/i18n/it.po | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/purchase_minimum_amount/i18n/it.po b/purchase_minimum_amount/i18n/it.po
index 9fc18c34b64..089a3398dec 100644
--- a/purchase_minimum_amount/i18n/it.po
+++ b/purchase_minimum_amount/i18n/it.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 17:50+0000\n"
-"PO-Revision-Date: 2022-11-16 19:44+0000\n"
+"PO-Revision-Date: 2022-11-17 10:44+0000\n"
"Last-Translator: Francesco Foresti \n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"Language: it\n"
@@ -22,18 +22,18 @@ msgstr ""
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_res_partner
msgid "Contact"
-msgstr ""
+msgstr "Contatto"
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_partner__minimum_po_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_res_users__minimum_po_amount
msgid "Minimum Purchase Amount"
-msgstr ""
+msgstr "Importo minimo acquisto"
#. module: purchase_minimum_amount
#: model:ir.model.fields,field_description:purchase_minimum_amount.field_purchase_order__minimum_po_amount
msgid "Purchase Minimum Amount"
-msgstr ""
+msgstr "Importo minimo acquisto"
#. module: purchase_minimum_amount
#: model:ir.model,name:purchase_minimum_amount.model_purchase_order
From 1da216d94ec12a131f558f58d00b6b6024d0ff4f Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sun, 3 Sep 2023 15:44:04 +0000
Subject: [PATCH 27/32] [UPD] README.rst
---
purchase_minimum_amount/README.rst | 15 +++--
.../static/description/index.html | 62 ++++++++++---------
2 files changed, 41 insertions(+), 36 deletions(-)
diff --git a/purchase_minimum_amount/README.rst b/purchase_minimum_amount/README.rst
index 01d49bb597f..dc626be4dfe 100644
--- a/purchase_minimum_amount/README.rst
+++ b/purchase_minimum_amount/README.rst
@@ -2,10 +2,13 @@
Purchase Minimum Amount
=======================
-.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:0603c1aabd15f2c92d64a9f18fc734f4274627a3795c34391f7c29500e8a4d98
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ Purchase Minimum Amount
.. |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_minimum_amount
: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
+.. |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=14.0
+ :alt: Try me on Runboat
-|badge1| |badge2| |badge3| |badge4| |badge5|
+|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows you to establish and automate a specific Purchase Order
Approval Block Reason in the system: the 'Minimum Purchase Order Amount per
@@ -91,7 +94,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_minimum_amount/static/description/index.html b/purchase_minimum_amount/static/description/index.html
index db854c5ba0d..ac60abaa174 100644
--- a/purchase_minimum_amount/static/description/index.html
+++ b/purchase_minimum_amount/static/description/index.html
@@ -1,20 +1,20 @@
-
+
-
+
Purchase Minimum Amount