[MIG] stock_whole_kit_constraint: Migration to 13.0

TT29360
This commit is contained in:
david
2021-09-28 12:26:40 +02:00
committed by pilarvargas-tecnativa
parent b9c238d386
commit e109cb7064
6 changed files with 18 additions and 24 deletions

View File

@@ -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 <https://github.com/OCA/manufacture/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 <https://github.com/OCA/manufacture/issues/new?body=module:%20stock_whole_kit_constraint%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20stock_whole_kit_constraint%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
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 <https://github.com/OCA/manufacture/tree/12.0/stock_whole_kit_constraint>`_ project on GitHub.
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/13.0/stock_whole_kit_constraint>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -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)",

View File

@@ -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 ""

View File

@@ -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 """

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/manufacture/tree/12.0/stock_whole_kit_constraint"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-stock_whole_kit_constraint"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/129/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/manufacture/tree/13.0/stock_whole_kit_constraint"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-stock_whole_kit_constraint"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/129/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows to configure a product that has a BoM of type kit to disallow partial
deliveries so that the components cant be partially delivered.</p>
<p><strong>Table of contents</strong></p>
@@ -410,7 +410,7 @@ whole kit components units pending in a backorder.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/manufacture/issues/new?body=module:%20stock_whole_kit_constraint%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/manufacture/issues/new?body=module:%20stock_whole_kit_constraint%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -437,7 +437,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/12.0/stock_whole_kit_constraint">OCA/manufacture</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/13.0/stock_whole_kit_constraint">OCA/manufacture</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@@ -9,7 +9,7 @@
<xpath expr="//group[@name='group_lots_and_weight']" position="inside">
<field
name="allow_partial_kit_delivery"
attrs="{'invisible': [('bom_count', '=', 0), ('type', '!=', 'consu')]}"
attrs="{'invisible': [('bom_count', '=', 0), ('type', 'not in', ['consu', 'product'])]}"
/>
</xpath>
</field>
@@ -22,7 +22,7 @@
<xpath expr="//group[@name='group_lots_and_weight']" position="inside">
<field
name="allow_partial_kit_delivery"
attrs="{'invisible': [('bom_count', '=', 0), ('type', '!=', 'consu')]}"
attrs="{'invisible': [('bom_count', '=', 0), ('type', 'not in', ['consu', 'product'])]}"
/>
</xpath>
</field>