[MIG] mrp_bom_tracking: Migration to 13.0

This commit is contained in:
Joan Sisquella
2020-01-07 11:58:15 +01:00
committed by Bernat Puig Font
parent 549758e39c
commit 4874339f22
9 changed files with 100 additions and 72 deletions

View File

@@ -14,13 +14,13 @@ MRP BoM Tracking
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3 :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
:target: https://github.com/OCA/manufacture/tree/12.0/mrp_bom_tracking :target: https://github.com/OCA/manufacture/tree/13.0/mrp_bom_tracking
:alt: OCA/manufacture :alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |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-mrp_bom_tracking :target: https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-mrp_bom_tracking
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |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 :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@@ -39,7 +39,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_. 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. 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 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:%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:%20mrp_bom_tracking%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. Do not contact contributors directly about support or help with technical issues.
@@ -49,13 +49,14 @@ Credits
Authors Authors
~~~~~~~ ~~~~~~~
* Eficent * ForgeFlow
Contributors Contributors
~~~~~~~~~~~~ ~~~~~~~~~~~~
* Miquel Raïch <miquel.raich@eficent.com> * Miquel Raïch <miquel.raich@forgeflow.com>
* Lois Rilo <lois.rilo@eficent.com> * Lois Rilo <lois.rilo@forgeflow.com>
* Joan Sisquella <joan.sisquella@forgeflow.com>
Maintainers Maintainers
~~~~~~~~~~~ ~~~~~~~~~~~
@@ -70,6 +71,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/12.0/mrp_bom_tracking>`_ project on GitHub. This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/13.0/mrp_bom_tracking>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -1,10 +1,10 @@
# Copyright 2019 Eficent Business and IT Consulting Services S.L. # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{ {
"name": "MRP BoM Tracking", "name": "MRP BoM Tracking",
"version": "12.0.1.0.0", "version": "13.0.1.0.0",
"author": "Eficent, Odoo Community Association (OCA)", "author": "ForgeFlow, Odoo Community Association (OCA)",
"summary": "Logs any change to a BoM in the chatter", "summary": "Logs any change to a BoM in the chatter",
"website": "https://github.com/OCA/manufacture", "website": "https://github.com/OCA/manufacture",
"category": "Manufacturing", "category": "Manufacturing",

View File

@@ -1,6 +1,6 @@
# Translation of Odoo Server. # Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * mrp_bom_tracking # * mrp_bom_tracking
# #
msgid "" msgid ""
msgstr "" msgstr ""
@@ -16,19 +16,23 @@ msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model_terms: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" msgid ""
":\n"
" New component<br/>" " New component<br/>"
msgstr "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model_terms: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" msgid ""
":\n"
" Removed component<br/>" " Removed component<br/>"
msgstr "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model_terms: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" #: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template
msgid ""
"<br/>\n"
" Product Unit of Measure:" " Product Unit of Measure:"
msgstr "" msgstr ""
@@ -59,13 +63,9 @@ msgid "BoM Type"
msgstr "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: selection:mrp.bom,type:0 #: model:ir.model.fields,help:mrp_bom_tracking.field_mrp_bom__product_id
msgid "Kit" msgid ""
msgstr "" "If a product variant is defined the BOM is available only for this product."
#. module: mrp_bom_tracking
#: selection:mrp.bom,type:0
msgid "Manufacture this product"
msgstr "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
@@ -80,9 +80,15 @@ msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model_terms: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
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template
msgid "Product Quantity:" msgid "Product Quantity:"
msgstr "" msgstr ""
#. module: mrp_bom_tracking
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__product_id
msgid "Product Variant"
msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__product_qty #: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__product_qty
msgid "Quantity" msgid "Quantity"
@@ -95,7 +101,11 @@ msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model:ir.model.fields,help:mrp_bom_tracking.field_mrp_bom__picking_type_id #: 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." 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 "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking

View File

@@ -1,12 +1,12 @@
# Translation of Odoo Server. # Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * mrp_bom_tracking # * mrp_bom_tracking
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 12.0\n" "Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@@ -15,19 +15,23 @@ msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model_terms: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" msgid ""
":\n"
" New component<br/>" " New component<br/>"
msgstr "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model_terms: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" msgid ""
":\n"
" Removed component<br/>" " Removed component<br/>"
msgstr "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model_terms: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" #: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template
msgid ""
"<br/>\n"
" Product Unit of Measure:" " Product Unit of Measure:"
msgstr "" msgstr ""
@@ -58,13 +62,9 @@ msgid "BoM Type"
msgstr "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: selection:mrp.bom,type:0 #: model:ir.model.fields,help:mrp_bom_tracking.field_mrp_bom__product_id
msgid "Kit" msgid ""
msgstr "" "If a product variant is defined the BOM is available only for this product."
#. module: mrp_bom_tracking
#: selection:mrp.bom,type:0
msgid "Manufacture this product"
msgstr "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
@@ -79,9 +79,15 @@ msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model_terms: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
#: model_terms:ir.ui.view,arch_db:mrp_bom_tracking.track_bom_template
msgid "Product Quantity:" msgid "Product Quantity:"
msgstr "" msgstr ""
#. module: mrp_bom_tracking
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__product_id
msgid "Product Variant"
msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__product_qty #: model:ir.model.fields,field_description:mrp_bom_tracking.field_mrp_bom__product_qty
msgid "Quantity" msgid "Quantity"
@@ -94,11 +100,14 @@ msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: model:ir.model.fields,help:mrp_bom_tracking.field_mrp_bom__picking_type_id #: 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." 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 "" msgstr ""
#. module: mrp_bom_tracking #. module: mrp_bom_tracking
#: 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
msgid "component<br/>" msgid "component<br/>"
msgstr "" msgstr ""

View File

@@ -1,19 +1,19 @@
# Copyright 2019 Eficent Business and IT Consulting Services S.L. # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from odoo import api, fields, models from odoo import fields, models
class MrpBom(models.Model): class MrpBom(models.Model):
_inherit = "mrp.bom" _inherit = "mrp.bom"
code = fields.Char(track_visibility="onchange") code = fields.Char(tracking=True)
product_tmpl_id = fields.Many2one(track_visibility="always") product_id = fields.Many2one(tracking=True)
product_qty = fields.Float(track_visibility="onchange") product_tmpl_id = fields.Many2one(tracking=True)
picking_type_id = fields.Many2one(track_visibility="onchange") product_qty = fields.Float(tracking=True)
type = fields.Selection(track_visibility="onchange") picking_type_id = fields.Many2one(tracking=True)
type = fields.Selection(tracking=True)
@api.multi
def write(self, values): def write(self, values):
bom_line_ids = {} bom_line_ids = {}
if "bom_line_ids" in values: if "bom_line_ids" in values:
@@ -48,7 +48,6 @@ class MrpBom(models.Model):
class MrpBomLine(models.Model): class MrpBomLine(models.Model):
_inherit = "mrp.bom.line" _inherit = "mrp.bom.line"
@api.multi
def write(self, values): def write(self, values):
if "product_id" in values: if "product_id" in values:
for bom in self.mapped("bom_id"): for bom in self.mapped("bom_id"):

View File

@@ -1,2 +1,3 @@
* Miquel Raïch <miquel.raich@eficent.com> * Miquel Raïch <miquel.raich@forgeflow.com>
* Lois Rilo <lois.rilo@eficent.com> * Lois Rilo <lois.rilo@forgeflow.com>
* Joan Sisquella <joan.sisquella@forgeflow.com>

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! 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/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><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/13.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-13-0/manufacture-13-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/13.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, <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> it log notes for any change in the bom lines (components).</p>
<p><strong>Table of contents</strong></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>. <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. 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 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:%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:%20mrp_bom_tracking%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> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@@ -395,14 +395,15 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<div class="section" id="authors"> <div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2> <h2><a class="toc-backref" href="#id3">Authors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Eficent</li> <li>ForgeFlow</li>
</ul> </ul>
</div> </div>
<div class="section" id="contributors"> <div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2> <h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Miquel Raïch &lt;<a class="reference external" href="mailto:miquel.raich&#64;eficent.com">miquel.raich&#64;eficent.com</a>&gt;</li> <li>Miquel Raïch &lt;<a class="reference external" href="mailto:miquel.raich&#64;forgeflow.com">miquel.raich&#64;forgeflow.com</a>&gt;</li>
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;eficent.com">lois.rilo&#64;eficent.com</a>&gt;</li> <li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
<li>Joan Sisquella &lt;<a class="reference external" href="mailto:joan.sisquella&#64;forgeflow.com">joan.sisquella&#64;forgeflow.com</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
@@ -412,7 +413,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 <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> 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/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/13.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> <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>
</div> </div>

View File

@@ -1,5 +1,5 @@
# 2019 Eficent Business and IT Consulting Services S.L. # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# - Lois Rilo <lois.rilo@eficent.com> # - Lois Rilo <lois.rilo@forgeflow.com>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests import common from odoo.tests import common
@@ -16,7 +16,6 @@ class TestBomTracking(common.SavepointCase):
# Create products: # Create products:
cls.product_1 = cls.product_obj.create({"name": "TEST 01", "type": "product"}) 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_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 = cls.product_obj.create({"name": "RM 02", "type": "product"})
cls.component_2_alt = cls.product_obj.create( cls.component_2_alt = cls.product_obj.create(

View File

@@ -1,42 +1,50 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 Eficent Business and IT Consulting Services S.L. <!-- Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). --> License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). -->
<odoo> <odoo>
<template id="track_bom_line_template"> <template id="track_bom_line_template">
<div> <div>
<strong>The component quantities or UoMs have been updated.</strong> <strong>The component quantities or UoMs have been updated.</strong>
<ul> <ul>
<t t-foreach="lines" t-as="line"> <t t-foreach="lines" t-as="line">
<li><t t-esc="line.product_id.display_name"/>:</li> <li><t t-esc="line.product_id.display_name" />:</li>
Product Quantity: <t t-esc="line.product_qty" /><t t-if='line.product_qty != product_qty'> -&gt; <t t-esc="float(product_qty)"/></t><br/> Product Quantity: <t t-esc="line.product_qty" /><t
Product Unit of Measure: <t t-esc="line.product_uom_id.display_name" /><t t-if='line.product_uom_id != product_uom_id'> -&gt; <t t-esc="product_uom_id.display_name"/></t><br/> t-if='line.product_qty != product_qty'
> -&gt; <t t-esc="float(product_qty)" /></t><br />
Product Unit of Measure: <t
t-esc="line.product_uom_id.display_name"
/><t t-if='line.product_uom_id != product_uom_id'> -&gt; <t
t-esc="product_uom_id.display_name"
/></t><br />
</t> </t>
</ul> </ul>
</div> </div>
</template> </template>
<template id="track_bom_template"> <template id="track_bom_template">
<div> <div>
<strong>The components have changed.</strong> <strong>The components have changed.</strong>
<ul> <ul>
<t t-foreach="lines" t-as="line"> <t t-foreach="lines" t-as="line">
<li><t t-esc="line.product_id.display_name"/>: <li><t t-esc="line.product_id.display_name" />: <t
<t t-esc="mode"/> component<br/></li> t-esc="mode"
/> component<br /></li>
Product Quantity: <t t-esc="line.product_qty" /><br />
Product Unit of Measure: <t
t-esc="line.product_uom_id.display_name"
/><br />
</t> </t>
</ul> </ul>
</div> </div>
</template> </template>
<template id="track_bom_template_2"> <template id="track_bom_template_2">
<div> <div>
<strong>The components have changed.</strong> <strong>The components have changed.</strong>
<ul> <ul>
<t t-foreach="lines" t-as="line"> <t t-foreach="lines" t-as="line">
<li><t t-esc="line.product_id.display_name"/>: <li><t t-esc="line.product_id.display_name" />:
Removed component<br/></li> Removed component<br /></li>
<li><t t-esc="product_id.display_name"/>: <li><t t-esc="product_id.display_name" />:
New component<br/></li> New component<br /></li>
</t> </t>
</ul> </ul>
</div> </div>