From fa345f6eda8e224585e7b228a414e32cce4291ae Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Mon, 11 Mar 2024 14:13:03 +0100 Subject: [PATCH] [MIG] sale_restricted_qty: Migration to 16.0 --- sale_restricted_qty/README.rst | 10 +++++----- sale_restricted_qty/__manifest__.py | 2 +- sale_restricted_qty/static/description/index.html | 7 +++---- sale_restricted_qty/tests/test_sale.py | 9 ++++----- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sale_restricted_qty/README.rst b/sale_restricted_qty/README.rst index ccda42ec74a7..ef2be58e2cba 100644 --- a/sale_restricted_qty/README.rst +++ b/sale_restricted_qty/README.rst @@ -17,13 +17,13 @@ Sale order min quantity :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/sale-workflow/tree/15.0/sale_restricted_qty + :target: https://github.com/OCA/sale-workflow/tree/16.0/sale_restricted_qty :alt: OCA/sale-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_restricted_qty + :target: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_restricted_qty :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=15.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -64,7 +64,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -110,6 +110,6 @@ Current `maintainer `__: |maintainer-ashishhirapara| -This module is part of the `OCA/sale-workflow `_ project on GitHub. +This module is part of the `OCA/sale-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_restricted_qty/__manifest__.py b/sale_restricted_qty/__manifest__.py index 7e805ab4e372..993e3b0f247e 100644 --- a/sale_restricted_qty/__manifest__.py +++ b/sale_restricted_qty/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Sale order min quantity", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Sales Management", "author": "Akretion, Odoo Community Association (OCA)", "contributors": ["Ashish Hirpara"], diff --git a/sale_restricted_qty/static/description/index.html b/sale_restricted_qty/static/description/index.html index 57e9df7c717e..2353f3be5af7 100644 --- a/sale_restricted_qty/static/description/index.html +++ b/sale_restricted_qty/static/description/index.html @@ -1,4 +1,3 @@ - @@ -369,7 +368,7 @@

Sale order min quantity

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:083a2e6670d757a546726831b95902f3d4e7460825e7b2c2f432dc076417005f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/sale-workflow Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/sale-workflow Translate me on Weblate Try me on Runboat

This module allows to define min, max and multiple order quantity on product. Min and Max order quantity is either required or recommended. If you check “Force min/max Qty” on product the min/max qty do not block sale @@ -418,7 +417,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -452,7 +451,7 @@

Maintainers

promote its widespread use.

Current maintainer:

ashishhirapara

-

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

+

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

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

diff --git a/sale_restricted_qty/tests/test_sale.py b/sale_restricted_qty/tests/test_sale.py index 425c9c8687db..7a68254ea2cf 100644 --- a/sale_restricted_qty/tests/test_sale.py +++ b/sale_restricted_qty/tests/test_sale.py @@ -49,9 +49,8 @@ def setUp(self): } ) - def refrech_sale_values(self, sale_order): + def refresh_sale_values(self, sale_order): sale_order.order_line._compute_sale_restricted_qty() - sale_order.order_line.product_id_change() sale_order.order_line._compute_is_qty_less_min_qty() sale_order.order_line._compute_is_qty_bigger_max_qty() sale_values = sale_order._convert_to_write(sale_order._cache) @@ -65,7 +64,7 @@ def test_check_sale_order_min_qty_required(self): sale_order = self.sale_order_model.new( {"partner_id": self.partner.id, "order_line": [(0, 0, line_values)]} ) - sale_values = self.refrech_sale_values(sale_order) + sale_values = self.refresh_sale_values(sale_order) sale_values.update( { "partner_shipping_id": sale_values["partner_id"], @@ -107,7 +106,7 @@ def test_check_sale_order_max_qty_required(self): sale_order = self.sale_order_model.create( {"partner_id": self.partner.id, "order_line": [(0, 0, line_values)]} ) - sale_values = self.refrech_sale_values(sale_order) + sale_values = self.refresh_sale_values(sale_order) self.sale_order_model.create(sale_values) line_values["product_uom_qty"] = 2.0 # Create sale order line with Qty great then max Qty @@ -143,7 +142,7 @@ def test_check_sale_order_multiple_qty_required(self): sale_order = self.sale_order_model.create( {"partner_id": self.partner.id, "order_line": [(0, 0, line_values)]} ) - sale_values = self.refrech_sale_values(sale_order) + sale_values = self.refresh_sale_values(sale_order) self.sale_order_model.create(sale_values) line_values["product_uom_qty"] = 20 # Create sale order line with Qty multiple Qty