[MIG] mrp_bom_note: Migration to 14.0

This commit is contained in:
Laurent Bélorgey
2022-12-29 06:35:30 +01:00
parent ead9757b50
commit f13531a1d5
4 changed files with 1 additions and 117 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Notes in Bill of Materials",
"version": "13.0.1.0.0",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"author": "OdooMRP team,"
"AvanzOSC,"

View File

@@ -1,44 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mrp_bom_note
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-11-05 11:53+0000\n"
"PO-Revision-Date: 2014-11-05 11:53+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: mrp_bom_note
#: model:ir.model,name:mrp_bom_note.model_mrp_bom
msgid "Bill of Material"
msgstr ""
#. module: mrp_bom_note
#: view:mrp.bom:mrp_bom_note.mrp_bom_form_view_inh_note
msgid "Components"
msgstr ""
#. module: mrp_bom_note
#: view:mrp.production:mrp_bom_note.mrp_production_form_view_inh_note
msgid "Extra Information"
msgstr ""
#. module: mrp_bom_note
#: model:ir.model,name:mrp_bom_note.model_mrp_production
msgid "Manufacturing Order"
msgstr ""
#. module: mrp_bom_note
#: view:mrp.bom:mrp_bom_note.mrp_bom_form_view_inh_note
#: field:mrp.bom,notes:0
#: view:mrp.production:mrp_bom_note.mrp_production_form_view_inh_note
msgid "Notes"
msgstr ""

View File

@@ -1,4 +0,0 @@
# © 2018 Agung Rachmatullah
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import test_mrp_bom_note

View File

@@ -1,68 +0,0 @@
# © 2018 Agung Rachmatullah
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestMrpBomNote(TransactionCase):
def setUp(self):
super(TestMrpBomNote, self).setUp()
self.product_t = self.env["product.template"]
self.product_p = self.env["product.product"]
self.bom = self.env["mrp.bom"]
def test_notes(self):
uom_unit = self.env.ref("uom.product_uom_unit")
product_t_fg = self.product_t.create(
{
"name": "Chair",
"type": "product",
"uom_id": uom_unit.id,
"uom_po_id": uom_unit.id,
}
)
product_t_1 = self.product_t.create(
{
"name": "Log 1",
"type": "product",
"uom_id": uom_unit.id,
"uom_po_id": uom_unit.id,
}
)
product_t_2 = self.product_t.create(
{
"name": "Log 2",
"type": "product",
"uom_id": uom_unit.id,
"uom_po_id": uom_unit.id,
}
)
product_t_3 = self.product_t.create(
{
"name": "Log 3",
"type": "product",
"uom_id": uom_unit.id,
"uom_po_id": uom_unit.id,
}
)
product_fg = self.product_p.create({"product_tmpl_id": product_t_fg.id})
product_1 = self.product_p.create({"product_tmpl_id": product_t_1.id})
product_2 = self.product_p.create({"product_tmpl_id": product_t_2.id})
product_3 = self.product_p.create({"product_tmpl_id": product_t_3.id})
BoM1 = self.bom.create(
{
"product_id": product_fg.id,
"product_tmpl_id": product_fg.product_tmpl_id.id,
"product_uom_id": uom_unit.id,
"product_qty": 1.0,
"type": "normal",
"bom_line_ids": [
(0, 0, {"product_id": product_1.id, "product_qty": 4}),
(0, 0, {"product_id": product_2.id, "product_qty": 2}),
(0, 0, {"product_id": product_3.id, "product_qty": 2}),
],
}
)
BoM1.write({"notes": "<p>Test</p>"})
self.assertEqual(BoM1.notes, "<p>Test</p>")