From e109cb7064ba41e7e190ea6b6c76d86f9b19781e Mon Sep 17 00:00:00 2001
From: david
Date: Tue, 28 Sep 2021 12:26:40 +0200
Subject: [PATCH] [MIG] stock_whole_kit_constraint: Migration to 13.0
TT29360
---
stock_whole_kit_constraint/README.rst | 10 +++++-----
stock_whole_kit_constraint/__manifest__.py | 2 +-
.../i18n/stock_whole_kit_constraint.pot | 13 +++++++------
stock_whole_kit_constraint/models/stock_move.py | 7 -------
.../static/description/index.html | 6 +++---
.../views/product_template_views.xml | 4 ++--
6 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/stock_whole_kit_constraint/README.rst b/stock_whole_kit_constraint/README.rst
index 073303fa8..739c896a4 100644
--- a/stock_whole_kit_constraint/README.rst
+++ b/stock_whole_kit_constraint/README.rst
@@ -14,13 +14,13 @@ Stock whole kit constraint
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
- :target: https://github.com/OCA/manufacture/tree/12.0/stock_whole_kit_constraint
+ :target: https://github.com/OCA/manufacture/tree/13.0/stock_whole_kit_constraint
:alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-stock_whole_kit_constraint
+ :target: https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-stock_whole_kit_constraint
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/129/12.0
+ :target: https://runbot.odoo-community.org/runbot/129/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -61,7 +61,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.
@@ -93,6 +93,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/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/stock_whole_kit_constraint/__manifest__.py b/stock_whole_kit_constraint/__manifest__.py
index 9c6e31ba7..88e8d4b93 100644
--- a/stock_whole_kit_constraint/__manifest__.py
+++ b/stock_whole_kit_constraint/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Stock whole kit constraint",
"summary": "Avoid to deliver a kit partially",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.0",
"category": "Stock",
"website": "https://github.com/OCA/manufacture",
"author": "Tecnativa, Odoo Community Association (OCA)",
diff --git a/stock_whole_kit_constraint/i18n/stock_whole_kit_constraint.pot b/stock_whole_kit_constraint/i18n/stock_whole_kit_constraint.pot
index 5c414e923..26a803b60 100644
--- a/stock_whole_kit_constraint/i18n/stock_whole_kit_constraint.pot
+++ b/stock_whole_kit_constraint/i18n/stock_whole_kit_constraint.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * stock_whole_kit_constraint
+# * stock_whole_kit_constraint
#
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"
@@ -23,7 +23,9 @@ msgstr ""
#. module: stock_whole_kit_constraint
#: model:ir.model.fields,help:stock_whole_kit_constraint.field_product_product__allow_partial_kit_delivery
#: model:ir.model.fields,help:stock_whole_kit_constraint.field_product_template__allow_partial_kit_delivery
-msgid "If not set, and this product is delivered with a BoM of type kit, partial deliveries of the components won't be allowed."
+msgid ""
+"If not set, and this product is delivered with a BoM of type kit, partial "
+"deliveries of the components won't be allowed."
msgstr ""
#. module: stock_whole_kit_constraint
@@ -42,8 +44,7 @@ msgid "Transfer"
msgstr ""
#. module: stock_whole_kit_constraint
-#: code:addons/stock_whole_kit_constraint/models/stock_picking.py:23
+#: code:addons/stock_whole_kit_constraint/models/stock_picking.py:0
#, python-format
msgid "You can't make a partial delivery of components of the %s kit"
msgstr ""
-
diff --git a/stock_whole_kit_constraint/models/stock_move.py b/stock_whole_kit_constraint/models/stock_move.py
index 335498e63..aaaa4249a 100644
--- a/stock_whole_kit_constraint/models/stock_move.py
+++ b/stock_whole_kit_constraint/models/stock_move.py
@@ -25,13 +25,6 @@ class StockMove(models.Model):
move.bom_line_id.bom_id.product_tmpl_id.allow_partial_kit_delivery
)
- def _prepare_phantom_move_values(self, bom_line, quantity):
- """TODO: Not necessary in Odoo 13 or if this PR gets merged someday:
- https://github.com/odoo/odoo/pull/67536"""
- vals = super()._prepare_phantom_move_values(bom_line, quantity)
- vals["bom_line_id"] = bom_line.id
- return vals
-
def _check_backorder_moves(self):
"""Check if there are partial deliveries on any set of moves. The
computing is done in the same way the main picking method does it """
diff --git a/stock_whole_kit_constraint/static/description/index.html b/stock_whole_kit_constraint/static/description/index.html
index 6d57274b1..caaa84f38 100644
--- a/stock_whole_kit_constraint/static/description/index.html
+++ b/stock_whole_kit_constraint/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module allows to configure a product that has a BoM of type kit to disallow partial
deliveries so that the components can’t be partially delivered.
Table of contents
@@ -410,7 +410,7 @@ whole kit components units pending in a backorder.
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.
@@ -437,7 +437,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
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/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/stock_whole_kit_constraint/views/product_template_views.xml b/stock_whole_kit_constraint/views/product_template_views.xml
index c3d24cc3f..a423c002c 100644
--- a/stock_whole_kit_constraint/views/product_template_views.xml
+++ b/stock_whole_kit_constraint/views/product_template_views.xml
@@ -9,7 +9,7 @@
@@ -22,7 +22,7 @@