From 50b0d3e5da8432c4adffd3be368f617fd957d462 Mon Sep 17 00:00:00 2001 From: anusrinps96 Date: Wed, 24 Jul 2024 11:20:57 +0200 Subject: [PATCH] [MIG] product_mrp_info: Migration to 16.0 --- product_mrp_info/README.rst | 10 +-- product_mrp_info/__manifest__.py | 2 +- .../static/description/index.html | 18 ++--- .../tests/test_product_mrp_info.py | 67 ++++++++++--------- product_mrp_info/views/product_views.xml | 4 +- 5 files changed, 52 insertions(+), 49 deletions(-) diff --git a/product_mrp_info/README.rst b/product_mrp_info/README.rst index 76c308e73..95fccda35 100644 --- a/product_mrp_info/README.rst +++ b/product_mrp_info/README.rst @@ -17,13 +17,13 @@ Product MRP Info :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github - :target: https://github.com/OCA/manufacture/tree/14.0/product_mrp_info + :target: https://github.com/OCA/manufacture/tree/16.0/product_mrp_info :alt: OCA/manufacture .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-product_mrp_info + :target: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-product_mrp_info :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/manufacture&target_branch=14.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -48,7 +48,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. @@ -87,6 +87,6 @@ Current `maintainer `__: |maintainer-LoisRForgeFlow| -This module is part of the `OCA/manufacture `_ project on GitHub. +This module is part of the `OCA/manufacture `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_mrp_info/__manifest__.py b/product_mrp_info/__manifest__.py index 8f9d74fd7..7a8130735 100644 --- a/product_mrp_info/__manifest__.py +++ b/product_mrp_info/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Product MRP Info", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "development_status": "Beta", "license": "LGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", diff --git a/product_mrp_info/static/description/index.html b/product_mrp_info/static/description/index.html index 74a4e49c4..09d78a16c 100644 --- a/product_mrp_info/static/description/index.html +++ b/product_mrp_info/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code { margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.option { span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,7 +369,7 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:6890efe3aa93e30c39e9a91a505e7dd9250a005de16764dcaf79bde50de06e00 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

Adds smart button in product form view linking to manufacturing order list.

Table of contents

@@ -395,7 +395,7 @@ product.

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.

@@ -416,13 +416,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

LoisRForgeFlow

-

This module is part of the OCA/manufacture project on GitHub.

+

This module is part of the OCA/manufacture project on GitHub.

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

diff --git a/product_mrp_info/tests/test_product_mrp_info.py b/product_mrp_info/tests/test_product_mrp_info.py index e9974527c..f876a11b6 100644 --- a/product_mrp_info/tests/test_product_mrp_info.py +++ b/product_mrp_info/tests/test_product_mrp_info.py @@ -5,26 +5,27 @@ from odoo.tests.common import TransactionCase class TestProductMrpInfo(TransactionCase): - def setUp(self): - super().setUp() - self.pt_obj = self.env["product.template"] - self.pp_obj = self.env["product.product"] - self.mo_obj = self.env["mrp.production"] - self.bom_obj = self.env["mrp.bom"] - self.boml_obj = self.env["mrp.bom.line"] + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.pt_obj = cls.env["product.template"] + cls.pp_obj = cls.env["product.product"] + cls.mo_obj = cls.env["mrp.production"] + cls.bom_obj = cls.env["mrp.bom"] + cls.boml_obj = cls.env["mrp.bom.line"] - self.manufacture_route = self.env.ref("mrp.route_warehouse0_manufacture") + cls.manufacture_route = cls.env.ref("mrp.route_warehouse0_manufacture") - self.attribute = self.env["product.attribute"].create( + cls.attribute = cls.env["product.attribute"].create( {"name": "Test Attribute", "create_variant": "always"} ) - self.value1 = self.env["product.attribute.value"].create( - {"name": "Value 1", "attribute_id": self.attribute.id} + cls.value1 = cls.env["product.attribute.value"].create( + {"name": "Value 1", "attribute_id": cls.attribute.id} ) - self.value2 = self.env["product.attribute.value"].create( - {"name": "Value 2", "attribute_id": self.attribute.id} + cls.value2 = cls.env["product.attribute.value"].create( + {"name": "Value 2", "attribute_id": cls.attribute.id} ) - self.product = self.pt_obj.create( + cls.product = cls.pt_obj.create( { "name": "Test Template", "attribute_line_ids": [ @@ -32,45 +33,45 @@ class TestProductMrpInfo(TransactionCase): 0, 0, { - "attribute_id": self.attribute.id, - "value_ids": [(6, 0, [self.value1.id, self.value2.id])], + "attribute_id": cls.attribute.id, + "value_ids": [(6, 0, [cls.value1.id, cls.value2.id])], }, ) ], - "route_ids": [(6, 0, self.manufacture_route.ids)], + "route_ids": [(6, 0, cls.manufacture_route.ids)], } ) - self.variant_1 = self.product.product_variant_ids[0] - self.variant_2 = self.product.product_variant_ids[1] - self.bom = self.bom_obj.create( - {"product_tmpl_id": self.product.id, "product_qty": 1.0} + cls.variant_1 = cls.product.product_variant_ids[0] + cls.variant_2 = cls.product.product_variant_ids[1] + cls.bom = cls.bom_obj.create( + {"product_tmpl_id": cls.product.id, "product_qty": 1.0} ) # Create 3 MO's - self.mo_1 = self.mo_obj.create( + cls.mo_1 = cls.mo_obj.create( { "name": "MO ABC", - "product_id": self.variant_1.id, - "product_uom_id": self.variant_1.uom_id.id, + "product_id": cls.variant_1.id, + "product_uom_id": cls.variant_1.uom_id.id, "product_qty": 2, - "bom_id": self.bom.id, + "bom_id": cls.bom.id, } ) - self.mo_2 = self.mo_obj.create( + cls.mo_2 = cls.mo_obj.create( { "name": "MO XYZ", - "product_id": self.variant_1.id, - "product_uom_id": self.variant_1.uom_id.id, + "product_id": cls.variant_1.id, + "product_uom_id": cls.variant_1.uom_id.id, "product_qty": 3, - "bom_id": self.bom.id, + "bom_id": cls.bom.id, } ) - self.mo_3 = self.mo_obj.create( + cls.mo_3 = cls.mo_obj.create( { "name": "MO QWE", - "product_id": self.variant_2.id, - "product_uom_id": self.variant_2.uom_id.id, + "product_id": cls.variant_2.id, + "product_uom_id": cls.variant_2.uom_id.id, "product_qty": 6, - "bom_id": self.bom.id, + "bom_id": cls.bom.id, } ) diff --git a/product_mrp_info/views/product_views.xml b/product_mrp_info/views/product_views.xml index 094efe5bd..8f438e5d4 100644 --- a/product_mrp_info/views/product_views.xml +++ b/product_mrp_info/views/product_views.xml @@ -6,7 +6,6 @@ product.template - product_mrp_info product.template -
@@ -28,7 +28,6 @@ product.product - product_mrp_info product.product -