mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[12.0][MIG] mrp_bom_tracking
This commit is contained in:
committed by
Bernat Puig Font
parent
e104046d98
commit
31a2ab521c
@@ -14,13 +14,13 @@ MRP BoM Tracking
|
||||
: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/11.0/mrp_bom_tracking
|
||||
:target: https://github.com/OCA/manufacture/tree/12.0/mrp_bom_tracking
|
||||
:alt: OCA/manufacture
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/manufacture-11-0/manufacture-11-0-mrp_bom_tracking
|
||||
:target: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_bom_tracking
|
||||
: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/11.0
|
||||
:target: https://runbot.odoo-community.org/runbot/129/12.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -39,7 +39,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:%20mrp_bom_tracking%0Aversion:%2011.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:%20mrp_bom_tracking%0Aversion:%2012.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.
|
||||
|
||||
@@ -55,6 +55,7 @@ Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Miquel Raïch <miquel.raich@eficent.com>
|
||||
* Lois Rilo <lois.rilo@eficent.com>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
@@ -69,6 +70,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/11.0/mrp_bom_tracking>`_ project on GitHub.
|
||||
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/12.0/mrp_bom_tracking>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
{
|
||||
"name": "MRP BoM Tracking",
|
||||
"version": "11.0.1.0.0",
|
||||
"version": "12.0.1.0.0",
|
||||
"author": "Eficent, Odoo Community Association (OCA)",
|
||||
"summary": "Add track visibility to some fields of mrp boms.",
|
||||
"summary": "Logs any change to a BoM in the chatter",
|
||||
"website": "https://github.com/OCA/manufacture",
|
||||
"category": "Manufacturing",
|
||||
"depends": [
|
||||
@@ -15,5 +15,5 @@
|
||||
"views/bom_template.xml",
|
||||
],
|
||||
"license": "LGPL-3",
|
||||
'installable': True,
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
@@ -14,31 +14,31 @@ msgstr ""
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template_2
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template_2
|
||||
msgid ":\n"
|
||||
" New component<br/>"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template_2
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template_2
|
||||
msgid ":\n"
|
||||
" Removed component<br/>"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_line_template
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_line_template
|
||||
msgid "<br/>\n"
|
||||
" Product Unit of Measure:"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_line_template
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_line_template
|
||||
msgid "<strong>The component quantities or UoMs have been updated.</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template
|
||||
#: model:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template_2
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template_2
|
||||
msgid "<strong>The components have changed.</strong>"
|
||||
msgstr ""
|
||||
|
||||
@@ -48,17 +48,57 @@ msgid "Bill of Material"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_line_template
|
||||
#: model:ir.model,name:mrp_bom_tracking.model_mrp_bom_line
|
||||
msgid "Bill of Material Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__type
|
||||
msgid "BoM Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: selection:mrp.bom,type:0
|
||||
msgid "Kit"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: selection:mrp.bom,type:0
|
||||
msgid "Manufacture this product"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__picking_type_id
|
||||
msgid "Operation Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__product_tmpl_id
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_line_template
|
||||
msgid "Product Quantity:"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template
|
||||
msgid "component<br/>"
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__product_qty
|
||||
msgid "Quantity"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.model,name:mrp_bom_tracking.model_mrp_bom_line
|
||||
msgid "mrp.bom.line"
|
||||
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__code
|
||||
msgid "Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model:ir.model.fields,help:mrp_bom_tracking.field_mrp_bom__picking_type_id
|
||||
msgid "When a procurement has a ‘produce’ route with a operation type set, it will try to create a Manufacturing Order for that product using a BoM of the same operation type. That allows to define stock rules which trigger different manufacturing orders with different BoMs."
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_bom_tracking
|
||||
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template
|
||||
msgid "component<br/>"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
* Miquel Raïch <miquel.raich@eficent.com>
|
||||
* Lois Rilo <lois.rilo@eficent.com>
|
||||
|
||||
@@ -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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/manufacture/tree/11.0/mrp_bom_tracking"><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-11-0/manufacture-11-0-mrp_bom_tracking"><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/11.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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/manufacture/tree/12.0/mrp_bom_tracking"><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-mrp_bom_tracking"><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>This module adds track visibility to some fields of mrp boms. Also,
|
||||
it log notes for any change in the bom lines (components).</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
@@ -387,7 +387,7 @@ it log notes for any change in the bom lines (components).</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:%20mrp_bom_tracking%0Aversion:%2011.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:%20mrp_bom_tracking%0Aversion:%2012.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">
|
||||
@@ -402,6 +402,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Miquel Raïch <<a class="reference external" href="mailto:miquel.raich@eficent.com">miquel.raich@eficent.com</a>></li>
|
||||
<li>Lois Rilo <<a class="reference external" href="mailto:lois.rilo@eficent.com">lois.rilo@eficent.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
@@ -411,7 +412,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/11.0/mrp_bom_tracking">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/12.0/mrp_bom_tracking">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>
|
||||
|
||||
1
mrp_bom_tracking/tests/__init__.py
Normal file
1
mrp_bom_tracking/tests/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import test_mrp_bom_tracking
|
||||
63
mrp_bom_tracking/tests/test_mrp_bom_tracking.py
Normal file
63
mrp_bom_tracking/tests/test_mrp_bom_tracking.py
Normal file
@@ -0,0 +1,63 @@
|
||||
# 2019 Eficent Business and IT Consulting Services S.L.
|
||||
# - Lois Rilo <lois.rilo@eficent.com>
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.tests import common
|
||||
|
||||
|
||||
class TestBomTracking(common.SavepointCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
cls.product_obj = cls.env['product.product']
|
||||
cls.bom_obj = cls.env['mrp.bom']
|
||||
cls.bom_line_obj = cls.env['mrp.bom.line']
|
||||
|
||||
# Create products:
|
||||
cls.product_1 = cls.product_obj.create({
|
||||
'name': 'TEST 01',
|
||||
'type': 'product',
|
||||
})
|
||||
|
||||
cls.component_1 = cls.product_obj.create({
|
||||
'name': 'RM 01',
|
||||
'type': 'product',
|
||||
})
|
||||
cls.component_2 = cls.product_obj.create({
|
||||
'name': 'RM 02',
|
||||
'type': 'product',
|
||||
})
|
||||
cls.component_2_alt = cls.product_obj.create({
|
||||
'name': 'RM 02-B',
|
||||
'type': 'product',
|
||||
})
|
||||
|
||||
# Create Bills of Materials:
|
||||
cls.bom = cls.bom_obj.create({
|
||||
'product_tmpl_id': cls.product_1.product_tmpl_id.id,
|
||||
|
||||
})
|
||||
cls.line_1 = cls.bom_line_obj.create({
|
||||
'product_id': cls.component_1.id,
|
||||
'bom_id': cls.bom.id,
|
||||
'product_qty': 2.0,
|
||||
})
|
||||
cls.line_2 = cls.bom_line_obj.create({
|
||||
'product_id': cls.component_2.id,
|
||||
'bom_id': cls.bom.id,
|
||||
'product_qty': 5.0,
|
||||
})
|
||||
|
||||
def test_01_change_bom_line_qty(self):
|
||||
before = self.bom.message_ids
|
||||
self.line_1.product_qty = 3.0
|
||||
after = self.bom.message_ids
|
||||
self.assertEqual(len(after - before), 1)
|
||||
|
||||
def test_02_change_bom_line_product(self):
|
||||
before = self.bom.message_ids
|
||||
self.line_2.product_id = self.component_2_alt
|
||||
after = self.bom.message_ids
|
||||
self.assertEqual(len(after - before), 1)
|
||||
Reference in New Issue
Block a user