diff --git a/mrp_bom_note/README.rst b/mrp_bom_note/README.rst index 880d88649..811c2ce5d 100644 --- a/mrp_bom_note/README.rst +++ b/mrp_bom_note/README.rst @@ -53,6 +53,7 @@ Contributors * Pedro M. Baeza * Ana Juaristi * Bima Wijaya +* Agung Rachmatullah Maintainer ---------- diff --git a/mrp_bom_note/__init__.py b/mrp_bom_note/__init__.py index 6ea76f9a8..1f92abd7d 100644 --- a/mrp_bom_note/__init__.py +++ b/mrp_bom_note/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2015 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html diff --git a/mrp_bom_note/__manifest__.py b/mrp_bom_note/__manifest__.py index 75fdd7e19..bf696b245 100644 --- a/mrp_bom_note/__manifest__.py +++ b/mrp_bom_note/__manifest__.py @@ -1,10 +1,10 @@ -# -*- coding: utf-8 -*- # © 2015 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { "name": "Notes in Bill of Materials", - "version": "10.0.1.0.0", + "version": "11.0.1.0.0", + "license": "AGPL-3", "author": "OdooMRP team," "AvanzOSC," "Serv. Tecnol. Avanzados - Pedro M. Baeza, " diff --git a/mrp_bom_note/i18n/hr.po b/mrp_bom_note/i18n/hr.po index 1db28926d..071cf1588 100644 --- a/mrp_bom_note/i18n/hr.po +++ b/mrp_bom_note/i18n/hr.po @@ -4,13 +4,14 @@ # # Translators: # OCA Transbot , 2017 +# Bole , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-11-28 03:44+0000\n" -"PO-Revision-Date: 2017-11-28 03:44+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2018-02-12 03:48+0000\n" +"Last-Translator: Bole , 2018\n" "Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,7 +22,7 @@ msgstr "" #. module: mrp_bom_note #: model:ir.model,name:mrp_bom_note.model_mrp_bom msgid "Bill of Material" -msgstr "" +msgstr "Sastavnica" #. module: mrp_bom_note #: model:ir.model.fields,field_description:mrp_bom_note.field_mrp_bom_notes diff --git a/mrp_bom_note/models/__init__.py b/mrp_bom_note/models/__init__.py index 98e1652d7..f703f84eb 100644 --- a/mrp_bom_note/models/__init__.py +++ b/mrp_bom_note/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2015 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html diff --git a/mrp_bom_note/models/mrp_bom.py b/mrp_bom_note/models/mrp_bom.py index 60d032302..fe08e5115 100644 --- a/mrp_bom_note/models/mrp_bom.py +++ b/mrp_bom_note/models/mrp_bom.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2015 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html diff --git a/mrp_bom_note/tests/__init__.py b/mrp_bom_note/tests/__init__.py new file mode 100644 index 000000000..344cedcdb --- /dev/null +++ b/mrp_bom_note/tests/__init__.py @@ -0,0 +1,4 @@ +# © 2018 Agung Rachmatullah +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_mrp_bom_note \ No newline at end of file diff --git a/mrp_bom_note/tests/test_mrp_bom_note.py b/mrp_bom_note/tests/test_mrp_bom_note.py new file mode 100644 index 000000000..4b04606c2 --- /dev/null +++ b/mrp_bom_note/tests/test_mrp_bom_note.py @@ -0,0 +1,77 @@ +# © 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('product.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', + 'move_raw_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': '

Test

' + }) + self.assertEqual(BoM1.notes, '

Test

')