diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f302f777..3df236a18 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,6 +45,11 @@ repos: - id: oca-update-pre-commit-excluded-addons - id: oca-fix-manifest-website args: ["https://github.com/avanzosc/mrp-addons"] + - repo: https://github.com/OCA/odoo-pre-commit-hooks + rev: v0.0.25 + hooks: + - id: oca-checks-odoo-module + - id: oca-checks-po - repo: https://github.com/myint/autoflake rev: v2.3.1 hooks: diff --git a/mrp_bom_component_change/README.rst b/mrp_bom_component_change/README.rst new file mode 100644 index 000000000..888d9c564 --- /dev/null +++ b/mrp_bom_component_change/README.rst @@ -0,0 +1,30 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================== +Mrp bom component change +======================== + +* In Manufacturing/Products new menu "Mass component change in BoMs" for + allows to change massively one component by another on a list of BoMs. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_bom_component_change/__init__.py b/mrp_bom_component_change/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_bom_component_change/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_bom_component_change/__manifest__.py b/mrp_bom_component_change/__manifest__.py new file mode 100644 index 000000000..b2e448d5a --- /dev/null +++ b/mrp_bom_component_change/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# Copyright 2014 Daniel Campos - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "MRP BoM component massive change", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "author": "OdooMRP team, " "AvanzOSC, " "Serv. Tecnol. Avanzados - Pedro M. Baeza", + "license": "AGPL-3", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "mrp", + ], + "data": ["views/mrp_bom_change_view.xml", "security/ir.model.access.csv"], + "installable": True, +} diff --git a/mrp_bom_component_change/i18n/es.po b/mrp_bom_component_change/i18n/es.po new file mode 100644 index 000000000..e2851dd4e --- /dev/null +++ b/mrp_bom_component_change/i18n/es.po @@ -0,0 +1,124 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_component_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-06 06:33+0000\n" +"PO-Revision-Date: 2024-06-06 06:33+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_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "Bill of Material" +msgstr "Lista de Materiales" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__bom_ids +#: model_terms:ir.ui.view,arch_db:mrp_bom_component_change.mrp_bom_change_form_view +msgid "BoMs" +msgstr "LdMs" + +#. module: mrp_bom_component_change +#: model_terms:ir.ui.view,arch_db:mrp_bom_component_change.mrp_bom_change_form_view +msgid "Change Component" +msgstr "Cambiar componente" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__date +msgid "Change Date" +msgstr "Fecha del cambio" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__user +msgid "Changed By" +msgstr "Cambiado por" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__id +msgid "ID" +msgstr "ID" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change____last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: mrp_bom_component_change +#: model:ir.actions.act_window,name:mrp_bom_component_change.action_bom_change_view +#: model:ir.ui.menu,name:mrp_bom_component_change.mrp_bom_change_menu +msgid "Mass component change in BoMs" +msgstr "Cambio masivo componente en LdMs" + +#. module: mrp_bom_component_change +#: model:ir.model,name:mrp_bom_component_change.model_mrp_bom_change +msgid "Mrp BoM Component Change" +msgstr "Mrp Cambio componente LdM" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__name +msgid "Name" +msgstr "Nombre" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__new_component_id +msgid "New Component" +msgstr "Nuevo componente" + +#. module: mrp_bom_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "Not Components selected!" +msgstr "¡No componentes seleccionados!" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__old_component_id +msgid "Old Component" +msgstr "Componente viejo" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__reason +msgid "Reason" +msgstr "Razón" + +#. module: mrp_bom_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "There isn't any BoM for selected component" +msgstr "No hay ninguna LdM para el componente seleccionado" diff --git a/mrp_bom_component_change/i18n/mrp_bom_component_change.pot b/mrp_bom_component_change/i18n/mrp_bom_component_change.pot new file mode 100644 index 000000000..ed3749e98 --- /dev/null +++ b/mrp_bom_component_change/i18n/mrp_bom_component_change.pot @@ -0,0 +1,124 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_component_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-06 06:33+0000\n" +"PO-Revision-Date: 2024-06-06 06:33+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_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "Bill of Material" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__bom_ids +#: model_terms:ir.ui.view,arch_db:mrp_bom_component_change.mrp_bom_change_form_view +msgid "BoMs" +msgstr "" + +#. module: mrp_bom_component_change +#: model_terms:ir.ui.view,arch_db:mrp_bom_component_change.mrp_bom_change_form_view +msgid "Change Component" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__date +msgid "Change Date" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__user +msgid "Changed By" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__create_uid +msgid "Created by" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__create_date +msgid "Created on" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__id +msgid "ID" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__write_date +msgid "Last Updated on" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.actions.act_window,name:mrp_bom_component_change.action_bom_change_view +#: model:ir.ui.menu,name:mrp_bom_component_change.mrp_bom_change_menu +msgid "Mass component change in BoMs" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model,name:mrp_bom_component_change.model_mrp_bom_change +msgid "Mrp BoM Component Change" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__name +msgid "Name" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__new_component_id +msgid "New Component" +msgstr "" + +#. module: mrp_bom_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "Not Components selected!" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__old_component_id +msgid "Old Component" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__reason +msgid "Reason" +msgstr "" + +#. module: mrp_bom_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "There isn't any BoM for selected component" +msgstr "" diff --git a/mrp_bom_component_change/models/__init__.py b/mrp_bom_component_change/models/__init__.py new file mode 100644 index 000000000..ae2257795 --- /dev/null +++ b/mrp_bom_component_change/models/__init__.py @@ -0,0 +1 @@ +from . import mrp_bom_change diff --git a/mrp_bom_component_change/models/mrp_bom_change.py b/mrp_bom_component_change/models/mrp_bom_change.py new file mode 100644 index 000000000..369a9ba71 --- /dev/null +++ b/mrp_bom_component_change/models/mrp_bom_change.py @@ -0,0 +1,74 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class MrpBomChange(models.Model): + _name = "mrp.bom.change" + _description = "Mrp BoM Component Change" + + @api.depends("old_component_id") + def _compute_bom_ids(self): + bom_obj = self.env["mrp.bom"] + for change in self: + boms = bom_obj + change.bom_ids = [(6, 0, [])] + if change.old_component_id: + for bom in bom_obj.search([]): + bom_lines = bom.bom_line_ids.filtered( + lambda x: x.product_id.id == self.old_component_id.id + ) + if bom_lines and bom not in boms: + boms += bom + change.bom_ids = [(6, 0, boms.ids)] + + name = fields.Char(required=True, copy=False) + new_component_id = fields.Many2one( + string="New Component", comodel_name="product.product", required=True + ) + old_component_id = fields.Many2one( + string="Old Component", comodel_name="product.product", required=True + ) + bom_ids = fields.Many2many( + string="BoMs", + comodel_name="mrp.bom", + relation="rel_mrp_bom_change", + column1="bom_change_id", + column2="bom_id", + copy=False, + store=True, + readonly=True, + compute="_compute_bom_ids", + ) + date = fields.Date(string="Change Date", readonly=True) + user = fields.Many2one(string="Changed By", comodel_name="res.users", readonly=True) + reason = fields.Char() + + def do_component_change(self): + self.ensure_one() + if not self.old_component_id or not self.new_component_id: + raise ValidationError(_("Not Components selected!")) + if not self.bom_ids: + raise ValidationError(_("There isn't any BoM for selected component")) + for bom in self.bom_ids: + bom_lines = bom.bom_line_ids.filtered( + lambda x: x.product_id.id == self.old_component_id.id + ) + values, bom_lines = self._get_new_component(bom_lines) + # add product_tmpl_id in case of mrp_product_variants are installed + if hasattr(bom_lines, "product_tmpl_id"): + values["product_tmpl_id"] = self.new_component_id.product_tmpl_id.id + bom_lines.write(values) + self.write({"date": fields.Date.context_today(self), "user": self.env.user.id}) + return { + "name": _("Bill of Material"), + "view_mode": "tree,form", + "res_model": "mrp.bom", + "type": "ir.actions.act_window", + "domain": [("id", "in", self.bom_ids.mapped("id"))], + } + + def _get_new_component(self, bom_lines): + values = {"product_id": self.new_component_id.id} + return values, bom_lines diff --git a/mrp_bom_component_change/security/ir.model.access.csv b/mrp_bom_component_change/security/ir.model.access.csv new file mode 100644 index 000000000..e745bdccc --- /dev/null +++ b/mrp_bom_component_change/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_mrp_bom_change,mrp.bom.change,model_mrp_bom_change,mrp.group_mrp_user,1,0,0,0 +access_mrp_bom_change_manager,mrp.bom.change.manager,model_mrp_bom_change,mrp.group_mrp_manager,1,1,1,1 diff --git a/mrp_bom_component_change/tests/__init__.py b/mrp_bom_component_change/tests/__init__.py new file mode 100644 index 000000000..b0421958c --- /dev/null +++ b/mrp_bom_component_change/tests/__init__.py @@ -0,0 +1 @@ +from . import test_mrp_bom_component_change diff --git a/mrp_bom_component_change/tests/test_mrp_bom_component_change.py b/mrp_bom_component_change/tests/test_mrp_bom_component_change.py new file mode 100644 index 000000000..23201d689 --- /dev/null +++ b/mrp_bom_component_change/tests/test_mrp_bom_component_change.py @@ -0,0 +1,38 @@ +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +############################################################################## +import odoo.tests.common as common + + +class TestMrpBomComponentChange(common.TransactionCase): + + def setUp(self): + super().setUp() + self.mrp_bom_model = self.env["mrp.bom"] + self.mrp_bom_change_model = self.env["mrp.bom.change"] + vals = { + "product_tmpl_id": self.env.ref( + "product.product_product_11_product_template" + ).id, + "bom_line_ids": [ + (0, 0, {"product_id": self.env.ref("product.product_product_5").id}), + (0, 0, {"product_id": self.env.ref("product.product_product_6").id}), + ], + } + self.mrp_bom = self.mrp_bom_model.create(vals) + + def test_mrp_bom_change_without_new_version(self): + mrp_bom_change = self.mrp_bom_change_model.create( + { + "name": "PROBE-1", + "old_component_id": self.env.ref("product.product_product_5").id, + "new_component_id": self.env.ref("product.product_product_9").id, + } + ) + mrp_bom_change.do_component_change() + for bom in mrp_bom_change.bom_ids: + for line in bom.bom_line_ids: + self.assertNotEqual( + self.env.ref("product.product_product_5").id, + line.product_id.id, + "Incorrect found old component in MRP BoM", + ) diff --git a/mrp_bom_component_change/views/mrp_bom_change_view.xml b/mrp_bom_component_change/views/mrp_bom_change_view.xml new file mode 100644 index 000000000..f8b00875a --- /dev/null +++ b/mrp_bom_component_change/views/mrp_bom_change_view.xml @@ -0,0 +1,73 @@ + + + + mrp.bom.change.tree.view + mrp.bom.change + + + + + + + + + + + + + + mrp.bom.change.form.view + mrp.bom.change + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + +
+
+
+
+ + + Mass component change in BoMs + ir.actions.act_window + mrp.bom.change + tree,form + + + +
diff --git a/mrp_bom_line_product_brand_info/README.rst b/mrp_bom_line_product_brand_info/README.rst new file mode 100644 index 000000000..05eb0e102 --- /dev/null +++ b/mrp_bom_line_product_brand_info/README.rst @@ -0,0 +1,31 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=============================== +Mrp bom line product brand info +=============================== + +* In "Bill of Material Line" object, new fields: "Manufacturer codes", and + "Markings". +* Print these two new fields in "Cutomized BoM Report". + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_bom_line_product_brand_info/__init__.py b/mrp_bom_line_product_brand_info/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_bom_line_product_brand_info/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_bom_line_product_brand_info/__manifest__.py b/mrp_bom_line_product_brand_info/__manifest__.py new file mode 100644 index 000000000..047ebe04e --- /dev/null +++ b/mrp_bom_line_product_brand_info/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + "name": "Mrp BoM Line Product Brand Info", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "author": "Avanzosc", + "license": "AGPL-3", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "mrp", + "mrp_bom_report", + "product_brand_supplierinfo", + ], + "data": [ + "report/mrp_bom_report.xml", + "views/mrp_bom_line_views.xml", + "views/mrp_bom_views.xml", + ], + "installable": True, +} diff --git a/mrp_bom_line_product_brand_info/i18n/es.po b/mrp_bom_line_product_brand_info/i18n/es.po new file mode 100644 index 000000000..88756ae9e --- /dev/null +++ b/mrp_bom_line_product_brand_info/i18n/es.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_line_product_brand_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-03 08:34+0000\n" +"PO-Revision-Date: 2024-06-03 08:34+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_line_product_brand_info +#: model:ir.model,name:mrp_bom_line_product_brand_info.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "Línea de Lista de Materiales" + +#. module: mrp_bom_line_product_brand_info +#: model:ir.model.fields,field_description:mrp_bom_line_product_brand_info.field_mrp_bom_line__manufacturer_codes +msgid "Manufacturer codes" +msgstr "Códigos fabricación" + +#. module: mrp_bom_line_product_brand_info +#: model:ir.model.fields,field_description:mrp_bom_line_product_brand_info.field_mrp_bom_line__markings +msgid "Markings" +msgstr "Marcas" diff --git a/mrp_bom_line_product_brand_info/i18n/mrp_bom_line_product_brand_info.pot b/mrp_bom_line_product_brand_info/i18n/mrp_bom_line_product_brand_info.pot new file mode 100644 index 000000000..586bb6a22 --- /dev/null +++ b/mrp_bom_line_product_brand_info/i18n/mrp_bom_line_product_brand_info.pot @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_line_product_brand_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-03 08:34+0000\n" +"PO-Revision-Date: 2024-06-03 08:34+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_line_product_brand_info +#: model:ir.model,name:mrp_bom_line_product_brand_info.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "" + +#. module: mrp_bom_line_product_brand_info +#: model:ir.model.fields,field_description:mrp_bom_line_product_brand_info.field_mrp_bom_line__manufacturer_codes +msgid "Manufacturer codes" +msgstr "" + +#. module: mrp_bom_line_product_brand_info +#: model:ir.model.fields,field_description:mrp_bom_line_product_brand_info.field_mrp_bom_line__markings +msgid "Markings" +msgstr "" diff --git a/mrp_bom_line_product_brand_info/models/__init__.py b/mrp_bom_line_product_brand_info/models/__init__.py new file mode 100644 index 000000000..35aa482ff --- /dev/null +++ b/mrp_bom_line_product_brand_info/models/__init__.py @@ -0,0 +1 @@ +from . import mrp_bom_line diff --git a/mrp_bom_line_product_brand_info/models/mrp_bom_line.py b/mrp_bom_line_product_brand_info/models/mrp_bom_line.py new file mode 100644 index 000000000..5415fd229 --- /dev/null +++ b/mrp_bom_line_product_brand_info/models/mrp_bom_line.py @@ -0,0 +1,46 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class MrpBomLine(models.Model): + _inherit = "mrp.bom.line" + + manufacturer_codes = fields.Text( + string="Manufacturer codes", compute="_compute_product_brand_info" + ) + markings = fields.Text(compute="_compute_product_brand_info") + + def _compute_product_brand_info(self): + for line in self.filtered(lambda c: c.product_tmpl_id): + texto = "" + markings = "" + for seller in line.product_tmpl_id.seller_ids: + partner_name = seller.partner_id.name + code = ( + "" + if not seller.product_brand_id.code + else seller.product_brand_id.code + ) + marking = ( + "" + if not seller.product_brand_id.marking + else seller.product_brand_id.marking + ) + if not texto: + texto = "{}: {} - {}".format(partner_name, code, marking) + else: + texto = "{} // {}: {} - {}".format( + texto, partner_name, code, marking + ) + if not markings: + markings = "{}: {}".format(partner_name, marking) + else: + markings = "{} // {}: {}".format(markings, partner_name, marking) + line.manufacturer_codes = texto + line.markings = markings + + def get_datas_to_print_bom(self): + result = super().get_datas_to_print_bom() + result["manufacturer_codes"] = self.manufacturer_codes + return result diff --git a/mrp_bom_line_product_brand_info/report/mrp_bom_report.xml b/mrp_bom_line_product_brand_info/report/mrp_bom_report.xml new file mode 100644 index 000000000..a7862b05e --- /dev/null +++ b/mrp_bom_line_product_brand_info/report/mrp_bom_report.xml @@ -0,0 +1,14 @@ + + + + diff --git a/mrp_bom_line_product_brand_info/views/mrp_bom_line_views.xml b/mrp_bom_line_product_brand_info/views/mrp_bom_line_views.xml new file mode 100644 index 000000000..d19f2956f --- /dev/null +++ b/mrp_bom_line_product_brand_info/views/mrp_bom_line_views.xml @@ -0,0 +1,13 @@ + + + + mrp.bom.line + + + + + + + + + diff --git a/mrp_bom_line_product_brand_info/views/mrp_bom_views.xml b/mrp_bom_line_product_brand_info/views/mrp_bom_views.xml new file mode 100644 index 000000000..d93c2eb2a --- /dev/null +++ b/mrp_bom_line_product_brand_info/views/mrp_bom_views.xml @@ -0,0 +1,16 @@ + + + + mrp.bom + + + + + + + + + diff --git a/mrp_bom_multiple_production_qty/README.rst b/mrp_bom_multiple_production_qty/README.rst new file mode 100644 index 000000000..183648fdb --- /dev/null +++ b/mrp_bom_multiple_production_qty/README.rst @@ -0,0 +1,31 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=============================== +MRP bom multiple production qty +=============================== + +* Adding field to set production multiple in the LdM for productions. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* José A. Ballate +* Ignacio Ales López +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_bom_multiple_production_qty/__init__.py b/mrp_bom_multiple_production_qty/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_bom_multiple_production_qty/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_bom_multiple_production_qty/__manifest__.py b/mrp_bom_multiple_production_qty/__manifest__.py new file mode 100644 index 000000000..1c69a8b54 --- /dev/null +++ b/mrp_bom_multiple_production_qty/__manifest__.py @@ -0,0 +1,15 @@ +# (c) José A. Ballate - Guadaltech +# (c) Ignacio Ales López - Guadaltech +# (c) 2024 Alfredo de la Fuente - Avanzosc +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "MRP Bom Multiple Production Qty", + "version": "16.0.1.0.0", + "category": "Manufacturing", + "author": "Guadaltech Soluciones Tecnológicas S.L., AvanzOSC", + "website": "https://github.com/avanzosc/mrp-addons", + "license": "LGPL-3", + "depends": ["mrp"], + "data": ["views/mrp_bom.xml"], + "installable": True, +} diff --git a/mrp_bom_multiple_production_qty/i18n/en_US.po b/mrp_bom_multiple_production_qty/i18n/en_US.po new file mode 100644 index 000000000..5aacdd92b --- /dev/null +++ b/mrp_bom_multiple_production_qty/i18n/en_US.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_multiple_production_qty +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-05 07:41+0000\n" +"PO-Revision-Date: 2024-07-05 07:41+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_multiple_production_qty +#: model:ir.model,name:mrp_bom_multiple_production_qty.model_mrp_bom +msgid "Bill of Material" +msgstr "" + +#. module: mrp_bom_multiple_production_qty +#: model:ir.model,name:mrp_bom_multiple_production_qty.model_mrp_production +msgid "Mrp Production" +msgstr "" + +#. module: mrp_bom_multiple_production_qty +#: model:ir.model.fields,field_description:mrp_bom_multiple_production_qty.field_mrp_bom__production_multiple +msgid "Production Multiple" +msgstr "" diff --git a/mrp_bom_multiple_production_qty/i18n/es.po b/mrp_bom_multiple_production_qty/i18n/es.po new file mode 100644 index 000000000..fcf2bc0fb --- /dev/null +++ b/mrp_bom_multiple_production_qty/i18n/es.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_multiple_production_qty +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-05 07:41+0000\n" +"PO-Revision-Date: 2024-07-05 07:41+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_multiple_production_qty +#: model:ir.model,name:mrp_bom_multiple_production_qty.model_mrp_bom +msgid "Bill of Material" +msgstr "Lista de Materiales" + +#. module: mrp_bom_multiple_production_qty +#: model:ir.model,name:mrp_bom_multiple_production_qty.model_mrp_production +msgid "Mrp Production" +msgstr "Orden de producción" + +#. module: mrp_bom_multiple_production_qty +#: model:ir.model.fields,field_description:mrp_bom_multiple_production_qty.field_mrp_bom__production_multiple +msgid "Production Multiple" +msgstr "Producción múltiple" diff --git a/mrp_bom_multiple_production_qty/i18n/mrp_bom_multiple_production_qty.pot b/mrp_bom_multiple_production_qty/i18n/mrp_bom_multiple_production_qty.pot new file mode 100644 index 000000000..5aacdd92b --- /dev/null +++ b/mrp_bom_multiple_production_qty/i18n/mrp_bom_multiple_production_qty.pot @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_multiple_production_qty +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-05 07:41+0000\n" +"PO-Revision-Date: 2024-07-05 07:41+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_multiple_production_qty +#: model:ir.model,name:mrp_bom_multiple_production_qty.model_mrp_bom +msgid "Bill of Material" +msgstr "" + +#. module: mrp_bom_multiple_production_qty +#: model:ir.model,name:mrp_bom_multiple_production_qty.model_mrp_production +msgid "Mrp Production" +msgstr "" + +#. module: mrp_bom_multiple_production_qty +#: model:ir.model.fields,field_description:mrp_bom_multiple_production_qty.field_mrp_bom__production_multiple +msgid "Production Multiple" +msgstr "" diff --git a/mrp_bom_multiple_production_qty/models/__init__.py b/mrp_bom_multiple_production_qty/models/__init__.py new file mode 100644 index 000000000..9a394f763 --- /dev/null +++ b/mrp_bom_multiple_production_qty/models/__init__.py @@ -0,0 +1,2 @@ +from . import mrp_bom +from . import mrp_production diff --git a/mrp_bom_multiple_production_qty/models/mrp_bom.py b/mrp_bom_multiple_production_qty/models/mrp_bom.py new file mode 100644 index 000000000..b44eaaa6c --- /dev/null +++ b/mrp_bom_multiple_production_qty/models/mrp_bom.py @@ -0,0 +1,11 @@ +# (c) José A. Ballate - Guadaltech +# (c) Ignacio Ales López - Guadaltech +# (c) 2024 Alfredo de la Fuente - Avanzosc +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class MrpBom(models.Model): + _inherit = "mrp.bom" + + production_multiple = fields.Float(default=0, required=False) diff --git a/mrp_bom_multiple_production_qty/models/mrp_production.py b/mrp_bom_multiple_production_qty/models/mrp_production.py new file mode 100644 index 000000000..592b6f81a --- /dev/null +++ b/mrp_bom_multiple_production_qty/models/mrp_production.py @@ -0,0 +1,62 @@ +# (c) José A. Ballate - Guadaltech +# (c) Ignacio Ales López - Guadaltech +# (c) 2024 Alfredo de la Fuente - Avanzosc +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from math import floor + +from odoo import api, models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + @staticmethod + def _calculate_multiple_amount_per_bom(product_qty, bom): + """ + _calculate_multiple_amount_per_bom Retorna la nueva cantidad del + producto según el múltiplo de la LdM. + + Calcula la cantidad que debe tener la producción según los múltiplos + indicados en ésta. La fórmula que sigue el sistema es calcular el + módulo de la producción actual en base al múltiplo + + :param product_qty: Cantidad a producir original + :type product_qty: float + :param bom: Lista de materiales en la que se va a producir y se + consultará el múltiplo. + :type bom: recordset("mrp.bom") + :return: Cantidad nueva de la produccción. En caso de ser múltiplo o no + ser necesario, será la misma que la original. + :rtype: float + """ + result = product_qty + + # Comprobamos que haya un valor válido o que la cantidad a producir no + # sea menor a la cantidad múltiple. + if bom.production_multiple > 0.0 and product_qty > 0: + # Ejecutamos el módulo con respecto a los múltiplos + mod_product_qty = product_qty % bom.production_multiple + # Si es cero, es un múltiplo y lo dejamos así. + if mod_product_qty != 0: + # En caso contrario, tenemos que encontrar el múltiplo más cercano. + result = bom.production_multiple * ( + floor(product_qty / bom.production_multiple) + 1 + ) + + return result + + @api.depends("bom_id") + def _compute_product_qty(self): + result = super()._compute_product_qty() + for production in self.filtered(lambda x: x.state == "draft"): + production.product_qty = MrpProduction._calculate_multiple_amount_per_bom( + self.product_qty, self.bom_id + ) + return result + + @api.onchange("product_qty") + def _onchange_product_qty_multiple(self): + if self.product_qty: + self.product_qty = MrpProduction._calculate_multiple_amount_per_bom( + self.product_qty, self.bom_id + ) diff --git a/mrp_bom_multiple_production_qty/static/description/icon.png b/mrp_bom_multiple_production_qty/static/description/icon.png new file mode 100755 index 000000000..3a50007fd Binary files /dev/null and b/mrp_bom_multiple_production_qty/static/description/icon.png differ diff --git a/mrp_bom_multiple_production_qty/views/mrp_bom.xml b/mrp_bom_multiple_production_qty/views/mrp_bom.xml new file mode 100644 index 000000000..72b734472 --- /dev/null +++ b/mrp_bom_multiple_production_qty/views/mrp_bom.xml @@ -0,0 +1,12 @@ + + + + mrp.bom + + + + + + + + diff --git a/mrp_bom_report/README.rst b/mrp_bom_report/README.rst new file mode 100644 index 000000000..287f276c1 --- /dev/null +++ b/mrp_bom_report/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============== +Mrp bom report +============== + +* In "Bill of Material" object new report "BoM Customized Report". + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_bom_report/__init__.py b/mrp_bom_report/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_bom_report/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_bom_report/__manifest__.py b/mrp_bom_report/__manifest__.py new file mode 100644 index 000000000..bb2f52cb5 --- /dev/null +++ b/mrp_bom_report/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + "name": "Mrp BoM Report", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "author": "Avanzosc", + "license": "AGPL-3", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "mrp", + ], + "data": [ + "data/paperformat.xml", + "report/external_layout.xml", + "report/mrp_bom_report.xml", + ], + "installable": True, +} diff --git a/mrp_bom_report/data/paperformat.xml b/mrp_bom_report/data/paperformat.xml new file mode 100644 index 000000000..533086cd6 --- /dev/null +++ b/mrp_bom_report/data/paperformat.xml @@ -0,0 +1,18 @@ + + + + paperformat.mrp.bom + + custom + 210 + 298 + Portrait + 10 + 20 + 5 + 5 + + 0 + 95 + + diff --git a/mrp_bom_report/i18n/es.po b/mrp_bom_report/i18n/es.po new file mode 100644 index 000000000..83e45214b --- /dev/null +++ b/mrp_bom_report/i18n/es.po @@ -0,0 +1,107 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-03 07:58+0000\n" +"PO-Revision-Date: 2024-06-03 07:58+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_report +#: model:ir.actions.report,print_report_name:mrp_bom_report.action_mrp_bom_customized_report +msgid "" +"(not object.product_id and 'BoM For Product - %s' % " +"(object.product_tmpl_id.name)) or 'BoM For Variant - %s' % " +"(object.product_id.name)" +msgstr "" +"(not object.product_id and 'LdM para producto - %s' % " +"(object.product_tmpl_id.name)) or 'LdM para variante - %s' % " +"(object.product_id.name)" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "" +"
\n" +" BoM Ref.: " +msgstr "" +"
\n" +" Ref. LdM: " + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "" +"
\n" +" Internal Ref.:" +msgstr "" +"
\n" +" Ref. Interna: " + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.report_mrp_bom_customized_document +msgid "" +"\n" +" /\n" +" " +msgstr "" +"\n" +" /\n" +" " + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "Date Printing:" +msgstr "Fecha impresión: " + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "BoM Name:" +msgstr "Nombre LdM:" + +#. module: mrp_bom_report +#: model:ir.model,name:mrp_bom_report.model_mrp_bom +msgid "Bill of Material" +msgstr "Lista de materiales" + +#. module: mrp_bom_report +#: model:ir.model,name:mrp_bom_report.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "Línea de Lista de Materiales" + +#. module: mrp_bom_report +#: model:ir.actions.report,name:mrp_bom_report.action_mrp_bom_customized_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "Cutomized BoM Report" +msgstr "Informe personalizado LdM" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.report_mrp_bom_customized_document +msgid "Fase" +msgstr "Fase" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "Logo" +msgstr "Logo" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "Page: / " +msgstr "Página: / " + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.report_mrp_bom_customized_document +msgid "Qty." +msgstr "Cant." + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.report_mrp_bom_customized_document +msgid "Reference/Description" +msgstr "Referencia/Descripción" diff --git a/mrp_bom_report/i18n/mrp_bom_report.pot b/mrp_bom_report/i18n/mrp_bom_report.pot new file mode 100644 index 000000000..8b652d0c3 --- /dev/null +++ b/mrp_bom_report/i18n/mrp_bom_report.pot @@ -0,0 +1,97 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-03 07:58+0000\n" +"PO-Revision-Date: 2024-06-03 07:58+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_report +#: model:ir.actions.report,print_report_name:mrp_bom_report.action_mrp_bom_customized_report +msgid "" +"(not object.product_id and 'BoM For Product - %s' % " +"(object.product_tmpl_id.name)) or 'BoM For Variant - %s' % " +"(object.product_id.name)" +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "" +"
\n" +" BoM Ref.:" +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "" +"
\n" +" Internal Ref.:" +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.report_mrp_bom_customized_document +msgid "" +"\n" +" /\n" +" " +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "Date Printing:" +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "BoM Name:" +msgstr "" + +#. module: mrp_bom_report +#: model:ir.model,name:mrp_bom_report.model_mrp_bom +msgid "Bill of Material" +msgstr "" + +#. module: mrp_bom_report +#: model:ir.model,name:mrp_bom_report.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "" + +#. module: mrp_bom_report +#: model:ir.actions.report,name:mrp_bom_report.action_mrp_bom_customized_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "Cutomized BoM Report" +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.report_mrp_bom_customized_document +msgid "Fase" +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "Logo" +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.external_layout_mrp_bom +msgid "Page: / " +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.report_mrp_bom_customized_document +msgid "Qty." +msgstr "" + +#. module: mrp_bom_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_report.report_mrp_bom_customized_document +msgid "Reference/Description" +msgstr "" diff --git a/mrp_bom_report/models/__init__.py b/mrp_bom_report/models/__init__.py new file mode 100644 index 000000000..6de1b8360 --- /dev/null +++ b/mrp_bom_report/models/__init__.py @@ -0,0 +1,2 @@ +from . import mrp_bom +from . import mrp_bom_line diff --git a/mrp_bom_report/models/mrp_bom.py b/mrp_bom_report/models/mrp_bom.py new file mode 100644 index 000000000..4390950ea --- /dev/null +++ b/mrp_bom_report/models/mrp_bom.py @@ -0,0 +1,29 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from datetime import datetime + +from odoo import models + + +class MrpBom(models.Model): + _inherit = "mrp.bom" + + def get_date_now(self): + return datetime.now().strftime("%d/%m/%Y") + + def _get_children(self, bom_line_ids, level=0): + result = [] + + def _get_rec(bom_line_ids, level): + for line in bom_line_ids: + res = line.get_datas_to_print_bom() + result.append(res) + if line.child_line_ids: + if level < 6: + level += 1 + _get_rec(line.child_line_ids, level) + if 6 > level > 0: + level -= 1 + return result + + return _get_rec(bom_line_ids, level) diff --git a/mrp_bom_report/models/mrp_bom_line.py b/mrp_bom_report/models/mrp_bom_line.py new file mode 100644 index 000000000..42d8507d2 --- /dev/null +++ b/mrp_bom_report/models/mrp_bom_line.py @@ -0,0 +1,15 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import models + + +class MrpBomLine(models.Model): + _inherit = "mrp.bom.line" + + def get_datas_to_print_bom(self): + res = {} + res["product_name"] = self.product_id.display_name + res["product_qty"] = self.product_qty + operation = self.operation_id.name if self.operation_id else "" + res["operation"] = operation + return res diff --git a/mrp_bom_report/report/external_layout.xml b/mrp_bom_report/report/external_layout.xml new file mode 100644 index 000000000..7244dbd52 --- /dev/null +++ b/mrp_bom_report/report/external_layout.xml @@ -0,0 +1,104 @@ + + + + + + diff --git a/mrp_bom_report/report/mrp_bom_report.xml b/mrp_bom_report/report/mrp_bom_report.xml new file mode 100644 index 000000000..f0415aadf --- /dev/null +++ b/mrp_bom_report/report/mrp_bom_report.xml @@ -0,0 +1,78 @@ + + + + + + + + Cutomized BoM Report + mrp.bom + qweb-pdf + mrp_bom_report.report_mrp_bom_customized + mrp_bom_report.report_mrp_bom_customized + (not object.product_id and 'BoM For Product - %s' % (object.product_tmpl_id.name)) or 'BoM For Variant - %s' % (object.product_id.name) + + report + + + diff --git a/mrp_bom_sale_price_subtotal/README.rst b/mrp_bom_sale_price_subtotal/README.rst new file mode 100644 index 000000000..543b6d305 --- /dev/null +++ b/mrp_bom_sale_price_subtotal/README.rst @@ -0,0 +1,57 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=========================== +MRP BOM Sale Price Subtotal +=========================== + +Overview +-------- + +Adds sale price and subtotal fields to Bill of Materials (BoM) in Odoo 16. + +Features +-------- + +- Adds a "Sale Price" field related to the product's sale price. +- Calculates and displays a "Subtotal" field as quantity multiplied by the sale price. +- Shows the total of all subtotals in the BoM. + +Installation +------------ + +1. Place the module folder `mrp_bom_sale_price_subtotal` in your Odoo addons directory. +2. Update the Odoo module list by going to Apps -> Update Apps List. +3. Find the module `mrp_bom_sale_price_subtotal` and click on `Install`. + +Usage +----- + +Once installed, the `mrp_bom_sale_price_subtotal` module will add the "Sale Price" and "Subtotal" fields to the Bill of Materials (BoM) form and tree views. It enhances visibility and calculation capabilities for managing BoMs in manufacturing processes. + +Technical Details +----------------- + +- The module extends the `mrp.bom` model to include new fields for sale price and subtotal. +- Views are modified using XML templates (`mrp_bom_views.xml`) to integrate the new fields seamlessly into the Odoo user interface. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Unai Beristain +* Ana Juaristi diff --git a/mrp_bom_sale_price_subtotal/__init__.py b/mrp_bom_sale_price_subtotal/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_bom_sale_price_subtotal/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_bom_sale_price_subtotal/__manifest__.py b/mrp_bom_sale_price_subtotal/__manifest__.py new file mode 100644 index 000000000..e6ec8a110 --- /dev/null +++ b/mrp_bom_sale_price_subtotal/__manifest__.py @@ -0,0 +1,14 @@ +{ + "name": "MRP BOM Sale Price Subtotal", + "version": "16.0.1.0.0", + "summary": "Adds sale price and subtotal fields to Bill of Materials (BoM) in Odoo 16.", + "license": "LGPL-3", + "category": "Manufacturing", + "author": "Avanzosc", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": ["mrp"], + "data": [ + "views/mrp_bom_views.xml", + ], + "installable": True, +} diff --git a/mrp_bom_sale_price_subtotal/i18n/es.po b/mrp_bom_sale_price_subtotal/i18n/es.po new file mode 100644 index 000000000..b08a0815f --- /dev/null +++ b/mrp_bom_sale_price_subtotal/i18n/es.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_sale_price_subtotal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-10 07:54+0000\n" +"PO-Revision-Date: 2024-07-10 07:54+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_sale_price_subtotal +#: model:ir.model,name:mrp_bom_sale_price_subtotal.model_mrp_bom +msgid "Bill of Material" +msgstr "Lista de materiales" + +#. module: mrp_bom_sale_price_subtotal +#: model:ir.model,name:mrp_bom_sale_price_subtotal.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "Línea de Lista de Materiales" + +#. module: mrp_bom_sale_price_subtotal +#: model:ir.model.fields,field_description:mrp_bom_sale_price_subtotal.field_mrp_bom__subtotal +#: model:ir.model.fields,field_description:mrp_bom_sale_price_subtotal.field_mrp_bom_line__sale_price_subtotal +msgid "Subtotal" +msgstr "Subtotal" diff --git a/mrp_bom_sale_price_subtotal/i18n/mrp_bom_sale_price_subtotal.pot b/mrp_bom_sale_price_subtotal/i18n/mrp_bom_sale_price_subtotal.pot new file mode 100644 index 000000000..a3a9ef00d --- /dev/null +++ b/mrp_bom_sale_price_subtotal/i18n/mrp_bom_sale_price_subtotal.pot @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_sale_price_subtotal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-10 07:54+0000\n" +"PO-Revision-Date: 2024-07-10 07:54+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_sale_price_subtotal +#: model:ir.model,name:mrp_bom_sale_price_subtotal.model_mrp_bom +msgid "Bill of Material" +msgstr "" + +#. module: mrp_bom_sale_price_subtotal +#: model:ir.model,name:mrp_bom_sale_price_subtotal.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "" + +#. module: mrp_bom_sale_price_subtotal +#: model:ir.model.fields,field_description:mrp_bom_sale_price_subtotal.field_mrp_bom__subtotal +#: model:ir.model.fields,field_description:mrp_bom_sale_price_subtotal.field_mrp_bom_line__sale_price_subtotal +msgid "Subtotal" +msgstr "" diff --git a/mrp_bom_sale_price_subtotal/models/__init__.py b/mrp_bom_sale_price_subtotal/models/__init__.py new file mode 100644 index 000000000..6de1b8360 --- /dev/null +++ b/mrp_bom_sale_price_subtotal/models/__init__.py @@ -0,0 +1,2 @@ +from . import mrp_bom +from . import mrp_bom_line diff --git a/mrp_bom_sale_price_subtotal/models/mrp_bom.py b/mrp_bom_sale_price_subtotal/models/mrp_bom.py new file mode 100644 index 000000000..e69f47093 --- /dev/null +++ b/mrp_bom_sale_price_subtotal/models/mrp_bom.py @@ -0,0 +1,23 @@ +from odoo import api, fields, models + + +class MrpBom(models.Model): + _inherit = "mrp.bom" + + subtotal = fields.Float( + compute="_compute_subtotal", + store=True, + ) + + @api.depends( + "bom_line_ids", + "bom_line_ids.product_qty", + "bom_line_ids.sale_price_subtotal", + ) + def _compute_subtotal(self): + for bom in self: + subtotal = sum( + line.product_qty * line.product_id.lst_price + for line in bom.bom_line_ids + ) + bom.subtotal = subtotal diff --git a/mrp_bom_sale_price_subtotal/models/mrp_bom_line.py b/mrp_bom_sale_price_subtotal/models/mrp_bom_line.py new file mode 100644 index 000000000..1ce3b5712 --- /dev/null +++ b/mrp_bom_sale_price_subtotal/models/mrp_bom_line.py @@ -0,0 +1,19 @@ +from odoo import api, fields, models + + +class MrpBomLine(models.Model): + _inherit = "mrp.bom.line" + + sale_price_subtotal = fields.Float( + "Subtotal", + compute="_compute_sale_price_subtotal", + store=True, + ) + + @api.depends("product_id.lst_price", "product_qty") + def _compute_sale_price_subtotal(self): + for line in self: + if line.product_id and line.product_qty: + line.sale_price_subtotal = line.product_id.lst_price * line.product_qty + else: + line.sale_price_subtotal = 0.0 diff --git a/mrp_bom_sale_price_subtotal/views/mrp_bom_views.xml b/mrp_bom_sale_price_subtotal/views/mrp_bom_views.xml new file mode 100644 index 000000000..62d2b5946 --- /dev/null +++ b/mrp_bom_sale_price_subtotal/views/mrp_bom_views.xml @@ -0,0 +1,30 @@ + + + mrp.bom.form.inherit + mrp.bom + + + + + + +
+ +
+
+
+
+ + + mrp.bom.tree.inherit + mrp.bom + + + + + + + +
diff --git a/mrp_bom_version_component_change/README.rst b/mrp_bom_version_component_change/README.rst new file mode 100644 index 000000000..888d9c564 --- /dev/null +++ b/mrp_bom_version_component_change/README.rst @@ -0,0 +1,30 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================== +Mrp bom component change +======================== + +* In Manufacturing/Products new menu "Mass component change in BoMs" for + allows to change massively one component by another on a list of BoMs. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_bom_version_component_change/__init__.py b/mrp_bom_version_component_change/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_bom_version_component_change/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_bom_version_component_change/__manifest__.py b/mrp_bom_version_component_change/__manifest__.py new file mode 100644 index 000000000..b2e448d5a --- /dev/null +++ b/mrp_bom_version_component_change/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# Copyright 2014 Daniel Campos - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "MRP BoM component massive change", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "author": "OdooMRP team, " "AvanzOSC, " "Serv. Tecnol. Avanzados - Pedro M. Baeza", + "license": "AGPL-3", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "mrp", + ], + "data": ["views/mrp_bom_change_view.xml", "security/ir.model.access.csv"], + "installable": True, +} diff --git a/mrp_bom_version_component_change/i18n/es.po b/mrp_bom_version_component_change/i18n/es.po new file mode 100644 index 000000000..e2851dd4e --- /dev/null +++ b/mrp_bom_version_component_change/i18n/es.po @@ -0,0 +1,124 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_component_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-06 06:33+0000\n" +"PO-Revision-Date: 2024-06-06 06:33+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_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "Bill of Material" +msgstr "Lista de Materiales" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__bom_ids +#: model_terms:ir.ui.view,arch_db:mrp_bom_component_change.mrp_bom_change_form_view +msgid "BoMs" +msgstr "LdMs" + +#. module: mrp_bom_component_change +#: model_terms:ir.ui.view,arch_db:mrp_bom_component_change.mrp_bom_change_form_view +msgid "Change Component" +msgstr "Cambiar componente" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__date +msgid "Change Date" +msgstr "Fecha del cambio" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__user +msgid "Changed By" +msgstr "Cambiado por" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__id +msgid "ID" +msgstr "ID" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change____last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: mrp_bom_component_change +#: model:ir.actions.act_window,name:mrp_bom_component_change.action_bom_change_view +#: model:ir.ui.menu,name:mrp_bom_component_change.mrp_bom_change_menu +msgid "Mass component change in BoMs" +msgstr "Cambio masivo componente en LdMs" + +#. module: mrp_bom_component_change +#: model:ir.model,name:mrp_bom_component_change.model_mrp_bom_change +msgid "Mrp BoM Component Change" +msgstr "Mrp Cambio componente LdM" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__name +msgid "Name" +msgstr "Nombre" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__new_component_id +msgid "New Component" +msgstr "Nuevo componente" + +#. module: mrp_bom_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "Not Components selected!" +msgstr "¡No componentes seleccionados!" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__old_component_id +msgid "Old Component" +msgstr "Componente viejo" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__reason +msgid "Reason" +msgstr "Razón" + +#. module: mrp_bom_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "There isn't any BoM for selected component" +msgstr "No hay ninguna LdM para el componente seleccionado" diff --git a/mrp_bom_version_component_change/i18n/mrp_bom_component_change.pot b/mrp_bom_version_component_change/i18n/mrp_bom_component_change.pot new file mode 100644 index 000000000..ed3749e98 --- /dev/null +++ b/mrp_bom_version_component_change/i18n/mrp_bom_component_change.pot @@ -0,0 +1,124 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_component_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-06 06:33+0000\n" +"PO-Revision-Date: 2024-06-06 06:33+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_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "Bill of Material" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__bom_ids +#: model_terms:ir.ui.view,arch_db:mrp_bom_component_change.mrp_bom_change_form_view +msgid "BoMs" +msgstr "" + +#. module: mrp_bom_component_change +#: model_terms:ir.ui.view,arch_db:mrp_bom_component_change.mrp_bom_change_form_view +msgid "Change Component" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__date +msgid "Change Date" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__user +msgid "Changed By" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__create_uid +msgid "Created by" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__create_date +msgid "Created on" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__id +msgid "ID" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__write_date +msgid "Last Updated on" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.actions.act_window,name:mrp_bom_component_change.action_bom_change_view +#: model:ir.ui.menu,name:mrp_bom_component_change.mrp_bom_change_menu +msgid "Mass component change in BoMs" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model,name:mrp_bom_component_change.model_mrp_bom_change +msgid "Mrp BoM Component Change" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__name +msgid "Name" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__new_component_id +msgid "New Component" +msgstr "" + +#. module: mrp_bom_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "Not Components selected!" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__old_component_id +msgid "Old Component" +msgstr "" + +#. module: mrp_bom_component_change +#: model:ir.model.fields,field_description:mrp_bom_component_change.field_mrp_bom_change__reason +msgid "Reason" +msgstr "" + +#. module: mrp_bom_component_change +#. odoo-python +#: code:addons/mrp_bom_component_change/models/mrp_bom_change.py:0 +#, python-format +msgid "There isn't any BoM for selected component" +msgstr "" diff --git a/mrp_bom_version_component_change/models/__init__.py b/mrp_bom_version_component_change/models/__init__.py new file mode 100644 index 000000000..ae2257795 --- /dev/null +++ b/mrp_bom_version_component_change/models/__init__.py @@ -0,0 +1 @@ +from . import mrp_bom_change diff --git a/mrp_bom_version_component_change/models/mrp_bom_change.py b/mrp_bom_version_component_change/models/mrp_bom_change.py new file mode 100644 index 000000000..369a9ba71 --- /dev/null +++ b/mrp_bom_version_component_change/models/mrp_bom_change.py @@ -0,0 +1,74 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class MrpBomChange(models.Model): + _name = "mrp.bom.change" + _description = "Mrp BoM Component Change" + + @api.depends("old_component_id") + def _compute_bom_ids(self): + bom_obj = self.env["mrp.bom"] + for change in self: + boms = bom_obj + change.bom_ids = [(6, 0, [])] + if change.old_component_id: + for bom in bom_obj.search([]): + bom_lines = bom.bom_line_ids.filtered( + lambda x: x.product_id.id == self.old_component_id.id + ) + if bom_lines and bom not in boms: + boms += bom + change.bom_ids = [(6, 0, boms.ids)] + + name = fields.Char(required=True, copy=False) + new_component_id = fields.Many2one( + string="New Component", comodel_name="product.product", required=True + ) + old_component_id = fields.Many2one( + string="Old Component", comodel_name="product.product", required=True + ) + bom_ids = fields.Many2many( + string="BoMs", + comodel_name="mrp.bom", + relation="rel_mrp_bom_change", + column1="bom_change_id", + column2="bom_id", + copy=False, + store=True, + readonly=True, + compute="_compute_bom_ids", + ) + date = fields.Date(string="Change Date", readonly=True) + user = fields.Many2one(string="Changed By", comodel_name="res.users", readonly=True) + reason = fields.Char() + + def do_component_change(self): + self.ensure_one() + if not self.old_component_id or not self.new_component_id: + raise ValidationError(_("Not Components selected!")) + if not self.bom_ids: + raise ValidationError(_("There isn't any BoM for selected component")) + for bom in self.bom_ids: + bom_lines = bom.bom_line_ids.filtered( + lambda x: x.product_id.id == self.old_component_id.id + ) + values, bom_lines = self._get_new_component(bom_lines) + # add product_tmpl_id in case of mrp_product_variants are installed + if hasattr(bom_lines, "product_tmpl_id"): + values["product_tmpl_id"] = self.new_component_id.product_tmpl_id.id + bom_lines.write(values) + self.write({"date": fields.Date.context_today(self), "user": self.env.user.id}) + return { + "name": _("Bill of Material"), + "view_mode": "tree,form", + "res_model": "mrp.bom", + "type": "ir.actions.act_window", + "domain": [("id", "in", self.bom_ids.mapped("id"))], + } + + def _get_new_component(self, bom_lines): + values = {"product_id": self.new_component_id.id} + return values, bom_lines diff --git a/mrp_bom_version_component_change/security/ir.model.access.csv b/mrp_bom_version_component_change/security/ir.model.access.csv new file mode 100644 index 000000000..e745bdccc --- /dev/null +++ b/mrp_bom_version_component_change/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_mrp_bom_change,mrp.bom.change,model_mrp_bom_change,mrp.group_mrp_user,1,0,0,0 +access_mrp_bom_change_manager,mrp.bom.change.manager,model_mrp_bom_change,mrp.group_mrp_manager,1,1,1,1 diff --git a/mrp_bom_version_component_change/tests/__init__.py b/mrp_bom_version_component_change/tests/__init__.py new file mode 100644 index 000000000..b0421958c --- /dev/null +++ b/mrp_bom_version_component_change/tests/__init__.py @@ -0,0 +1 @@ +from . import test_mrp_bom_component_change diff --git a/mrp_bom_version_component_change/tests/test_mrp_bom_component_change.py b/mrp_bom_version_component_change/tests/test_mrp_bom_component_change.py new file mode 100644 index 000000000..23201d689 --- /dev/null +++ b/mrp_bom_version_component_change/tests/test_mrp_bom_component_change.py @@ -0,0 +1,38 @@ +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +############################################################################## +import odoo.tests.common as common + + +class TestMrpBomComponentChange(common.TransactionCase): + + def setUp(self): + super().setUp() + self.mrp_bom_model = self.env["mrp.bom"] + self.mrp_bom_change_model = self.env["mrp.bom.change"] + vals = { + "product_tmpl_id": self.env.ref( + "product.product_product_11_product_template" + ).id, + "bom_line_ids": [ + (0, 0, {"product_id": self.env.ref("product.product_product_5").id}), + (0, 0, {"product_id": self.env.ref("product.product_product_6").id}), + ], + } + self.mrp_bom = self.mrp_bom_model.create(vals) + + def test_mrp_bom_change_without_new_version(self): + mrp_bom_change = self.mrp_bom_change_model.create( + { + "name": "PROBE-1", + "old_component_id": self.env.ref("product.product_product_5").id, + "new_component_id": self.env.ref("product.product_product_9").id, + } + ) + mrp_bom_change.do_component_change() + for bom in mrp_bom_change.bom_ids: + for line in bom.bom_line_ids: + self.assertNotEqual( + self.env.ref("product.product_product_5").id, + line.product_id.id, + "Incorrect found old component in MRP BoM", + ) diff --git a/mrp_bom_version_component_change/views/mrp_bom_change_view.xml b/mrp_bom_version_component_change/views/mrp_bom_change_view.xml new file mode 100644 index 000000000..4b56e2b0d --- /dev/null +++ b/mrp_bom_version_component_change/views/mrp_bom_change_view.xml @@ -0,0 +1,72 @@ + + + + mrp.bom.change.tree.view + mrp.bom.change + + + + + + + + + + + + + + mrp.bom.change.form.view + mrp.bom.change + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + Mass component change in BoMs + ir.actions.act_window + mrp.bom.change + tree,form + + + +
diff --git a/mrp_bom_version_note/README.rst b/mrp_bom_version_note/README.rst new file mode 100644 index 000000000..1c8406fdf --- /dev/null +++ b/mrp_bom_version_note/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +==================== +Mrp bom version note +==================== + +* "Notes" in BoM. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_bom_version_note/__init__.py b/mrp_bom_version_note/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mrp_bom_version_note/__manifest__.py b/mrp_bom_version_note/__manifest__.py new file mode 100644 index 000000000..193232171 --- /dev/null +++ b/mrp_bom_version_note/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Bom Version Note", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC,", + "license": "AGPL-3", + "summary": "BoM notes", + "depends": [ + "mrp_bom_version", + "mrp_bom_note", + ], + "data": ["views/mrp_bom_views.xml"], + "installable": True, + "auto_install": True, +} diff --git a/mrp_bom_version_note/i18n/ca_ES.po b/mrp_bom_version_note/i18n/ca_ES.po new file mode 100644 index 000000000..1406912af --- /dev/null +++ b/mrp_bom_version_note/i18n/ca_ES.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-24 06:02+0000\n" +"PO-Revision-Date: 2024-07-24 06:02+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" diff --git a/mrp_bom_version_note/i18n/en_GB.po b/mrp_bom_version_note/i18n/en_GB.po new file mode 100644 index 000000000..1406912af --- /dev/null +++ b/mrp_bom_version_note/i18n/en_GB.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-24 06:02+0000\n" +"PO-Revision-Date: 2024-07-24 06:02+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" diff --git a/mrp_bom_version_note/i18n/es.po b/mrp_bom_version_note/i18n/es.po new file mode 100644 index 000000000..1406912af --- /dev/null +++ b/mrp_bom_version_note/i18n/es.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-24 06:02+0000\n" +"PO-Revision-Date: 2024-07-24 06:02+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" diff --git a/mrp_bom_version_note/i18n/fr.po b/mrp_bom_version_note/i18n/fr.po new file mode 100644 index 000000000..1406912af --- /dev/null +++ b/mrp_bom_version_note/i18n/fr.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-24 06:02+0000\n" +"PO-Revision-Date: 2024-07-24 06:02+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" diff --git a/mrp_bom_version_note/i18n/mrp_bom_version_note.pot b/mrp_bom_version_note/i18n/mrp_bom_version_note.pot new file mode 100644 index 000000000..041331ad0 --- /dev/null +++ b/mrp_bom_version_note/i18n/mrp_bom_version_note.pot @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-24 06:01+0000\n" +"PO-Revision-Date: 2024-07-24 06:01+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" diff --git a/mrp_bom_version_note/views/mrp_bom_views.xml b/mrp_bom_version_note/views/mrp_bom_views.xml new file mode 100644 index 000000000..c6d470076 --- /dev/null +++ b/mrp_bom_version_note/views/mrp_bom_views.xml @@ -0,0 +1,14 @@ + + + + mrp.bom + + + + {'readonly': [('state', '!=', 'draft')]} + + + + diff --git a/mrp_bom_version_report/README.rst b/mrp_bom_version_report/README.rst new file mode 100644 index 000000000..4db15ac6c --- /dev/null +++ b/mrp_bom_version_report/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +====================== +Mrp bom version report +====================== + +* Print version in "BoM Customized Report" report. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_bom_version_report/__init__.py b/mrp_bom_version_report/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mrp_bom_version_report/__manifest__.py b/mrp_bom_version_report/__manifest__.py new file mode 100644 index 000000000..421e6ee09 --- /dev/null +++ b/mrp_bom_version_report/__manifest__.py @@ -0,0 +1,23 @@ +# (c) 2015 Alfredo de la Fuente - AvanzOSC +# (c) 2015 Oihane Crucelaegui - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + "name": "MRP - BoM Version Report", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC", + "license": "AGPL-3", + "summary": "BoM versioning", + "contributors": [ + "Ana Juaristi ", + "Alfredo de la Fuente ", + ], + "depends": ["mrp_bom_report", "mrp_bom_version"], + "data": [ + "report/mrp_bom_report.xml", + ], + "installable": True, + "auto_install": True, +} diff --git a/mrp_bom_version_report/i18n/ca_ES.po b/mrp_bom_version_report/i18n/ca_ES.po new file mode 100644 index 000000000..85e5ac0b9 --- /dev/null +++ b/mrp_bom_version_report/i18n/ca_ES.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_version_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-18 07:02+0000\n" +"PO-Revision-Date: 2024-07-18 07:02+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_version_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_version_report.external_layout_mrp_bom +msgid "Version:" +msgstr "" diff --git a/mrp_bom_version_report/i18n/en_GB.po b/mrp_bom_version_report/i18n/en_GB.po new file mode 100644 index 000000000..451a4de90 --- /dev/null +++ b/mrp_bom_version_report/i18n/en_GB.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_version_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-18 07:03+0000\n" +"PO-Revision-Date: 2024-07-18 07:03+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_version_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_version_report.external_layout_mrp_bom +msgid "Version:" +msgstr "" diff --git a/mrp_bom_version_report/i18n/es.po b/mrp_bom_version_report/i18n/es.po new file mode 100644 index 000000000..590dc00aa --- /dev/null +++ b/mrp_bom_version_report/i18n/es.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_version_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-18 07:04+0000\n" +"PO-Revision-Date: 2024-07-18 07:04+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_version_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_version_report.external_layout_mrp_bom +msgid "Version:" +msgstr "Versión:" diff --git a/mrp_bom_version_report/i18n/fr.po b/mrp_bom_version_report/i18n/fr.po new file mode 100644 index 000000000..451a4de90 --- /dev/null +++ b/mrp_bom_version_report/i18n/fr.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_version_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-18 07:03+0000\n" +"PO-Revision-Date: 2024-07-18 07:03+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_version_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_version_report.external_layout_mrp_bom +msgid "Version:" +msgstr "" diff --git a/mrp_bom_version_report/i18n/mrp_bom_version_report.pot b/mrp_bom_version_report/i18n/mrp_bom_version_report.pot new file mode 100644 index 000000000..ee8878c31 --- /dev/null +++ b/mrp_bom_version_report/i18n/mrp_bom_version_report.pot @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_bom_version_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-18 06:58+0000\n" +"PO-Revision-Date: 2024-07-18 06:58+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_version_report +#: model_terms:ir.ui.view,arch_db:mrp_bom_version_report.external_layout_mrp_bom +msgid "Version:" +msgstr "" diff --git a/mrp_bom_version_report/report/mrp_bom_report.xml b/mrp_bom_version_report/report/mrp_bom_report.xml new file mode 100644 index 000000000..60bf17c12 --- /dev/null +++ b/mrp_bom_version_report/report/mrp_bom_report.xml @@ -0,0 +1,15 @@ + + + + diff --git a/mrp_component_show_info/README.rst b/mrp_component_show_info/README.rst new file mode 100644 index 000000000..f6c8f92e7 --- /dev/null +++ b/mrp_component_show_info/README.rst @@ -0,0 +1,31 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================= +MRP Component Show Info +======================= + +* Lot List and quantities in Production Components list. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Iris Castro Ramírez +* Ignacio Ales López +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_component_show_info/__init__.py b/mrp_component_show_info/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_component_show_info/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_component_show_info/__manifest__.py b/mrp_component_show_info/__manifest__.py new file mode 100644 index 000000000..b946ba854 --- /dev/null +++ b/mrp_component_show_info/__manifest__.py @@ -0,0 +1,18 @@ +# (c) Ana Iris Castro Ramírez - Guadaltech +# (c) Ignacio Ales López - Guadaltech +# (c) 2024 Alfredo de la Fuente - Avanzosc +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "MRP Component Show Info", + "version": "16.0.1.0.0", + "category": "Manufacturing", + "author": "Guadaltech Soluciones Tecnológicas S.L., AvanzOSC", + "website": "https://github.com/avanzosc/mrp-addons", + "license": "LGPL-3", + "depends": ["mrp"], + "data": [ + "views/mrp_view.xml", + ], + "installable": True, + "active": False, +} diff --git a/mrp_component_show_info/i18n/en_US.po b/mrp_component_show_info/i18n/en_US.po new file mode 100644 index 000000000..0531ff40a --- /dev/null +++ b/mrp_component_show_info/i18n/en_US.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_component_show_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-05 04:59+0000\n" +"PO-Revision-Date: 2024-07-05 04:59+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_component_show_info +#: model:ir.model.fields,field_description:mrp_component_show_info.field_stock_move__production_lot_info +msgid "Production Lot Info" +msgstr "" + +#. module: mrp_component_show_info +#: model:ir.model,name:mrp_component_show_info.model_stock_move +msgid "Stock Move" +msgstr "" diff --git a/mrp_component_show_info/i18n/es.po b/mrp_component_show_info/i18n/es.po new file mode 100644 index 000000000..acd58dbd9 --- /dev/null +++ b/mrp_component_show_info/i18n/es.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_component_show_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-05 05:00+0000\n" +"PO-Revision-Date: 2024-07-05 05:00+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_component_show_info +#: model:ir.model.fields,field_description:mrp_component_show_info.field_stock_move__production_lot_info +msgid "Production Lot Info" +msgstr "Inf. Lote producción" + +#. module: mrp_component_show_info +#: model:ir.model,name:mrp_component_show_info.model_stock_move +msgid "Stock Move" +msgstr "Movimiento de existencias" diff --git a/mrp_component_show_info/i18n/mrp_component_show_info.pot b/mrp_component_show_info/i18n/mrp_component_show_info.pot new file mode 100644 index 000000000..0531ff40a --- /dev/null +++ b/mrp_component_show_info/i18n/mrp_component_show_info.pot @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_component_show_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-05 04:59+0000\n" +"PO-Revision-Date: 2024-07-05 04:59+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_component_show_info +#: model:ir.model.fields,field_description:mrp_component_show_info.field_stock_move__production_lot_info +msgid "Production Lot Info" +msgstr "" + +#. module: mrp_component_show_info +#: model:ir.model,name:mrp_component_show_info.model_stock_move +msgid "Stock Move" +msgstr "" diff --git a/mrp_component_show_info/models/__init__.py b/mrp_component_show_info/models/__init__.py new file mode 100644 index 000000000..6bda2d242 --- /dev/null +++ b/mrp_component_show_info/models/__init__.py @@ -0,0 +1 @@ +from . import stock_move diff --git a/mrp_component_show_info/models/stock_move.py b/mrp_component_show_info/models/stock_move.py new file mode 100644 index 000000000..94997e117 --- /dev/null +++ b/mrp_component_show_info/models/stock_move.py @@ -0,0 +1,28 @@ +# (c) Ana Iris Castro Ramírez - Guadaltech +# (c) Ignacio Ales López - Guadaltech +# (c) 2024 Alfredo de la Fuente - Avanzosc +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import api, fields, models + + +class StockMove(models.Model): + _inherit = "stock.move" + + production_lot_info = fields.Text(compute="_compute_production_lot_info") + + @api.depends( + "move_line_ids", + "move_line_ids.lot_id", + "move_line_ids.lot_id.name", + "move_line_ids.qty_done", + ) + def _compute_production_lot_info(self): + for move in self: + move.production_lot_info = "" + if move.raw_material_production_id and move.product_id.tracking != "none": + production_info = [] + for move_line in move.move_line_ids: + name = move_line.lot_id.name or "N/A" + qty = move_line.reserved_uom_qty or move_line.qty_done + production_info.append(f"{name} ({qty})") + move.production_lot_info = ", ".join(production_info) diff --git a/mrp_component_show_info/static/description/icon.png b/mrp_component_show_info/static/description/icon.png new file mode 100755 index 000000000..3a50007fd Binary files /dev/null and b/mrp_component_show_info/static/description/icon.png differ diff --git a/mrp_component_show_info/views/mrp_view.xml b/mrp_component_show_info/views/mrp_view.xml new file mode 100644 index 000000000..54f4a8ed4 --- /dev/null +++ b/mrp_component_show_info/views/mrp_view.xml @@ -0,0 +1,16 @@ + + + + mrp.production.lot_info.form + mrp.production + + + + + + + + diff --git a/mrp_machine_relation/views/mrp_workcenter_view.xml b/mrp_machine_relation/views/mrp_workcenter_view.xml index 3be3f2cef..90808e3e0 100644 --- a/mrp_machine_relation/views/mrp_workcenter_view.xml +++ b/mrp_machine_relation/views/mrp_workcenter_view.xml @@ -1,34 +1,32 @@ - - - mrp.workcenter - - - - - + + mrp.workcenter + + + + - + + - - mrp.workcenter - - - - - + + mrp.workcenter + + + + - + + - - mrp.workcenter - - - - - + + mrp.workcenter + + + + - - + + diff --git a/mrp_production_cost/README.rst b/mrp_production_cost/README.rst new file mode 100644 index 000000000..b9176a2fd --- /dev/null +++ b/mrp_production_cost/README.rst @@ -0,0 +1,30 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=================== +MRP Production Cost +=================== + +This module makes an estimation of the cost of a Manufacturing Order. + +The user can visualise the cost data in the component lines, in the work orders and in the list of production orders. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Patxi Lersundi +* Ana Juaristi diff --git a/mrp_production_cost/__init__.py b/mrp_production_cost/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_cost/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_cost/__manifest__.py b/mrp_production_cost/__manifest__.py new file mode 100644 index 000000000..c2b114a87 --- /dev/null +++ b/mrp_production_cost/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2022 Patxi lersundi +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "MRP Production Cost", + "author": "AvanzOSC", + "website": "https://github.com/avanzosc/mrp-addons", + "category": "Manufacturing/Manufacturing", + "license": "AGPL-3", + "version": "16.0.1.0.0", + "depends": [ + "product", + "mrp", + "stock", + ], + "data": [ + "views/mrp_production_views.xml", + "views/mrp_stockmove_views.xml", + "views/mrp_workorder_views.xml", + ], + "installable": True, +} diff --git a/mrp_production_cost/i18n/es.po b/mrp_production_cost/i18n/es.po new file mode 100644 index 000000000..fb6c905ff --- /dev/null +++ b/mrp_production_cost/i18n/es.po @@ -0,0 +1,93 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_cost +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-16 08:40+0000\n" +"PO-Revision-Date: 2024-07-16 08:40+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_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_workorder__workorder_cost_estimated +#: model:ir.model.fields,field_description:mrp_production_cost.field_stock_move__material_cost_to_consume +msgid "Estimated Cost" +msgstr "Coste estimado" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_manufacturing_estimated +msgid "Estimated Manufacturing Cost" +msgstr "Coste de fabricación estimado" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_material_to_consume +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +msgid "Estimated Material Cost" +msgstr "Coste de material estimado" + +#. module: mrp_production_cost +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_workorder_tree_editable_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.view_move_tree +msgid "Estimated Total Cost" +msgstr "Coste total estimado" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_workorder_estimated +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +msgid "Estimated Work Cost" +msgstr "Coste de trabajo estimado" + +#. module: mrp_production_cost +#: model:ir.model,name:mrp_production_cost.model_mrp_production +msgid "Production Order" +msgstr "Orden de producción" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_workorder__workorder_cost_real +#: model:ir.model.fields,field_description:mrp_production_cost.field_stock_move__material_cost_consumed +msgid "Real Cost" +msgstr "Coste real" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_manufacturing_real +msgid "Real Manufacturing Cost" +msgstr "Coste de fabricación real" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_material_consumed +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +msgid "Real Material Cost" +msgstr "Coste de material real" + +#. module: mrp_production_cost +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_workorder_tree_editable_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.view_move_tree +msgid "Real Total Cost" +msgstr "Coste real total" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_workorder_real +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +msgid "Real Work Cost" +msgstr "Coste de trabajo real" + +#. module: mrp_production_cost +#: model:ir.model,name:mrp_production_cost.model_stock_move +msgid "Stock Move" +msgstr "Movimiento de existencias" + +#. module: mrp_production_cost +#: model:ir.model,name:mrp_production_cost.model_mrp_workorder +msgid "Work Order" +msgstr "Orden de trabajo" diff --git a/mrp_production_cost/i18n/mrp_production_cost.pot b/mrp_production_cost/i18n/mrp_production_cost.pot new file mode 100644 index 000000000..e81077937 --- /dev/null +++ b/mrp_production_cost/i18n/mrp_production_cost.pot @@ -0,0 +1,93 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_cost +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-16 08:40+0000\n" +"PO-Revision-Date: 2024-07-16 08:40+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_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_workorder__workorder_cost_estimated +#: model:ir.model.fields,field_description:mrp_production_cost.field_stock_move__material_cost_to_consume +msgid "Estimated Cost" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_manufacturing_estimated +msgid "Estimated Manufacturing Cost" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_material_to_consume +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +msgid "Estimated Material Cost" +msgstr "" + +#. module: mrp_production_cost +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_workorder_tree_editable_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.view_move_tree +msgid "Estimated Total Cost" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_workorder_estimated +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +msgid "Estimated Work Cost" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model,name:mrp_production_cost.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_workorder__workorder_cost_real +#: model:ir.model.fields,field_description:mrp_production_cost.field_stock_move__material_cost_consumed +msgid "Real Cost" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_manufacturing_real +msgid "Real Manufacturing Cost" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_material_consumed +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +msgid "Real Material Cost" +msgstr "" + +#. module: mrp_production_cost +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_workorder_tree_editable_view +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.view_move_tree +msgid "Real Total Cost" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model.fields,field_description:mrp_production_cost.field_mrp_production__cost_workorder_real +#: model_terms:ir.ui.view,arch_db:mrp_production_cost.mrp_production_tree_view +msgid "Real Work Cost" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model,name:mrp_production_cost.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: mrp_production_cost +#: model:ir.model,name:mrp_production_cost.model_mrp_workorder +msgid "Work Order" +msgstr "" diff --git a/mrp_production_cost/models/__init__.py b/mrp_production_cost/models/__init__.py new file mode 100644 index 000000000..cc4d27c9c --- /dev/null +++ b/mrp_production_cost/models/__init__.py @@ -0,0 +1,3 @@ +from . import mrp_production +from . import stock_move +from . import mrp_workorder diff --git a/mrp_production_cost/models/mrp_production.py b/mrp_production_cost/models/mrp_production.py new file mode 100644 index 000000000..cf316c86e --- /dev/null +++ b/mrp_production_cost/models/mrp_production.py @@ -0,0 +1,90 @@ +# Copyright 2022 Patxi Lersundi +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import api, fields, models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + # Material costs + cost_material_to_consume = fields.Float( + string="Estimated Material Cost", + copy=False, + store=True, + compute="_compute_cost_material_to_consume", + ) + cost_material_consumed = fields.Float( + string="Real Material Cost", + copy=False, + store=True, + compute="_compute_cost_material_consumed", + ) + # Workorder costs + cost_workorder_estimated = fields.Float( + string="Estimated Work Cost", + copy=False, + store=True, + compute="_compute_cost_workorder_estimated", + ) + cost_workorder_real = fields.Float( + string="Real Work Cost", + copy=False, + store=True, + compute="_compute_cost_workorder_real", + ) + # Manufacturing costs + cost_manufacturing_estimated = fields.Float( + string="Estimated Manufacturing Cost", + copy=False, + store=True, + compute="_compute_cost_manufacturing_estimated", + ) + cost_manufacturing_real = fields.Float( + string="Real Manufacturing Cost", + copy=False, + store=True, + compute="_compute_cost_manufacturing_real", + ) + + @api.depends("move_raw_ids.material_cost_to_consume") + def _compute_cost_material_to_consume(self): + for production in self: + production.cost_material_to_consume = sum( + production.mapped("move_raw_ids.material_cost_to_consume") + ) + + @api.depends("move_raw_ids.material_cost_consumed") + def _compute_cost_material_consumed(self): + for production in self: + production.cost_material_consumed = sum( + production.mapped("move_raw_ids.material_cost_consumed") + ) + + @api.depends("workorder_ids.workorder_cost_estimated") + def _compute_cost_workorder_estimated(self): + for production in self: + production.cost_workorder_estimated = sum( + production.mapped("workorder_ids.workorder_cost_estimated") + ) + + @api.depends("workorder_ids.workorder_cost_real") + def _compute_cost_workorder_real(self): + for production in self: + production.cost_workorder_real = sum( + production.mapped("workorder_ids.workorder_cost_real") + ) + + @api.depends("cost_material_to_consume", "cost_workorder_estimated") + def _compute_cost_manufacturing_estimated(self): + for production in self: + production.cost_manufacturing_estimated = ( + production.cost_material_to_consume + + production.cost_workorder_estimated + ) + + @api.depends("cost_material_consumed", "cost_workorder_real") + def _compute_cost_manufacturing_real(self): + for production in self: + production.cost_manufacturing_real = ( + production.cost_material_consumed + production.cost_workorder_real + ) diff --git a/mrp_production_cost/models/mrp_workorder.py b/mrp_production_cost/models/mrp_workorder.py new file mode 100644 index 000000000..aebd1aa23 --- /dev/null +++ b/mrp_production_cost/models/mrp_workorder.py @@ -0,0 +1,30 @@ +# Copyright 2022 Patxi Lersundi +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import api, fields, models + + +class MrpWorkorder(models.Model): + _inherit = "mrp.workorder" + + workorder_cost_estimated = fields.Float( + string="Estimated Cost", + copy=False, + store=True, + compute="_compute_workorder_cost_estimated", + ) + workorder_cost_real = fields.Float( + string="Real Cost", + copy=False, + store=True, + compute="_compute_workorder_cost_real", + ) + + @api.depends("duration_expected", "costs_hour") + def _compute_workorder_cost_estimated(self): + for order in self: + order.workorder_cost_estimated = order.costs_hour * order.duration_expected + + @api.depends("duration", "costs_hour") + def _compute_workorder_cost_real(self): + for order in self: + order.workorder_cost_real = order.costs_hour * order.duration diff --git a/mrp_production_cost/models/stock_move.py b/mrp_production_cost/models/stock_move.py new file mode 100644 index 000000000..41b6c8ef2 --- /dev/null +++ b/mrp_production_cost/models/stock_move.py @@ -0,0 +1,30 @@ +# Copyright 2022 Patxi Lersundi +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import api, fields, models + + +class StockMove(models.Model): + _inherit = "stock.move" + + material_cost_to_consume = fields.Float( + string="Estimated Cost", + store=True, + copy=False, + compute="_compute_material_cost_to_consume", + ) + material_cost_consumed = fields.Float( + string="Real Cost", + store=True, + copy=False, + compute="_compute_material_cost_consumed", + ) + + @api.depends("price_unit", "product_uom_qty") + def _compute_material_cost_to_consume(self): + for move in self: + move.material_cost_to_consume = move.price_unit * move.product_uom_qty + + @api.depends("price_unit", "quantity_done") + def _compute_material_cost_consumed(self): + for move in self: + move.material_cost_consumed = move.price_unit * move.quantity_done diff --git a/mrp_production_cost/views/mrp_production_views.xml b/mrp_production_cost/views/mrp_production_views.xml new file mode 100644 index 000000000..4eb1eefc8 --- /dev/null +++ b/mrp_production_cost/views/mrp_production_views.xml @@ -0,0 +1,56 @@ + + + + mrp.production + + + + + + + + + + + + mrp.production + + + + + + + + + + + + + diff --git a/mrp_production_cost/views/mrp_stockmove_views.xml b/mrp_production_cost/views/mrp_stockmove_views.xml new file mode 100644 index 000000000..d98ece8b6 --- /dev/null +++ b/mrp_production_cost/views/mrp_stockmove_views.xml @@ -0,0 +1,21 @@ + + + + stock.move + + + + + + + + + diff --git a/mrp_production_cost/views/mrp_workorder_views.xml b/mrp_production_cost/views/mrp_workorder_views.xml new file mode 100644 index 000000000..cfe012b89 --- /dev/null +++ b/mrp_production_cost/views/mrp_workorder_views.xml @@ -0,0 +1,25 @@ + + + + mrp.workorder + + + + + + + + + + diff --git a/mrp_production_deconstruction_reader/README.rst b/mrp_production_deconstruction_reader/README.rst new file mode 100644 index 000000000..013c66bb5 --- /dev/null +++ b/mrp_production_deconstruction_reader/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +==================================== +Mrp production deconstruction reader +==================================== + +* In detailed operations of manufacturing orders new field "Reader", to read + with a reader the "product", or "product lot", separated by a space. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Alfredo de la Fuente +* Ana Juaristi diff --git a/mrp_production_deconstruction_reader/__init__.py b/mrp_production_deconstruction_reader/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_deconstruction_reader/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_deconstruction_reader/__manifest__.py b/mrp_production_deconstruction_reader/__manifest__.py new file mode 100644 index 000000000..f726ce94f --- /dev/null +++ b/mrp_production_deconstruction_reader/__manifest__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Mrp Production Deconstruction Reader", + "version": "16.0.1.0.0", + "author": "Avanzosc", + "website": "https://github.com/avanzosc/mrp-addons", + "category": "Manufacturing/Manufacturing", + "license": "AGPL-3", + "depends": ["stock_move_line_product_lot_reader", "mrp_production_deconstruction"], + "data": ["views/mrp_production_views.xml"], + "installable": True, + "auto_install": True, +} diff --git a/mrp_production_deconstruction_reader/i18n/ca_ES.po b/mrp_production_deconstruction_reader/i18n/ca_ES.po new file mode 100644 index 000000000..cd632d6a3 --- /dev/null +++ b/mrp_production_deconstruction_reader/i18n/ca_ES.po @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_deconstruction_reader +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-04 07:55+0000\n" +"PO-Revision-Date: 2024-07-04 07:55+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_production_deconstruction_reader +#: model:ir.model,name:mrp_production_deconstruction_reader.model_stock_move_line +msgid "Product Moves (Stock Move Line)" +msgstr "Moviment del producte (línia de moviment d'estoc)" + +#. module: mrp_production_deconstruction_reader +#: model:ir.model.fields,field_description:mrp_production_deconstruction_reader.field_stock_move_line__reader +msgid "Reader" +msgstr "" + +#. module: mrp_production_deconstruction_reader +#. odoo-python +#: code:addons/mrp_production_deconstruction_reader/models/stock_move_line.py:0 +#, python-format +msgid "Reader product: %(product)s, not found in operations." +msgstr "" diff --git a/mrp_production_deconstruction_reader/i18n/en_GB.po b/mrp_production_deconstruction_reader/i18n/en_GB.po new file mode 100644 index 000000000..79ab485fd --- /dev/null +++ b/mrp_production_deconstruction_reader/i18n/en_GB.po @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_deconstruction_reader +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-04 07:55+0000\n" +"PO-Revision-Date: 2024-07-04 07:55+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_production_deconstruction_reader +#: model:ir.model,name:mrp_production_deconstruction_reader.model_stock_move_line +msgid "Product Moves (Stock Move Line)" +msgstr "" + +#. module: mrp_production_deconstruction_reader +#: model:ir.model.fields,field_description:mrp_production_deconstruction_reader.field_stock_move_line__reader +msgid "Reader" +msgstr "" + +#. module: mrp_production_deconstruction_reader +#. odoo-python +#: code:addons/mrp_production_deconstruction_reader/models/stock_move_line.py:0 +#, python-format +msgid "Reader product: %(product)s, not found in operations." +msgstr "" diff --git a/mrp_production_deconstruction_reader/i18n/es.po b/mrp_production_deconstruction_reader/i18n/es.po new file mode 100644 index 000000000..4db42653e --- /dev/null +++ b/mrp_production_deconstruction_reader/i18n/es.po @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_deconstruction_reader +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-04 07:56+0000\n" +"PO-Revision-Date: 2024-07-04 07:56+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_production_deconstruction_reader +#: model:ir.model,name:mrp_production_deconstruction_reader.model_stock_move_line +msgid "Product Moves (Stock Move Line)" +msgstr "Movimientos productos (Stock Move Line)" + +#. module: mrp_production_deconstruction_reader +#: model:ir.model.fields,field_description:mrp_production_deconstruction_reader.field_stock_move_line__reader +msgid "Reader" +msgstr "Lector" + +#. module: mrp_production_deconstruction_reader +#. odoo-python +#: code:addons/mrp_production_deconstruction_reader/models/stock_move_line.py:0 +#, python-format +msgid "Reader product: %(product)s, not found in operations." +msgstr "Producto leido: %(product)s, no encontrado en operaciones." diff --git a/mrp_production_deconstruction_reader/i18n/fr.po b/mrp_production_deconstruction_reader/i18n/fr.po new file mode 100644 index 000000000..77a3f38ac --- /dev/null +++ b/mrp_production_deconstruction_reader/i18n/fr.po @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_deconstruction_reader +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-04 07:56+0000\n" +"PO-Revision-Date: 2024-07-04 07:56+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_production_deconstruction_reader +#: model:ir.model,name:mrp_production_deconstruction_reader.model_stock_move_line +msgid "Product Moves (Stock Move Line)" +msgstr "Mouvements de stock" + +#. module: mrp_production_deconstruction_reader +#: model:ir.model.fields,field_description:mrp_production_deconstruction_reader.field_stock_move_line__reader +msgid "Reader" +msgstr "" + +#. module: mrp_production_deconstruction_reader +#. odoo-python +#: code:addons/mrp_production_deconstruction_reader/models/stock_move_line.py:0 +#, python-format +msgid "Reader product: %(product)s, not found in operations." +msgstr "" diff --git a/mrp_production_deconstruction_reader/i18n/mrp_production_deconstruction_reader.pot b/mrp_production_deconstruction_reader/i18n/mrp_production_deconstruction_reader.pot new file mode 100644 index 000000000..79ab485fd --- /dev/null +++ b/mrp_production_deconstruction_reader/i18n/mrp_production_deconstruction_reader.pot @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_deconstruction_reader +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-04 07:55+0000\n" +"PO-Revision-Date: 2024-07-04 07:55+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_production_deconstruction_reader +#: model:ir.model,name:mrp_production_deconstruction_reader.model_stock_move_line +msgid "Product Moves (Stock Move Line)" +msgstr "" + +#. module: mrp_production_deconstruction_reader +#: model:ir.model.fields,field_description:mrp_production_deconstruction_reader.field_stock_move_line__reader +msgid "Reader" +msgstr "" + +#. module: mrp_production_deconstruction_reader +#. odoo-python +#: code:addons/mrp_production_deconstruction_reader/models/stock_move_line.py:0 +#, python-format +msgid "Reader product: %(product)s, not found in operations." +msgstr "" diff --git a/mrp_production_deconstruction_reader/models/__init__.py b/mrp_production_deconstruction_reader/models/__init__.py new file mode 100644 index 000000000..431f51c27 --- /dev/null +++ b/mrp_production_deconstruction_reader/models/__init__.py @@ -0,0 +1 @@ +from . import stock_move_line diff --git a/mrp_production_deconstruction_reader/models/stock_move_line.py b/mrp_production_deconstruction_reader/models/stock_move_line.py new file mode 100644 index 000000000..204d6abb6 --- /dev/null +++ b/mrp_production_deconstruction_reader/models/stock_move_line.py @@ -0,0 +1,30 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class StockMoveLine(models.Model): + _inherit = "stock.move.line" + + reader = fields.Char(copy=False) + + @api.onchange("reader") + def onchange_reader(self): + result = super().onchange_reader() + if ( + self.reader + and self.product_id + and "from_mrp_production" in self.env.context + and self.env.context.get("from_mrp_production", False) + ): + stock_move = self.production_id.move_raw_ids.filtered( + lambda x: x.product_id == self.product_id + ) + if not stock_move: + message = _("Reader product: %(product)s, not found in operations.") % { + "product": self.product_id.name, + } + raise ValidationError(message) + self.move_id = stock_move.id + return result diff --git a/mrp_production_deconstruction_reader/views/mrp_production_views.xml b/mrp_production_deconstruction_reader/views/mrp_production_views.xml new file mode 100644 index 000000000..9391141f1 --- /dev/null +++ b/mrp_production_deconstruction_reader/views/mrp_production_views.xml @@ -0,0 +1,22 @@ + + + + mrp.production + + + + + + + + diff --git a/mrp_production_historical/README.rst b/mrp_production_historical/README.rst new file mode 100644 index 000000000..44f78d638 --- /dev/null +++ b/mrp_production_historical/README.rst @@ -0,0 +1,37 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +========================= +Mrp Production Historical +========================= + +* New object "MRP Production historical". +* In OF new tab "Historical". Every time a product to consume is scrapded, or + each time a product to be consumed is added, a history will be created. +* If in the BOMs, a line is added or deleted, or any field is changed, a history + will be generated in the LdM, and all manufacturing orders that have said BoM + will also be informed of this fact. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente + +Do not contact contributors directly about support or help with technical issues. \ No newline at end of file diff --git a/mrp_production_historical/__init__.py b/mrp_production_historical/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_historical/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_historical/__manifest__.py b/mrp_production_historical/__manifest__.py new file mode 100644 index 000000000..50dcf56de --- /dev/null +++ b/mrp_production_historical/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Production Historical", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC,", + "license": "AGPL-3", + "depends": [ + "mrp", + ], + "data": [ + "security/ir.model.access.csv", + "views/mrp_production_views.xml", + "views/mrp_bom_views.xml", + ], + "installable": True, +} diff --git a/mrp_production_historical/i18n/ca_ES.po b/mrp_production_historical/i18n/ca_ES.po new file mode 100644 index 000000000..6503c68fc --- /dev/null +++ b/mrp_production_historical/i18n/ca_ES.po @@ -0,0 +1,278 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-12 07:01+0000\n" +"PO-Revision-Date: 2024-07-12 07:01+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_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* New product: %(product)s." +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the designator: %(old_desig)s, by the new designator: %(new_desig)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the layer: %(old_layer)s, by the new layer: %(new_layer)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the manufacturer code: %(old_code)s, by the new manufacturer code: %(new_code)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the quantity: %(old_qty)s, by the new quantity: %(new_qty)s." +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the unit of measure: %(old_unit)s, by the new measure: %(new_unit)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Added BoM line" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__add +#, python-format +msgid "Added product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom +msgid "Bill of Material" +msgstr "Llista de material" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "Línia de Llista de Materials" + +#. module: mrp_production_historical +#: model:ir.model.fields,help:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "" +"Bill of Materials allow you to define the list of required components to " +"make a finished product." +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_id +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "BoM" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_changes +msgid "BoM line changes" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_movement +msgid "BoM line movement" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomadd +#, python-format +msgid "BoM: Added product" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomdel +#, python-format +msgid "BoM: Deleted product" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bommod +#, python-format +msgid "BoM: Modified line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_uid +msgid "Created by" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_date +msgid "Created on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__historical_date +msgid "Date" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Deleted BoM line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_bom__historical_ids +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production__mrp_production_historical_ids +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_bom_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_production_form_view +msgid "Historical" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__id +msgid "ID" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_date +msgid "Last Updated on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_id +msgid "MRP Production" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production_historical +msgid "MRP Production historical" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__product_id +msgid "Product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__programed_qty +msgid "Programed quantity" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_scrap +msgid "Scrap" +msgstr "Deixalla" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__scraped +#, python-format +msgid "Scraped product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__scraped_qty +msgid "Scraped quantity" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_move +msgid "Stock Move" +msgstr "Moviment d'estoc" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "The product: %(product)s the following changes have been made:" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__type +msgid "Type" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__user_id +msgid "User" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "added" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "deleted" +msgstr "" diff --git a/mrp_production_historical/i18n/en_GB.po b/mrp_production_historical/i18n/en_GB.po new file mode 100644 index 000000000..1e76a8cc6 --- /dev/null +++ b/mrp_production_historical/i18n/en_GB.po @@ -0,0 +1,278 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-12 07:02+0000\n" +"PO-Revision-Date: 2024-07-12 07:02+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_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* New product: %(product)s." +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the designator: %(old_desig)s, by the new designator: %(new_desig)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the layer: %(old_layer)s, by the new layer: %(new_layer)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the manufacturer code: %(old_code)s, by the new manufacturer code: %(new_code)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the quantity: %(old_qty)s, by the new quantity: %(new_qty)s." +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the unit of measure: %(old_unit)s, by the new measure: %(new_unit)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Added BoM line" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__add +#, python-format +msgid "Added product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom +msgid "Bill of Material" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,help:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "" +"Bill of Materials allow you to define the list of required components to " +"make a finished product." +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_id +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "BoM" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_changes +msgid "BoM line changes" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_movement +msgid "BoM line movement" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomadd +#, python-format +msgid "BoM: Added product" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomdel +#, python-format +msgid "BoM: Deleted product" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bommod +#, python-format +msgid "BoM: Modified line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_uid +msgid "Created by" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_date +msgid "Created on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__historical_date +msgid "Date" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Deleted BoM line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_bom__historical_ids +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production__mrp_production_historical_ids +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_bom_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_production_form_view +msgid "Historical" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__id +msgid "ID" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_date +msgid "Last Updated on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_id +msgid "MRP Production" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production_historical +msgid "MRP Production historical" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__product_id +msgid "Product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__programed_qty +msgid "Programed quantity" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_scrap +msgid "Scrap" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__scraped +#, python-format +msgid "Scraped product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__scraped_qty +msgid "Scraped quantity" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "The product: %(product)s the following changes have been made:" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__type +msgid "Type" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__user_id +msgid "User" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "added" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "deleted" +msgstr "" diff --git a/mrp_production_historical/i18n/es.po b/mrp_production_historical/i18n/es.po new file mode 100644 index 000000000..54ab4b759 --- /dev/null +++ b/mrp_production_historical/i18n/es.po @@ -0,0 +1,292 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-12 07:02+0000\n" +"PO-Revision-Date: 2024-07-12 07:02+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_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* New product: %(product)s." +msgstr "" +"%(text)s\n" +"* Nuevo producto: %(product)s." + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the designator: %(old_desig)s, by the new designator: %(new_desig)s" +msgstr "" +"%(text)s\n" +"* Reemplazado el designador: %(old_desig)s, por el nuevo designador: %(new_desig)s" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the layer: %(old_layer)s, by the new layer: %(new_layer)s" +msgstr "" +"%(text)s\n" +"* Reemplazada la capa: %(old_layer)s, por la nueva capa: %(new_layer)s" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the manufacturer code: %(old_code)s, by the new manufacturer code: %(new_code)s" +msgstr "" +"%(text)s\n" +"* Reemplazado el código de fabricante: %(old_code)s, por el nuevo código de fabricante: %(new_code)s" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the quantity: %(old_qty)s, by the new quantity: %(new_qty)s." +msgstr "" +"%(text)s\n" +"* Reemplazada la cantidad: %(old_qty)s, por la nueva cantidad: %(new_qty)s." + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the unit of measure: %(old_unit)s, by the new measure: %(new_unit)s" +msgstr "" +"%(text)s\n" +"* Reemplazada la unidad de medida: %(old_unit)s, por la nueva unidad de medida: %(new_unit)s" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Added BoM line" +msgstr "Añadida línea en LdM" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__add +#, python-format +msgid "Added product" +msgstr "Producto añadido" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom +msgid "Bill of Material" +msgstr "Lista de materiales" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "Línea de Lista de Materiales" + +#. module: mrp_production_historical +#: model:ir.model.fields,help:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "" +"Bill of Materials allow you to define the list of required components to " +"make a finished product." +msgstr "" +"La lista de materiales le permite definir la lista de componentes necesarios" +" para hacer un producto terminado." + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_id +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "BoM" +msgstr "LdM" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_changes +msgid "BoM line changes" +msgstr "Cambios línea LdM" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_movement +msgid "BoM line movement" +msgstr "Mvto. Líne LdM" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomadd +#, python-format +msgid "BoM: Added product" +msgstr "LdM: Producto añadido" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomdel +#, python-format +msgid "BoM: Deleted product" +msgstr "LdM: Producto borrado" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bommod +#, python-format +msgid "BoM: Modified line" +msgstr "LdM: Línea modificada" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__historical_date +msgid "Date" +msgstr "Fecha" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Deleted BoM line" +msgstr "Borrada línea LdM" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__display_name +msgid "Display Name" +msgstr "Mostrar nombre" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_bom__historical_ids +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production__mrp_production_historical_ids +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_bom_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_production_form_view +msgid "Historical" +msgstr "Histórico" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__id +msgid "ID" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical____last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_date +msgid "Last Updated on" +msgstr "Últim actualización el" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_id +msgid "MRP Production" +msgstr "MRP Producción" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production_historical +msgid "MRP Production historical" +msgstr "Histórico MRP Producción" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__product_id +msgid "Product" +msgstr "Producto" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production +msgid "Production Order" +msgstr "Orden de producción" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__programed_qty +msgid "Programed quantity" +msgstr "Cant. Programada" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_scrap +msgid "Scrap" +msgstr "Desechar" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__scraped +#, python-format +msgid "Scraped product" +msgstr "Producto desechado" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__scraped_qty +msgid "Scraped quantity" +msgstr "Cant. desechada" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_move +msgid "Stock Move" +msgstr "Movimiento de inventario" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "The product: %(product)s the following changes have been made:" +msgstr "El producto: %(product)s se han realizado los siguientes cambios:" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__type +msgid "Type" +msgstr "Tipo" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__user_id +msgid "User" +msgstr "Usuario" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "added" +msgstr "Añadido" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "deleted" +msgstr "Borrado" diff --git a/mrp_production_historical/i18n/fr.po b/mrp_production_historical/i18n/fr.po new file mode 100644 index 000000000..55f634657 --- /dev/null +++ b/mrp_production_historical/i18n/fr.po @@ -0,0 +1,278 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-12 07:02+0000\n" +"PO-Revision-Date: 2024-07-12 07:02+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_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* New product: %(product)s." +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the designator: %(old_desig)s, by the new designator: %(new_desig)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the layer: %(old_layer)s, by the new layer: %(new_layer)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the manufacturer code: %(old_code)s, by the new manufacturer code: %(new_code)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the quantity: %(old_qty)s, by the new quantity: %(new_qty)s." +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the unit of measure: %(old_unit)s, by the new measure: %(new_unit)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Added BoM line" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__add +#, python-format +msgid "Added product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom +msgid "Bill of Material" +msgstr "Nomenclature" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "Ligne de nomenclature" + +#. module: mrp_production_historical +#: model:ir.model.fields,help:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "" +"Bill of Materials allow you to define the list of required components to " +"make a finished product." +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_id +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "BoM" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_changes +msgid "BoM line changes" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_movement +msgid "BoM line movement" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomadd +#, python-format +msgid "BoM: Added product" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomdel +#, python-format +msgid "BoM: Deleted product" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bommod +#, python-format +msgid "BoM: Modified line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_uid +msgid "Created by" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_date +msgid "Created on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__historical_date +msgid "Date" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Deleted BoM line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_bom__historical_ids +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production__mrp_production_historical_ids +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_bom_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_production_form_view +msgid "Historical" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__id +msgid "ID" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_date +msgid "Last Updated on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_id +msgid "MRP Production" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production_historical +msgid "MRP Production historical" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__product_id +msgid "Product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__programed_qty +msgid "Programed quantity" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_scrap +msgid "Scrap" +msgstr "Rebut" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__scraped +#, python-format +msgid "Scraped product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__scraped_qty +msgid "Scraped quantity" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_move +msgid "Stock Move" +msgstr "Mouvement de stock" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "The product: %(product)s the following changes have been made:" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__type +msgid "Type" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__user_id +msgid "User" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "added" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "deleted" +msgstr "" diff --git a/mrp_production_historical/i18n/mrp_production_historical.pot b/mrp_production_historical/i18n/mrp_production_historical.pot new file mode 100644 index 000000000..ceb65a33e --- /dev/null +++ b/mrp_production_historical/i18n/mrp_production_historical.pot @@ -0,0 +1,278 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-12 07:01+0000\n" +"PO-Revision-Date: 2024-07-12 07:01+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_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* New product: %(product)s." +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the designator: %(old_desig)s, by the new designator: %(new_desig)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the layer: %(old_layer)s, by the new layer: %(new_layer)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the manufacturer code: %(old_code)s, by the new manufacturer code: %(new_code)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the quantity: %(old_qty)s, by the new quantity: %(new_qty)s." +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "" +"%(text)s\n" +"* Replaced the unit of measure: %(old_unit)s, by the new measure: %(new_unit)s" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Added BoM line" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__add +#, python-format +msgid "Added product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom +msgid "Bill of Material" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_bom_line +msgid "Bill of Material Line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,help:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "" +"Bill of Materials allow you to define the list of required components to " +"make a finished product." +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_id +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_bom_id +msgid "BoM" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_changes +msgid "BoM line changes" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__bom_line_movement +msgid "BoM line movement" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomadd +#, python-format +msgid "BoM: Added product" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bomdel +#, python-format +msgid "BoM: Deleted product" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__bommod +#, python-format +msgid "BoM: Modified line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_uid +msgid "Created by" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__create_date +msgid "Created on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__historical_date +msgid "Date" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "Deleted BoM line" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_bom__historical_ids +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production__mrp_production_historical_ids +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_bom_form_view +#: model_terms:ir.ui.view,arch_db:mrp_production_historical.mrp_production_form_view +msgid "Historical" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__id +msgid "ID" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__write_date +msgid "Last Updated on" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__production_id +msgid "MRP Production" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production_historical +msgid "MRP Production historical" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__product_id +msgid "Product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__programed_qty +msgid "Programed quantity" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_scrap +msgid "Scrap" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_production_historical.py:0 +#: model:ir.model.fields.selection,name:mrp_production_historical.selection__mrp_production_historical__type__scraped +#, python-format +msgid "Scraped product" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__scraped_qty +msgid "Scraped quantity" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model,name:mrp_production_historical.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "The product: %(product)s the following changes have been made:" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__type +msgid "Type" +msgstr "" + +#. module: mrp_production_historical +#: model:ir.model.fields,field_description:mrp_production_historical.field_mrp_production_historical__user_id +msgid "User" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "added" +msgstr "" + +#. module: mrp_production_historical +#. odoo-python +#: code:addons/mrp_production_historical/models/mrp_bom_line.py:0 +#, python-format +msgid "deleted" +msgstr "" diff --git a/mrp_production_historical/models/__init__.py b/mrp_production_historical/models/__init__.py new file mode 100644 index 000000000..45edccec9 --- /dev/null +++ b/mrp_production_historical/models/__init__.py @@ -0,0 +1,6 @@ +from . import mrp_bom_line +from . import mrp_bom +from . import mrp_production_historical +from . import mrp_production +from . import stock_crap +from . import stock_move diff --git a/mrp_production_historical/models/mrp_bom.py b/mrp_production_historical/models/mrp_bom.py new file mode 100644 index 000000000..a85367199 --- /dev/null +++ b/mrp_production_historical/models/mrp_bom.py @@ -0,0 +1,20 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class MrpBom(models.Model): + _inherit = "mrp.bom" + + historical_ids = fields.One2many( + string="Historical", + comodel_name="mrp.production.historical", + inverse_name="bom_id", + copy=False, + ) + + def _copy_bom(self): + new_bom = super( + MrpBom, self.with_context(no_create_historical=True) + )._copy_bom() + return new_bom diff --git a/mrp_production_historical/models/mrp_bom_line.py b/mrp_production_historical/models/mrp_bom_line.py new file mode 100644 index 000000000..168a896c7 --- /dev/null +++ b/mrp_production_historical/models/mrp_bom_line.py @@ -0,0 +1,145 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import _, api, fields, models + + +class MrpBomLine(models.Model): + _inherit = "mrp.bom.line" + + @api.model_create_multi + def create(self, vals): + lines = super().create(vals) + if "no_create_historical" not in self.env.context: + for line in lines: + line._create_production_historical("add") + return lines + + def unlink(self): + for line in self: + line._create_production_historical("delete") + return super().unlink() + + def write(self, vals): + if "no_create_historical" not in self.env.context: + if "product_uom_qty" in vals: + vals["load_cost"] = bool(vals.get("product_uom_qty", 0.0)) + if ( + "product_id" in vals + or "product_qty" in vals + or "product_uom" in vals + or "manufacturer_code" in vals + ): + for line in self: + text = line._generate_literals_for_historical(vals) + line._create_production_historical("update", text=text) + return super().write(vals) + + def _generate_literals_for_historical(self, vals): + text = _( + "The product: %(product)s the following changes have " "been made:" + ) % { + "product": self.product_id.name, + } + if "product_id" in vals: + product = self.env["product.product"].browse(vals.get("product_id")) + text = _("%(text)s\n* New product: %(product)s.") % { + "text": text, + "product": product.name, + } + if "product_qty" in vals: + text = _( + "%(text)s\n* Replaced the quantity: %(old_qty)s, by the new " + "quantity: %(new_qty)s." + ) % { + "text": text, + "old_qty": self.product_qty, + "new_qty": vals.get("product_qty"), + } + if "product_uom" in vals: + uom = self.env["product.uom"].browse(vals.get("product_uom")) + text = _( + "%(text)s\n* Replaced the unit of measure: %(old_unit)s, by " + "the new measure: %(new_unit)s" + ) % { + "text": text, + "old_unit": self.product_uom.name, + "new_unit": uom.name, + } + if "manufacturer_code" in vals: + text = _( + "%(text)s\n* Replaced the manufacturer code: %(old_code)s, by " + "the new manufacturer code: %(new_code)s" + ) % { + "text": text, + "old_code": self.manufacturer_code, + "new_code": vals.get("manufacturer_code"), + } + if "layer" in vals: + text = _( + "%(text)s\n* Replaced the layer: %(old_layer)s, by the " + "new layer: %(new_layer)s" + ) % { + "text": text, + "old_layer": self.layer, + "new_layer": vals.get("layer"), + } + if "designator" in vals: + text = _( + "%(text)s\n* Replaced the designator: %(old_desig)s, by the " + "new designator: %(new_desig)s" + ) % { + "text": text, + "old_desig": self.designator, + "new_desig": vals.get("designator"), + } + return text + + def _create_production_historical(self, my_type, text=False): + production_obj = self.env["mrp.production"] + historical_obj = self.env["mrp.production.historical"] + vals = self._get_vals_production_historical(my_type, text=text) + if my_type == "add": + vals["bom_line_changes"] = _("Added BoM line") + if my_type == "delete": + vals["bom_line_changes"] = _("Deleted BoM line") + vals["bom_id"] = self.bom_id.id + historical_obj.create(vals) + cond = [ + ("product_tmpl_id", "=", self.bom_id.product_tmpl_id.id), + "|", + ("active", "=", True), + ("active", "=", False), + ] + if self.bom_id.product_id: + cond.append(("product_id", "=", self.bom_id.product_id.id)) + boms = self.env["mrp.bom"].search(cond) + cond = [ + ("bom_id", "in", boms.ids), + ("state", "not in", ("done", "cancel", "draft")), + ] + productions = production_obj.search(cond) + for production in productions: + vals = self._get_vals_production_historical(my_type, text=text) + vals["production_id"] = production.id + if my_type == "update": + historical_obj.with_context(bomline_historical_update=True).create(vals) + else: + historical_obj.with_context(bomline_historical_noupdate=True).create( + vals + ) + + def _get_vals_production_historical(self, my_type, text): + vals = { + "historical_date": fields.Datetime.now(), + "user_id": self.env.user.id, + "product_id": self.product_id.id, + "programed_qty": self.product_qty, + } + if my_type == "add": + vals.update({"type": "bomadd", "bom_line_movement": _("added")}) + elif my_type == "delete": + vals.update({"type": "bomdel", "bom_line_movement": _("deleted")}) + else: + vals.pop("programed_qty") + vals.update({"type": "bommod", "bom_line_changes": text}) + return vals diff --git a/mrp_production_historical/models/mrp_production.py b/mrp_production_historical/models/mrp_production.py new file mode 100644 index 000000000..0967f3a30 --- /dev/null +++ b/mrp_production_historical/models/mrp_production.py @@ -0,0 +1,14 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + mrp_production_historical_ids = fields.One2many( + string="Historical", + comodel_name="mrp.production.historical", + inverse_name="production_id", + copy=False, + ) diff --git a/mrp_production_historical/models/mrp_production_historical.py b/mrp_production_historical/models/mrp_production_historical.py new file mode 100644 index 000000000..0eb5d2a4f --- /dev/null +++ b/mrp_production_historical/models/mrp_production_historical.py @@ -0,0 +1,42 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import _, fields, models + + +class MrpProductionHistorical(models.Model): + _name = "mrp.production.historical" + _description = "MRP Production historical" + + production_id = fields.Many2one( + string="MRP Production", comodel_name="mrp.production", copy=False + ) + production_bom_id = fields.Many2one( + string="BoM", + comodel_name="mrp.bom", + store=True, + copy=False, + related="production_id.bom_id", + ) + historical_date = fields.Datetime(string="Date", copy=False) + user_id = fields.Many2one(string="User", comodel_name="res.users", copy=False) + product_id = fields.Many2one( + string="Product", comodel_name="product.product", copy=False + ) + programed_qty = fields.Float( + string="Programed quantity", digits="Product Unit of Measure", copy=False + ) + scraped_qty = fields.Float( + string="Scraped quantity", digits="Product Unit of Measure", copy=False + ) + type = fields.Selection( + selection=[ + ("scraped", _("Scraped product")), + ("add", _("Added product")), + ("bomadd", _("BoM: Added product")), + ("bomdel", _("BoM: Deleted product")), + ("bommod", _("BoM: Modified line")), + ], + ) + bom_id = fields.Many2one(string="BoM", comodel_name="mrp.bom", copy=False) + bom_line_movement = fields.Char(string="BoM line movement", copy=False) + bom_line_changes = fields.Text(string="BoM line changes", copy=False) diff --git a/mrp_production_historical/models/stock_crap.py b/mrp_production_historical/models/stock_crap.py new file mode 100644 index 000000000..1256dfbba --- /dev/null +++ b/mrp_production_historical/models/stock_crap.py @@ -0,0 +1,43 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class StockScrap(models.Model): + _inherit = "stock.scrap" + + def do_scrap(self): + self._check_company() + for scrap in self.filtered(lambda x: x.production_id): + move = scrap.production_id.move_raw_ids.filtered( + lambda x: x.product_id == scrap.product_id + and x.state not in ("done", "cancel") + ) + if not move: + move = scrap.production_id.move_finished_ids.filtered( + lambda x: x.product_id == scrap.product_id and x.state == "done" + ) + if move: + scrap.create_mrp_production_historical(move) + return super(StockScrap, self.with_context(from_scrap=True)).do_scrap() + + def create_mrp_production_historical(self, move): + vals = self.get_values_for_create_mrp_production_historical(move) + historical = ( + self.env["mrp.production.historical"] + .with_context(scrap_history=True) + .create(vals) + ) + return historical + + def get_values_for_create_mrp_production_historical(self, move): + vals = { + "production_id": self.production_id.id, + "historical_date": fields.Datetime.now(), + "type": "scraped", + "user_id": self.env.user.id, + "product_id": self.product_id.id, + "programed_qty": move.product_uom_qty, + "scraped_qty": self.scrap_qty, + } + return vals diff --git a/mrp_production_historical/models/stock_move.py b/mrp_production_historical/models/stock_move.py new file mode 100644 index 000000000..dd3f52b8e --- /dev/null +++ b/mrp_production_historical/models/stock_move.py @@ -0,0 +1,34 @@ +# Copyright 2014 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import api, fields, models + + +class StockMove(models.Model): + _inherit = "stock.move" + + @api.model_create_multi + def create(self, vals_list): + moves = super().create(vals_list) + if "from_scrap" not in self.env.context: + for move in moves.filtered( + lambda x: x.raw_material_production_id and not x.bom_line_id + ): + move.create_mrp_production_historical() + return moves + + def create_mrp_production_historical(self): + vals = self._get_vals_to_create_mrp_production_historical() + self.env["mrp.production.historical"].with_context(add_historical=True).create( + vals + ) + + def _get_vals_to_create_mrp_production_historical(self): + vals = { + "production_id": self.raw_material_production_id.id, + "historical_date": fields.Datetime.now(), + "type": "add", + "user_id": self.env.user.id, + "product_id": self.product_id.id, + "programed_qty": self.product_uom_qty, + } + return vals diff --git a/mrp_production_historical/security/ir.model.access.csv b/mrp_production_historical/security/ir.model.access.csv new file mode 100644 index 000000000..078268728 --- /dev/null +++ b/mrp_production_historical/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_mrp_production_historical_manager","mrp_production_historical","mrp_production_historical.model_mrp_production_historical","mrp.group_mrp_manager",1,1,1,1 +"access_mrp_production_historical_user","mrp_production_historical","mrp_production_historical.model_mrp_production_historical","mrp.group_mrp_user",1,1,1,0 diff --git a/mrp_production_historical/views/mrp_bom_views.xml b/mrp_production_historical/views/mrp_bom_views.xml new file mode 100644 index 000000000..7c85d427a --- /dev/null +++ b/mrp_production_historical/views/mrp_bom_views.xml @@ -0,0 +1,25 @@ + + + + mrp.bom + + + + + + + + + + + + + + + + + + + + + diff --git a/mrp_production_historical/views/mrp_production_views.xml b/mrp_production_historical/views/mrp_production_views.xml new file mode 100644 index 000000000..5f1631fa4 --- /dev/null +++ b/mrp_production_historical/views/mrp_production_views.xml @@ -0,0 +1,25 @@ + + + + mrp.production + + + + + + + + + + + + + + + + + + + + + diff --git a/mrp_production_historical_bom_version/README.rst b/mrp_production_historical_bom_version/README.rst new file mode 100644 index 000000000..1f0c2fa4f --- /dev/null +++ b/mrp_production_historical_bom_version/README.rst @@ -0,0 +1,32 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +===================================== +Mrp production historical bom version +===================================== + +* History will be created when a LdM has a new new version, or is activated. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente + +Do not contact contributors directly about support or help with technical issues. \ No newline at end of file diff --git a/mrp_production_historical_bom_version/__init__.py b/mrp_production_historical_bom_version/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_historical_bom_version/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_historical_bom_version/__manifest__.py b/mrp_production_historical_bom_version/__manifest__.py new file mode 100644 index 000000000..21f512707 --- /dev/null +++ b/mrp_production_historical_bom_version/__manifest__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Production Historical Bom Version", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC,", + "license": "AGPL-3", + "depends": ["mrp_production_historical", "mrp_bom_version"], + "data": [], + "installable": True, + "auto_install": True, +} diff --git a/mrp_production_historical_bom_version/i18n/es.po b/mrp_production_historical_bom_version/i18n/es.po new file mode 100644 index 000000000..18a844ea2 --- /dev/null +++ b/mrp_production_historical_bom_version/i18n/es.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical_bom_version +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-04 10:06+0000\n" +"PO-Revision-Date: 2024-06-04 10:06+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_production_historical_bom_version +#: model:ir.model,name:mrp_production_historical_bom_version.model_mrp_bom +msgid "Bill of Material" +msgstr "Lista de materiales" + +#. module: mrp_production_historical_bom_version +#. odoo-python +#: code:addons/mrp_production_historical_bom_version/models/mrp_bom.py:0 +#, python-format +msgid "It has been changed to version {}." +msgstr "Ha sido cambiada a la versión {}." + +#. module: mrp_production_historical_bom_version +#. odoo-python +#: code:addons/mrp_production_historical_bom_version/models/mrp_bom.py:0 +#, python-format +msgid "The BoM with version {}, has been activated." +msgstr "La LdM con versión {}, ha sido activada." diff --git a/mrp_production_historical_bom_version/i18n/mrp_production_historical_bom_version.pot b/mrp_production_historical_bom_version/i18n/mrp_production_historical_bom_version.pot new file mode 100644 index 000000000..a75690779 --- /dev/null +++ b/mrp_production_historical_bom_version/i18n/mrp_production_historical_bom_version.pot @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical_bom_version +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-04 10:05+0000\n" +"PO-Revision-Date: 2024-06-04 10:05+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_production_historical_bom_version +#: model:ir.model,name:mrp_production_historical_bom_version.model_mrp_bom +msgid "Bill of Material" +msgstr "" + +#. module: mrp_production_historical_bom_version +#. odoo-python +#: code:addons/mrp_production_historical_bom_version/models/mrp_bom.py:0 +#, python-format +msgid "It has been changed to version {}." +msgstr "" + +#. module: mrp_production_historical_bom_version +#. odoo-python +#: code:addons/mrp_production_historical_bom_version/models/mrp_bom.py:0 +#, python-format +msgid "The BoM with version {}, has been activated." +msgstr "" diff --git a/mrp_production_historical_bom_version/models/__init__.py b/mrp_production_historical_bom_version/models/__init__.py new file mode 100644 index 000000000..a352efe9b --- /dev/null +++ b/mrp_production_historical_bom_version/models/__init__.py @@ -0,0 +1 @@ +from . import mrp_bom diff --git a/mrp_production_historical_bom_version/models/mrp_bom.py b/mrp_production_historical_bom_version/models/mrp_bom.py new file mode 100644 index 000000000..bf23cef0c --- /dev/null +++ b/mrp_production_historical_bom_version/models/mrp_bom.py @@ -0,0 +1,54 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import _, fields, models + + +class MrpBom(models.Model): + _inherit = "mrp.bom" + + def _copy_bom(self): + new_bom = super()._copy_bom() + new_bom._create_version_activate_historical("version") + return new_bom + + def button_activate(self): + result = super().button_activate() + for bom in self: + bom._create_version_activate_historical("activated") + return result + + def _create_version_activate_historical(self, text): + production_obj = self.env["mrp.production"] + historical_obj = self.env["mrp.production.historical"] + if text == "version": + my_text = _("It has been changed to version {}.").format(self.version) + else: + my_text = _("The BoM with version {}, has been activated.").format( + self.version + ) + vals = { + "bom_id": self.id, + "historical_date": fields.Datetime.now(), + "user_id": self.env.user.id, + "type": "bommod", + "bom_line_changes": my_text, + } + historical_obj.create(vals) + vals.pop("bom_id") + cond = [ + ("product_tmpl_id", "=", self.product_tmpl_id.id), + "|", + ("active", "=", True), + ("active", "=", False), + ] + if self.product_id: + cond.append(("product_id", "=", self.product_id.id)) + boms = self.search(cond) + cond = [ + ("bom_id", "in", boms.ids), + ("state", "not in", ("done", "cancel", "draft")), + ] + productions = production_obj.search(cond) + for production in productions: + vals["production_id"] = production.id + historical_obj.with_context(from_bom_activated=True).create(vals) diff --git a/mrp_production_historical_follower/README.rst b/mrp_production_historical_follower/README.rst new file mode 100644 index 000000000..844320263 --- /dev/null +++ b/mrp_production_historical_follower/README.rst @@ -0,0 +1,39 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +================================== +Mrp production historical follower +================================== + +* In user new field "Is a production follower". +* In manufacturing orders new "Followers" tab, every time an OF is created, the + users marked as OF followers will be taken and placed in this tab. +* In manufacturing orders, every time a product to be consumed is discarded, or + every time a product to be consumed is added, an email will automatically be + sent to the manufacturing order's followers. +* If a line is added or deleted in the bill of materials lines, or any data is + changed, an email will be sent to the followers of the manufacturing order. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente + +Do not contact contributors directly about support or help with technical issues. \ No newline at end of file diff --git a/mrp_production_historical_follower/__init__.py b/mrp_production_historical_follower/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_historical_follower/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_historical_follower/__manifest__.py b/mrp_production_historical_follower/__manifest__.py new file mode 100644 index 000000000..2752af694 --- /dev/null +++ b/mrp_production_historical_follower/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Production Historical Follower", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC,", + "license": "AGPL-3", + "depends": ["mrp_production_historical", "mrp_bom_version"], + "data": [ + "data/mrp_production_historical_follower.xml", + "views/mrp_production_views.xml", + "views/res_users_views.xml", + ], + "installable": True, +} diff --git a/mrp_production_historical_follower/data/mrp_production_historical_follower.xml b/mrp_production_historical_follower/data/mrp_production_historical_follower.xml new file mode 100644 index 000000000..ff21b02d0 --- /dev/null +++ b/mrp_production_historical_follower/data/mrp_production_historical_follower.xml @@ -0,0 +1,172 @@ + + + + Scraped product in MRP production + ${user.company_id.email or ''} + Scraped product in production: ${object.production_id.name}. + + + ${user.partner_id.lang} + +

Hello

+

The product ${object.product_id.name} has been scrapped by de user: ${object.user_id.name}. Initial planned quantity: ${object.programed_qty}, quantity scraped: ${object.scraped_qty}.

+

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

+

Thank you very much and good day.

+ +
+

+ ${user.company_id.name}

+
+
+ + ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} + + % if user.company_id.phone: +
+ Phone: ${user.company_id.phone} +
+ % endif + % if user.company_id.website: + + %endif +

+
+ + ]]>
+
+ + + Add product in MRP production + ${user.company_id.email or ''} + Added product in production: ${object.production_id.name}. + + + ${user.partner_id.lang} + +

Hello

+

The product ${object.product_id.name} has been add by de user: ${object.user_id.name}. Initial planned quantity: ${object.programed_qty}.

+

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

+

Thank you very much and good day.

+ +
+

+ ${user.company_id.name}

+
+
+ + ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} + + % if user.company_id.phone: +
+ Phone: ${user.company_id.phone} +
+ % endif + % if user.company_id.website: + + %endif +

+
+ + ]]>
+
+ + + BoM line changed for MRP production + ${user.company_id.email or ''} + Product ${object.bom_line_movement} in BoM: ${object.production_bom_id.name}, for production: ${object.production_id.name}. + + + ${user.partner_id.lang} + +

Hello

+

The product ${object.product_id.name} has been ${object.bom_line_movement} by de user: ${object.user_id.name}, in BoM: ${object.production_bom_id.name}. Initial planned quantity: ${object.programed_qty}.

+

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

+

Thank you very much and good day.

+ +
+

+ ${user.company_id.name}

+
+
+ + ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} + + % if user.company_id.phone: +
+ Phone: ${user.company_id.phone} +
+ % endif + % if user.company_id.website: + + %endif +

+
+ + ]]>
+
+ + + BoM line information changed for MRP production + ${user.company_id.email or ''} + Changed BoM: ${object.production_bom_id.name}, for production: ${object.production_id.name}. + + + ${user.partner_id.lang} + +

Hello

+

The BoM ${object.production_bom_id.name} has been changed by de user: ${object.user_id.name}.

+

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

+

${object.bom_line_changes}

+ +

Thank you very much and good day.

+ +
+

+ ${user.company_id.name}

+
+
+ + ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe} + + % if user.company_id.phone: +
+ Phone: ${user.company_id.phone} +
+ % endif + % if user.company_id.website: + + %endif +

+
+ + ]]>
+
+
diff --git a/mrp_production_historical_follower/i18n/es.po b/mrp_production_historical_follower/i18n/es.po new file mode 100644 index 000000000..fd2a5c59e --- /dev/null +++ b/mrp_production_historical_follower/i18n/es.po @@ -0,0 +1,362 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical_follower +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-05 05:43+0000\n" +"PO-Revision-Date: 2024-06-05 05:43+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_production_historical_follower +#: model:mail.template,body_html:mrp_production_historical_follower.mrp_production_histo_bom2 +msgid "" +"\n" +"
\n" +"

Hello

\n" +"

The BoM ${object.production_bom_id.name} has been changed by de user: ${object.user_id.name}.

\n" +"

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

\n" +"

${object.bom_line_changes}

\n" +" \n" +"

Thank you very much and good day.

\n" +" \n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Phone: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +msgstr "" +"\n" +"
\n" +"

Hola

\n" +"

la LdM ${object.production_bom_id.name} ha sido modificada por el usuario: ${object.user_id.name}.

\n" +"

Producción: ${object.production_id.name}, estado de la producción: ${object.production_id.state}.

\n" +"

${object.bom_line_changes}

\n" +"\n" +"

Muchas gracias, y que pases un buen día.

\n" +"\n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Teléfono: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +#. module: mrp_production_historical_follower +#: model:mail.template,body_html:mrp_production_historical_follower.mrp_production_histo_bom1 +msgid "" +"\n" +"
\n" +"

Hello

\n" +"

The product ${object.product_id.name} has been ${object.bom_line_movement} by de user: ${object.user_id.name}, in BoM: ${object.production_bom_id.name}. Initial planned quantity: ${object.programed_qty}.

\n" +"

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

\n" +"

Thank you very much and good day.

\n" +" \n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Phone: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +msgstr "" +"\n" +"
\n" +"

Hola

\n" +"

El producto ${object.product_id.name} ha sido ${object.bom_line_movement} por el usuario: ${object.user_id.name}, en la LdM: ${object.production_bom_id.name}. Cantidad inicial planificada: ${object.programed_qty}.

\n" +"

Producción: ${object.production_id.name}, estado de la producción: ${object.production_id.state}.

\n" +"

Muchas gracias, y que pases un buen día.

\n" +"\n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Teléfono: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " + +#. module: mrp_production_historical_follower +#: model:mail.template,body_html:mrp_production_historical_follower.mrp_production_historical_add +msgid "" +"\n" +"
\n" +"

Hello

\n" +"

The product ${object.product_id.name} has been add by de user: ${object.user_id.name}. Initial planned quantity: ${object.programed_qty}.

\n" +"

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

\n" +"

Thank you very much and good day.

\n" +" \n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Phone: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +msgstr "" +"\n" +"
\n" +"

Hola.

\n" +"

El producto ${object.product_id.name} ha sido añadido por el usuario: ${object.user_id.name}. Cantidad inicial planificada: ${object.programed_qty}.

\n" +"

Producción: ${object.production_id.name}, estado de la producción: ${object.production_id.state}.

\n" +"

Muchas gracias, y que pases un buen día.

\n" +"\n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Teléfono: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " + +#. module: mrp_production_historical_follower +#: model:mail.template,body_html:mrp_production_historical_follower.mrp_production_historical_scraped +msgid "" +"\n" +"
\n" +"

Hello

\n" +"

The product ${object.product_id.name} has been scrapped by de user: ${object.user_id.name}. Initial planned quantity: ${object.programed_qty}, quantity scraped: ${object.scraped_qty}.

\n" +"

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

\n" +"

Thank you very much and good day.

\n" +" \n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Phone: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +msgstr "" +"\n" +"
\n" +"

Hola.

\n" +"

El producto ${object.product_id.name} ha sido desechado por el usuario: ${object.user_id.name}. Cantidad inicial planificada: ${object.programed_qty}, cantidad desechada: ${object.scraped_qty}.

\n" +"

Producción: ${object.production_id.name}, estado de la producción: ${object.production_id.state}.

\n" +"

Muchas gracias, y que pases un buen día.

\n" +"\n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Teléfono: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " + +#. module: mrp_production_historical_follower +#: model:mail.template,name:mrp_production_historical_follower.mrp_production_historical_add +msgid "Add product in MRP production" +msgstr "Añadir producto en fabricacion MRP" + +#. module: mrp_production_historical_follower +#: model:mail.template,subject:mrp_production_historical_follower.mrp_production_historical_add +msgid "Added product in production: ${object.production_id.name}." +msgstr "Añadido producto en fabricación: ${object.production_id.name}." + +#. module: mrp_production_historical_follower +#: model:mail.template,name:mrp_production_historical_follower.mrp_production_histo_bom1 +msgid "BoM line changed for MRP production" +msgstr "Línea LdM cambiada para producción MRP" + +#. module: mrp_production_historical_follower +#: model:mail.template,name:mrp_production_historical_follower.mrp_production_histo_bom2 +msgid "BoM line information changed for MRP production" +msgstr "Información cambiada en línea LdM para producción MRP" + +#. module: mrp_production_historical_follower +#: model:mail.template,subject:mrp_production_historical_follower.mrp_production_histo_bom2 +msgid "" +"Changed BoM: ${object.production_bom_id.name}, for production: " +"${object.production_id.name}." +msgstr "" +"LdM cambiada: ${object.production_bom_id.name}, para producción: " +"${object.production_id.name}." + +#. module: mrp_production_historical_follower +#: model_terms:ir.ui.view,arch_db:mrp_production_historical_follower.mrp_production_form_view +msgid "Followers" +msgstr "Seguidores" + +#. module: mrp_production_historical_follower +#: model:ir.model,name:mrp_production_historical_follower.model_mrp_production_historical +msgid "MRP Production historical" +msgstr "Histórico producción MRP" + +#. module: mrp_production_historical_follower +#: model:ir.model.fields,field_description:mrp_production_historical_follower.field_res_users__mrp_production_follower +#: model_terms:ir.ui.view,arch_db:mrp_production_historical_follower.view_users_form +msgid "Manufacturing orders follower" +msgstr "Seguidor de órdenes de fabricación" + +#. module: mrp_production_historical_follower +#: model_terms:ir.ui.view,arch_db:mrp_production_historical_follower.view_users_search +msgid "No production follower" +msgstr "No seguidor de producción" + +#. module: mrp_production_historical_follower +#: model:mail.template,subject:mrp_production_historical_follower.mrp_production_histo_bom1 +msgid "" +"Product ${object.bom_line_movement} in BoM: " +"${object.production_bom_id.name}, for production: " +"${object.production_id.name}." +msgstr "" +"Producto ${object.bom_line_movement} en LdM: " +"${object.production_bom_id.name}, para producción: " +"${object.production_id.name}." + +#. module: mrp_production_historical_follower +#: model:ir.model,name:mrp_production_historical_follower.model_mrp_production +msgid "Production Order" +msgstr "Orden de producción" + +#. module: mrp_production_historical_follower +#: model_terms:ir.ui.view,arch_db:mrp_production_historical_follower.view_users_search +msgid "Production follower" +msgstr "Seguidor de producción" + +#. module: mrp_production_historical_follower +#: model:ir.model.fields,field_description:mrp_production_historical_follower.field_mrp_production__mrp_production_follower_ids +msgid "Production followers" +msgstr "Seguidores de producción" + +#. module: mrp_production_historical_follower +#: model:mail.template,name:mrp_production_historical_follower.mrp_production_historical_scraped +msgid "Scraped product in MRP production" +msgstr "Producto desechado en producción MRP." + +#. module: mrp_production_historical_follower +#: model:mail.template,subject:mrp_production_historical_follower.mrp_production_historical_scraped +msgid "Scraped product in production: ${object.production_id.name}." +msgstr "Producto desechado en producción: ${object.production_id.name}." + +#. module: mrp_production_historical_follower +#: model:ir.model,name:mrp_production_historical_follower.model_res_users +msgid "User" +msgstr "Usuario" diff --git a/mrp_production_historical_follower/i18n/mrp_production_historical_follower.pot b/mrp_production_historical_follower/i18n/mrp_production_historical_follower.pot new file mode 100644 index 000000000..5230ad6ba --- /dev/null +++ b/mrp_production_historical_follower/i18n/mrp_production_historical_follower.pot @@ -0,0 +1,240 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_historical_follower +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-05 05:43+0000\n" +"PO-Revision-Date: 2024-06-05 05:43+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_production_historical_follower +#: model:mail.template,body_html:mrp_production_historical_follower.mrp_production_histo_bom2 +msgid "" +"\n" +"
\n" +"

Hello

\n" +"

The BoM ${object.production_bom_id.name} has been changed by de user: ${object.user_id.name}.

\n" +"

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

\n" +"

${object.bom_line_changes}

\n" +" \n" +"

Thank you very much and good day.

\n" +" \n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Phone: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,body_html:mrp_production_historical_follower.mrp_production_histo_bom1 +msgid "" +"\n" +"
\n" +"

Hello

\n" +"

The product ${object.product_id.name} has been ${object.bom_line_movement} by de user: ${object.user_id.name}, in BoM: ${object.production_bom_id.name}. Initial planned quantity: ${object.programed_qty}.

\n" +"

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

\n" +"

Thank you very much and good day.

\n" +" \n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Phone: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,body_html:mrp_production_historical_follower.mrp_production_historical_add +msgid "" +"\n" +"
\n" +"

Hello

\n" +"

The product ${object.product_id.name} has been add by de user: ${object.user_id.name}. Initial planned quantity: ${object.programed_qty}.

\n" +"

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

\n" +"

Thank you very much and good day.

\n" +" \n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Phone: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,body_html:mrp_production_historical_follower.mrp_production_historical_scraped +msgid "" +"\n" +"
\n" +"

Hello

\n" +"

The product ${object.product_id.name} has been scrapped by de user: ${object.user_id.name}. Initial planned quantity: ${object.programed_qty}, quantity scraped: ${object.scraped_qty}.

\n" +"

Production: ${object.production_id.name}, production state: ${object.production_id.state}.

\n" +"

Thank you very much and good day.

\n" +" \n" +"
\n" +"

\n" +" ${user.company_id.name}

\n" +"
\n" +"
\n" +" \n" +" ${user.company_id.partner_id.sudo().with_context(show_address=True, html_format=True).name_get()[0][1] | safe}\n" +" \n" +" % if user.company_id.phone:\n" +"
\n" +" Phone: ${user.company_id.phone}\n" +"
\n" +" % endif\n" +" % if user.company_id.website:\n" +"
\n" +" Web: ${user.company_id.website}\n" +"
\n" +" %endif\n" +"

\n" +"
\n" +"
\n" +" " +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,name:mrp_production_historical_follower.mrp_production_historical_add +msgid "Add product in MRP production" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,subject:mrp_production_historical_follower.mrp_production_historical_add +msgid "Added product in production: ${object.production_id.name}." +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,name:mrp_production_historical_follower.mrp_production_histo_bom1 +msgid "BoM line changed for MRP production" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,name:mrp_production_historical_follower.mrp_production_histo_bom2 +msgid "BoM line information changed for MRP production" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,subject:mrp_production_historical_follower.mrp_production_histo_bom2 +msgid "" +"Changed BoM: ${object.production_bom_id.name}, for production: " +"${object.production_id.name}." +msgstr "" + +#. module: mrp_production_historical_follower +#: model_terms:ir.ui.view,arch_db:mrp_production_historical_follower.mrp_production_form_view +msgid "Followers" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:ir.model,name:mrp_production_historical_follower.model_mrp_production_historical +msgid "MRP Production historical" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:ir.model.fields,field_description:mrp_production_historical_follower.field_res_users__mrp_production_follower +#: model_terms:ir.ui.view,arch_db:mrp_production_historical_follower.view_users_form +msgid "Manufacturing orders follower" +msgstr "" + +#. module: mrp_production_historical_follower +#: model_terms:ir.ui.view,arch_db:mrp_production_historical_follower.view_users_search +msgid "No production follower" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,subject:mrp_production_historical_follower.mrp_production_histo_bom1 +msgid "" +"Product ${object.bom_line_movement} in BoM: " +"${object.production_bom_id.name}, for production: " +"${object.production_id.name}." +msgstr "" + +#. module: mrp_production_historical_follower +#: model:ir.model,name:mrp_production_historical_follower.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_historical_follower +#: model_terms:ir.ui.view,arch_db:mrp_production_historical_follower.view_users_search +msgid "Production follower" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:ir.model.fields,field_description:mrp_production_historical_follower.field_mrp_production__mrp_production_follower_ids +msgid "Production followers" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,name:mrp_production_historical_follower.mrp_production_historical_scraped +msgid "Scraped product in MRP production" +msgstr "" + +#. module: mrp_production_historical_follower +#: model:mail.template,subject:mrp_production_historical_follower.mrp_production_historical_scraped +msgid "Scraped product in production: ${object.production_id.name}." +msgstr "" + +#. module: mrp_production_historical_follower +#: model:ir.model,name:mrp_production_historical_follower.model_res_users +msgid "User" +msgstr "" diff --git a/mrp_production_historical_follower/models/__init__.py b/mrp_production_historical_follower/models/__init__.py new file mode 100644 index 000000000..9229dfd30 --- /dev/null +++ b/mrp_production_historical_follower/models/__init__.py @@ -0,0 +1,3 @@ +from . import mrp_production_historical +from . import mrp_production +from . import res_users diff --git a/mrp_production_historical_follower/models/mrp_production.py b/mrp_production_historical_follower/models/mrp_production.py new file mode 100644 index 000000000..643b6a773 --- /dev/null +++ b/mrp_production_historical_follower/models/mrp_production.py @@ -0,0 +1,23 @@ +# Copyright 2014 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import api, fields, models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + mrp_production_follower_ids = fields.Many2many( + comodel_name="res.partner", string="Production followers" + ) + + @api.model_create_multi + def create(self, values): + productions = super().create(values) + cond = [("mrp_production_follower", "=", True)] + users = self.env["res.users"].search(cond) + if users: + for production in productions: + production.mrp_production_follower_ids = [ + (6, 0, users.mapped("partner_id").ids) + ] + return productions diff --git a/mrp_production_historical_follower/models/mrp_production_historical.py b/mrp_production_historical_follower/models/mrp_production_historical.py new file mode 100644 index 000000000..b8ae85f07 --- /dev/null +++ b/mrp_production_historical_follower/models/mrp_production_historical.py @@ -0,0 +1,84 @@ +# Copyright 2014 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import api, models + + +class MrpProductionHistorical(models.Model): + _inherit = "mrp.production.historical" + + @api.model + def create(self, vals): + historical = super().create(vals) + if "from_bom_activated" in self.env.context: + historical._send_ldm2_email() + if "bomline_historical_update" in self.env.context: + historical._send_ldm2_email() + if "bomline_historical_noupdate" in self.env.context: + historical._send_ldm_email() + if "scrap_history" in self.env.context: + historical._send_scraped_email() + if "add_historical" in self.env.context: + historical._send_add_email() + return historical + + def _send_scraped_email(self): + template = self.env.ref( + "mrp_production_historical_follower.mrp_production_historical_scraped", + False, + ) + if template: + for partner in self.production_id.mrp_production_follower_ids: + self.send_email_to_follower(template, partner) + + def _send_add_email(self): + template = self.env.ref( + "mrp_production_historical_follower.mrp_production_historical_add", False + ) + if template: + for partner in self.production_id.mrp_production_follower_ids: + self.send_email_to_follower(template, partner) + + def _send_ldm_email(self): + template = self.env.ref( + "mrp_production_historical_follower.mrp_production_histo_bom1", False + ) + if template: + for partner in self.production_id.mrp_production_follower_ids: + self.send_email_to_follower(template, partner) + + def _send_ldm2_email(self): + template = self.env.ref( + "mrp_production_historical_follower.mrp_production_histo_bom2", False + ) + if template: + for partner in self.production_id.mrp_production_follower_ids: + self.send_email_to_follower(template, partner) + + def send_email_to_follower(self, template, partner): + wizard = ( + self.env["mail.compose.message"] + .with_context( + default_composition_mode="mass_mail", + default_template_id=template and template.id or False, + default_use_template=True, + active_id=self.id, + active_ids=self.ids, + active_model="mrp.production.historical", + default_model="mrp.production.historical", + default_res_id=self.id, + force_send=True, + ) + .create( + { + "subject": template.subject, + "body": template.body_html, + "partner_ids": [(6, 0, partner.ids)], + "lang": partner.lang, + } + ) + ) + values = wizard._onchange_template_id( + template.id, "mass_mail", "mrp.production.historical", self.id + )["value"] + wizard.write(values) + wizard.action_send_mail() diff --git a/mrp_production_historical_follower/models/res_users.py b/mrp_production_historical_follower/models/res_users.py new file mode 100644 index 000000000..ff6e0d3c6 --- /dev/null +++ b/mrp_production_historical_follower/models/res_users.py @@ -0,0 +1,32 @@ +# Copyright 2014 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class ResUsers(models.Model): + _inherit = "res.users" + + mrp_production_follower = fields.Boolean( + string="Manufacturing orders follower", default=False, copy=False + ) + + def write(self, values): + result = super().write(values) + if "mrp_production_follower" in values: + self._update_productions_followers() + return result + + def _update_productions_followers(self): + cond = [("mrp_production_follower", "=", True)] + users = self.env["res.users"].search(cond) + if users: + cond = [("state", "not in", ("done", "cancel", "draft"))] + productions = self.env["mrp.production"].search(cond) + if productions: + productions.write( + { + "mrp_production_follower_ids": [ + (6, 0, users.mapped("partner_id").ids) + ] + } + ) diff --git a/mrp_production_historical_follower/views/mrp_production_views.xml b/mrp_production_historical_follower/views/mrp_production_views.xml new file mode 100644 index 000000000..6a48e2e25 --- /dev/null +++ b/mrp_production_historical_follower/views/mrp_production_views.xml @@ -0,0 +1,17 @@ + + + + mrp.production + + + + + + + + + + diff --git a/mrp_production_historical_follower/views/res_users_views.xml b/mrp_production_historical_follower/views/res_users_views.xml new file mode 100644 index 000000000..86d6994df --- /dev/null +++ b/mrp_production_historical_follower/views/res_users_views.xml @@ -0,0 +1,47 @@ + + + + res.users + + + + + + + + + res.users + + + + + + + + + + res.users + + + + + + + + + diff --git a/mrp_production_owner/README.rst b/mrp_production_owner/README.rst new file mode 100644 index 000000000..a0bbd72e2 --- /dev/null +++ b/mrp_production_owner/README.rst @@ -0,0 +1,31 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +==================== +Mrp production owner +==================== + +* New field "Owner" in manufacturing orders. +* At the end of the OF, if the owner field is informed, assign owner in all + production move lines (NOT in the consumption one). + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_production_owner/__init__.py b/mrp_production_owner/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_owner/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_owner/__manifest__.py b/mrp_production_owner/__manifest__.py new file mode 100644 index 000000000..2dcd94ea8 --- /dev/null +++ b/mrp_production_owner/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Production Owner", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "author": "Avanzosc", + "license": "AGPL-3", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "stock_move_line_show_owner", + "mrp", + ], + "data": [ + "views/mrp_production_views.xml", + ], + "installable": True, +} diff --git a/mrp_production_owner/i18n/ca_ES.po b/mrp_production_owner/i18n/ca_ES.po new file mode 100644 index 000000000..2df186a1d --- /dev/null +++ b/mrp_production_owner/i18n/ca_ES.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_owner +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 08:32+0000\n" +"PO-Revision-Date: 2024-07-23 08:32+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_production_owner +#: model:ir.model.fields,field_description:mrp_production_owner.field_mrp_production__owner_id +#: model_terms:ir.ui.view,arch_db:mrp_production_owner.view_mrp_production_filter +msgid "Owner" +msgstr "" + +#. module: mrp_production_owner +#: model:ir.model,name:mrp_production_owner.model_mrp_production +msgid "Production Order" +msgstr "Ordre de producció" diff --git a/mrp_production_owner/i18n/en_GB.po b/mrp_production_owner/i18n/en_GB.po new file mode 100644 index 000000000..eaedcfe35 --- /dev/null +++ b/mrp_production_owner/i18n/en_GB.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_owner +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 08:32+0000\n" +"PO-Revision-Date: 2024-07-23 08:32+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_production_owner +#: model:ir.model.fields,field_description:mrp_production_owner.field_mrp_production__owner_id +#: model_terms:ir.ui.view,arch_db:mrp_production_owner.view_mrp_production_filter +msgid "Owner" +msgstr "" + +#. module: mrp_production_owner +#: model:ir.model,name:mrp_production_owner.model_mrp_production +msgid "Production Order" +msgstr "" diff --git a/mrp_production_owner/i18n/es.po b/mrp_production_owner/i18n/es.po new file mode 100644 index 000000000..24122f389 --- /dev/null +++ b/mrp_production_owner/i18n/es.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_owner +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 08:33+0000\n" +"PO-Revision-Date: 2024-07-23 08:33+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_production_owner +#: model:ir.model.fields,field_description:mrp_production_owner.field_mrp_production__owner_id +#: model_terms:ir.ui.view,arch_db:mrp_production_owner.view_mrp_production_filter +msgid "Owner" +msgstr "Propietario" + +#. module: mrp_production_owner +#: model:ir.model,name:mrp_production_owner.model_mrp_production +msgid "Production Order" +msgstr "Orden de producción" diff --git a/mrp_production_owner/i18n/fr.po b/mrp_production_owner/i18n/fr.po new file mode 100644 index 000000000..dbe88e38f --- /dev/null +++ b/mrp_production_owner/i18n/fr.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_owner +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 08:32+0000\n" +"PO-Revision-Date: 2024-07-23 08:32+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_production_owner +#: model:ir.model.fields,field_description:mrp_production_owner.field_mrp_production__owner_id +#: model_terms:ir.ui.view,arch_db:mrp_production_owner.view_mrp_production_filter +msgid "Owner" +msgstr "" + +#. module: mrp_production_owner +#: model:ir.model,name:mrp_production_owner.model_mrp_production +msgid "Production Order" +msgstr "Ordre de production" diff --git a/mrp_production_owner/i18n/mrp_production_owner.pot b/mrp_production_owner/i18n/mrp_production_owner.pot new file mode 100644 index 000000000..eaedcfe35 --- /dev/null +++ b/mrp_production_owner/i18n/mrp_production_owner.pot @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_owner +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 08:32+0000\n" +"PO-Revision-Date: 2024-07-23 08:32+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_production_owner +#: model:ir.model.fields,field_description:mrp_production_owner.field_mrp_production__owner_id +#: model_terms:ir.ui.view,arch_db:mrp_production_owner.view_mrp_production_filter +msgid "Owner" +msgstr "" + +#. module: mrp_production_owner +#: model:ir.model,name:mrp_production_owner.model_mrp_production +msgid "Production Order" +msgstr "" diff --git a/mrp_production_owner/models/__init__.py b/mrp_production_owner/models/__init__.py new file mode 100644 index 000000000..a9e5f13e4 --- /dev/null +++ b/mrp_production_owner/models/__init__.py @@ -0,0 +1 @@ +from . import mrp_production diff --git a/mrp_production_owner/models/mrp_production.py b/mrp_production_owner/models/mrp_production.py new file mode 100644 index 000000000..9e61208ff --- /dev/null +++ b/mrp_production_owner/models/mrp_production.py @@ -0,0 +1,30 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + owner_id = fields.Many2one( + string="Owner", + comodel_name="res.partner", + check_company=True, + copy=False, + ) + + def button_mark_done(self): + result = super().button_mark_done() + for production in self.filtered(lambda x: x.state == "done" and x.owner_id): + for move in production.move_finished_ids: + move.move_line_ids.write({"owner_id": production.owner_id.id}) + return result + + def write(self, vals): + result = super().write(vals) + if "owner_id" in vals: + for production in self.filtered(lambda x: x.state == "done"): + owner = vals.get("owner_id", False) + for move in production.move_finished_ids: + move.move_line_ids.write({"owner_id": owner}) + return result diff --git a/mrp_production_owner/views/mrp_production_views.xml b/mrp_production_owner/views/mrp_production_views.xml new file mode 100644 index 000000000..97ed280db --- /dev/null +++ b/mrp_production_owner/views/mrp_production_views.xml @@ -0,0 +1,40 @@ + + + + mrp.production + + + + + + + + + + mrp.production + + + + + + + + + + mrp.production + + + + + + + + + + + diff --git a/mrp_production_report/README.rst b/mrp_production_report/README.rst new file mode 100644 index 000000000..5751b62f9 --- /dev/null +++ b/mrp_production_report/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +===================== +Mrp production report +===================== + +* In manufacturing order report print this fields: "Scheduled Date", and "BoM". + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_production_report/__init__.py b/mrp_production_report/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_report/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_report/__manifest__.py b/mrp_production_report/__manifest__.py new file mode 100644 index 000000000..099ad227f --- /dev/null +++ b/mrp_production_report/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Production Report", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC,", + "license": "AGPL-3", + "summary": "BoM notes", + "depends": [ + "mrp", + ], + "data": ["report/mrp_production_report.xml"], + "installable": True, +} diff --git a/mrp_production_report/i18n/es.po b/mrp_production_report/i18n/es.po new file mode 100644 index 000000000..c654133d2 --- /dev/null +++ b/mrp_production_report/i18n/es.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-10 06:55+0000\n" +"PO-Revision-Date: 2024-06-10 06:55+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_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder +msgid "BoM:
" +msgstr "LdM:
" + +#. module: mrp_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder +msgid "Date Start" +msgstr "Fecha inicio" + +#. module: mrp_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder +msgid "Scheduled Date:
" +msgstr "Fecha prevista:
" + +#. module: mrp_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components +msgid "Location" +msgstr "Ubicación" + +#. module: mrp_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components +msgid "Lots" +msgstr "Lotes" + +#. module: mrp_production_report +#: model:ir.model,name:mrp_production_report.model_stock_move +msgid "Stock Move" +msgstr "Movimiento de existencias" diff --git a/mrp_production_report/i18n/mrp_production_report.pot b/mrp_production_report/i18n/mrp_production_report.pot new file mode 100644 index 000000000..44ec0a232 --- /dev/null +++ b/mrp_production_report/i18n/mrp_production_report.pot @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-10 06:55+0000\n" +"PO-Revision-Date: 2024-06-10 06:55+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_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder +msgid "BoM:
" +msgstr "" + +#. module: mrp_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder +msgid "Date Start" +msgstr "" + +#. module: mrp_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrporder +msgid "Scheduled Date:
" +msgstr "" + +#. module: mrp_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components +msgid "Location" +msgstr "" + +#. module: mrp_production_report +#: model_terms:ir.ui.view,arch_db:mrp_production_report.report_mrp_production_components +msgid "Lots" +msgstr "" + +#. module: mrp_production_report +#: model:ir.model,name:mrp_production_report.model_stock_move +msgid "Stock Move" +msgstr "" diff --git a/mrp_production_report/models/__init__.py b/mrp_production_report/models/__init__.py new file mode 100644 index 000000000..6bda2d242 --- /dev/null +++ b/mrp_production_report/models/__init__.py @@ -0,0 +1 @@ +from . import stock_move diff --git a/mrp_production_report/models/stock_move.py b/mrp_production_report/models/stock_move.py new file mode 100644 index 000000000..ef49360a5 --- /dev/null +++ b/mrp_production_report/models/stock_move.py @@ -0,0 +1,18 @@ +# Copyright 2014 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import models + + +class StockMove(models.Model): + _inherit = "stock.move" + + def _get_lots_mrp_production_report(self): + lots = "" + lines = self.move_line_ids.filtered(lambda x: x.lot_id) + for line in lines: + lots = ( + line.lot_id.name + if not lots + else "{}, {}".format(lots, line.lot_id.name) + ) + return lots diff --git a/mrp_production_report/report/mrp_production_report.xml b/mrp_production_report/report/mrp_production_report.xml new file mode 100644 index 000000000..9e4eff8cb --- /dev/null +++ b/mrp_production_report/report/mrp_production_report.xml @@ -0,0 +1,67 @@ + + + + + + diff --git a/mrp_production_report_bom_version/README.rst b/mrp_production_report_bom_version/README.rst new file mode 100644 index 000000000..ba03d4812 --- /dev/null +++ b/mrp_production_report_bom_version/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +================================= +Mrp production report bom version +================================= + +* In manufacturing order report print "BoM Version". + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_production_report_bom_version/__init__.py b/mrp_production_report_bom_version/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mrp_production_report_bom_version/__manifest__.py b/mrp_production_report_bom_version/__manifest__.py new file mode 100644 index 000000000..cfb840625 --- /dev/null +++ b/mrp_production_report_bom_version/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Production Report Bom Version", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC,", + "license": "AGPL-3", + "summary": "BoM notes", + "depends": ["mrp_production_report", "mrp_bom_version"], + "data": ["report/mrp_production_report.xml"], + "installable": True, + "auto_install": True, +} diff --git a/mrp_production_report_bom_version/i18n/es.po b/mrp_production_report_bom_version/i18n/es.po new file mode 100644 index 000000000..36fefa4ec --- /dev/null +++ b/mrp_production_report_bom_version/i18n/es.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_report_bom_version +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-06 11:45+0000\n" +"PO-Revision-Date: 2024-06-06 11:45+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_production_report_bom_version +#: model_terms:ir.ui.view,arch_db:mrp_production_report_bom_version.report_mrporder +msgid "BoM Version:
" +msgstr "Versión LdM:
" diff --git a/mrp_production_report_bom_version/i18n/mrp_production_report_bom_version.pot b/mrp_production_report_bom_version/i18n/mrp_production_report_bom_version.pot new file mode 100644 index 000000000..05cb8a334 --- /dev/null +++ b/mrp_production_report_bom_version/i18n/mrp_production_report_bom_version.pot @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_report_bom_version +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-06 11:45+0000\n" +"PO-Revision-Date: 2024-06-06 11:45+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_production_report_bom_version +#: model_terms:ir.ui.view,arch_db:mrp_production_report_bom_version.report_mrporder +msgid "BoM Version:
" +msgstr "" diff --git a/mrp_production_report_bom_version/report/mrp_production_report.xml b/mrp_production_report_bom_version/report/mrp_production_report.xml new file mode 100644 index 000000000..5eecfc9ae --- /dev/null +++ b/mrp_production_report_bom_version/report/mrp_production_report.xml @@ -0,0 +1,15 @@ + + + + diff --git a/mrp_production_report_note/README.rst b/mrp_production_report_note/README.rst new file mode 100644 index 000000000..92a02be46 --- /dev/null +++ b/mrp_production_report_note/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========================== +Mrp production report note +========================== + +* In manufacturing order report print "Notes". + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_production_report_note/__init__.py b/mrp_production_report_note/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mrp_production_report_note/__manifest__.py b/mrp_production_report_note/__manifest__.py new file mode 100644 index 000000000..03a36d557 --- /dev/null +++ b/mrp_production_report_note/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Production Report Note", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC,", + "license": "AGPL-3", + "summary": "BoM notes", + "depends": ["mrp", "mrp_production_note"], + "data": ["report/mrp_production_report.xml"], + "installable": True, + "auto_install": True, +} diff --git a/mrp_production_report_note/i18n/es.po b/mrp_production_report_note/i18n/es.po new file mode 100644 index 000000000..861db2f57 --- /dev/null +++ b/mrp_production_report_note/i18n/es.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_report_note +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-10 07:44+0000\n" +"PO-Revision-Date: 2024-06-10 07:44+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_production_report_note +#: model_terms:ir.ui.view,arch_db:mrp_production_report_note.report_mrporder +msgid "Notes:
" +msgstr "Notas:
" diff --git a/mrp_production_report_note/i18n/mrp_production_report_note.pot b/mrp_production_report_note/i18n/mrp_production_report_note.pot new file mode 100644 index 000000000..de8cb8dde --- /dev/null +++ b/mrp_production_report_note/i18n/mrp_production_report_note.pot @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_report_note +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-10 07:44+0000\n" +"PO-Revision-Date: 2024-06-10 07:44+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_production_report_note +#: model_terms:ir.ui.view,arch_db:mrp_production_report_note.report_mrporder +msgid "Notes:
" +msgstr "" diff --git a/mrp_production_report_note/report/mrp_production_report.xml b/mrp_production_report_note/report/mrp_production_report.xml new file mode 100644 index 000000000..faedca401 --- /dev/null +++ b/mrp_production_report_note/report/mrp_production_report.xml @@ -0,0 +1,11 @@ + + + + diff --git a/mrp_production_report_sale_info/README.rst b/mrp_production_report_sale_info/README.rst new file mode 100644 index 000000000..6ea361018 --- /dev/null +++ b/mrp_production_report_sale_info/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=============================== +Mrp production report sale info +=============================== + +* In manufacturing order report print "Sale Order". + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_production_report_sale_info/__init__.py b/mrp_production_report_sale_info/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mrp_production_report_sale_info/__manifest__.py b/mrp_production_report_sale_info/__manifest__.py new file mode 100644 index 000000000..003593221 --- /dev/null +++ b/mrp_production_report_sale_info/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Production Report Sale Info", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "website": "https://github.com/avanzosc/mrp-addons", + "author": "AvanzOSC,", + "license": "AGPL-3", + "summary": "BoM notes", + "depends": ["mrp_production_report", "mrp_sale_info"], + "data": ["report/mrp_production_report.xml"], + "installable": True, + "auto_install": True, +} diff --git a/mrp_production_report_sale_info/i18n/es.po b/mrp_production_report_sale_info/i18n/es.po new file mode 100644 index 000000000..1c963ccfe --- /dev/null +++ b/mrp_production_report_sale_info/i18n/es.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_report_sale_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-06 11:47+0000\n" +"PO-Revision-Date: 2024-06-06 11:47+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_production_report_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_production_report_sale_info.report_mrporder +msgid "Sale Order:
" +msgstr "Pedido Venta:
" diff --git a/mrp_production_report_sale_info/i18n/mrp_production_report_sale_info.pot b/mrp_production_report_sale_info/i18n/mrp_production_report_sale_info.pot new file mode 100644 index 000000000..0eac9a611 --- /dev/null +++ b/mrp_production_report_sale_info/i18n/mrp_production_report_sale_info.pot @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_report_sale_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-06-06 11:46+0000\n" +"PO-Revision-Date: 2024-06-06 11:46+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_production_report_sale_info +#: model_terms:ir.ui.view,arch_db:mrp_production_report_sale_info.report_mrporder +msgid "Sale Order:
" +msgstr "" diff --git a/mrp_production_report_sale_info/report/mrp_production_report.xml b/mrp_production_report_sale_info/report/mrp_production_report.xml new file mode 100644 index 000000000..a04c5fa13 --- /dev/null +++ b/mrp_production_report_sale_info/report/mrp_production_report.xml @@ -0,0 +1,11 @@ + + + + diff --git a/mrp_production_split_finished_product_by_serials/README.rst b/mrp_production_split_finished_product_by_serials/README.rst new file mode 100644 index 000000000..99ce35acf --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +================================================ +Mrp production split finished product by serials +================================================ + +If the product to be produced has a "tracking" of "By unique serial number", +"Product Moves (Stock Move Line)" will be created for one unit, with a single +lot. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ +* Ana Juaristi +* Alfredo de la Fuente + +Do not contact contributors directly about support or help with technical issues. diff --git a/mrp_production_split_finished_product_by_serials/__init__.py b/mrp_production_split_finished_product_by_serials/__init__.py new file mode 100644 index 000000000..cc6b6354a --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/__init__.py @@ -0,0 +1,2 @@ +from . import models +from .hooks import post_init_hook diff --git a/mrp_production_split_finished_product_by_serials/__manifest__.py b/mrp_production_split_finished_product_by_serials/__manifest__.py new file mode 100644 index 000000000..ced189f33 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2022 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Mrp Production Split Finished Product By Serials", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "license": "AGPL-3", + "author": "AvanzOSC", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "mrp", + "stock", + "uom", + ], + "data": [ + "views/mrp_production_views.xml", + ], + "installable": True, + "post_init_hook": "post_init_hook", +} diff --git a/mrp_production_split_finished_product_by_serials/hooks.py b/mrp_production_split_finished_product_by_serials/hooks.py new file mode 100644 index 000000000..cc2b3adc1 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/hooks.py @@ -0,0 +1,27 @@ +# Copyright 2024 Oihane Crucelaegui - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +import logging + +try: + from openupgradelib import openupgrade +except Exception: + from odoo.tools import sql as openupgrade + + +_logger = logging.getLogger(__name__) + + +def post_init_hook(cr, registry): + """ + Add production lot name as field + """ + openupgrade.logged_query( + cr, + """ + UPDATE mrp_production m + SET serial_lot_name = ( + SELECT name FROM stock_lot l WHERE l.id = m.lot_producing_id LIMIT 1) + WHERE lot_producing_id IS NOT NULL; + """, + ) diff --git a/mrp_production_split_finished_product_by_serials/i18n/ca_ES.po b/mrp_production_split_finished_product_by_serials/i18n/ca_ES.po new file mode 100644 index 000000000..e7d6c6014 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/ca_ES.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-22 06:51+0000\n" +"PO-Revision-Date: 2024-07-22 06:51+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial Quantity To Produce" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_lot +msgid "Lot/Serial" +msgstr "Lot/núm. de sèrie" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "Unitat de mesura del producte" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "Ordre de producció" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__serial_lot_name +msgid "Serial Lot Name" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model_terms:ir.ui.view,arch_db:mrp_production_split_finished_product_by_serials.mrp_production_form_view +msgid "Total Quantity" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__total_produced_qty +msgid "Total Quantity Produced" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#. odoo-python +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#, python-format +msgid "You must introduce the serial lot name." +msgstr "" diff --git a/mrp_production_split_finished_product_by_serials/i18n/en_GB.po b/mrp_production_split_finished_product_by_serials/i18n/en_GB.po new file mode 100644 index 000000000..9ffc606fe --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/en_GB.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-22 06:51+0000\n" +"PO-Revision-Date: 2024-07-22 06:51+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial Quantity To Produce" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_lot +msgid "Lot/Serial" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__serial_lot_name +msgid "Serial Lot Name" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model_terms:ir.ui.view,arch_db:mrp_production_split_finished_product_by_serials.mrp_production_form_view +msgid "Total Quantity" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__total_produced_qty +msgid "Total Quantity Produced" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#. odoo-python +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#, python-format +msgid "You must introduce the serial lot name." +msgstr "" diff --git a/mrp_production_split_finished_product_by_serials/i18n/en_US.po b/mrp_production_split_finished_product_by_serials/i18n/en_US.po new file mode 100644 index 000000000..2babade73 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/en_US.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-09 09:43+0000\n" +"PO-Revision-Date: 2022-08-09 09:43+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom__display_name +msgid "Display Name" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom__id +msgid "ID" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial quantity to produce" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_production_lot +msgid "Lot/Serial" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "" diff --git a/mrp_production_split_finished_product_by_serials/i18n/es.po b/mrp_production_split_finished_product_by_serials/i18n/es.po new file mode 100644 index 000000000..78c17539c --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/es.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-22 06:52+0000\n" +"PO-Revision-Date: 2024-07-22 06:52+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial Quantity To Produce" +msgstr "Cantidad inicial a producir" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_lot +msgid "Lot/Serial" +msgstr "Lote/Número de serie" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "Unidad de medida del producto" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "Orden de producción" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "Cantidades" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__serial_lot_name +msgid "Serial Lot Name" +msgstr "Nombre serie lote" + +#. module: mrp_production_split_finished_product_by_serials +#: model_terms:ir.ui.view,arch_db:mrp_production_split_finished_product_by_serials.mrp_production_form_view +msgid "Total Quantity" +msgstr "Total Cantidad" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__total_produced_qty +msgid "Total Quantity Produced" +msgstr "Total cantidad producida" + +#. module: mrp_production_split_finished_product_by_serials +#. odoo-python +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#, python-format +msgid "You must introduce the serial lot name." +msgstr "Debe de intorudicr el nombre serie lote." diff --git a/mrp_production_split_finished_product_by_serials/i18n/fr.po b/mrp_production_split_finished_product_by_serials/i18n/fr.po new file mode 100644 index 000000000..9eec4e7af --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/fr.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-22 06:52+0000\n" +"PO-Revision-Date: 2024-07-22 06:52+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial Quantity To Produce" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_lot +msgid "Lot/Serial" +msgstr "Lot/série" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "Unité de mesure de produit" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "Ordre de production" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "Quantités" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__serial_lot_name +msgid "Serial Lot Name" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model_terms:ir.ui.view,arch_db:mrp_production_split_finished_product_by_serials.mrp_production_form_view +msgid "Total Quantity" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__total_produced_qty +msgid "Total Quantity Produced" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#. odoo-python +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#, python-format +msgid "You must introduce the serial lot name." +msgstr "" diff --git a/mrp_production_split_finished_product_by_serials/i18n/it.po b/mrp_production_split_finished_product_by_serials/i18n/it.po new file mode 100644 index 000000000..e4e37aff8 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/it.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-09 09:43+0000\n" +"PO-Revision-Date: 2022-08-09 09:43+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom__id +msgid "ID" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial quantity to produce" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_production_lot +msgid "Lot/Serial" +msgstr "Lotto/Serie" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "Unità di Misura Prodotto" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "Ordine di produzione" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "Quantità" diff --git a/mrp_production_split_finished_product_by_serials/i18n/mrp_production_split_finished_product_by_serials.pot b/mrp_production_split_finished_product_by_serials/i18n/mrp_production_split_finished_product_by_serials.pot new file mode 100644 index 000000000..0905adabd --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/mrp_production_split_finished_product_by_serials.pot @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-22 06:50+0000\n" +"PO-Revision-Date: 2024-07-22 06:50+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial Quantity To Produce" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_lot +msgid "Lot/Serial" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__serial_lot_name +msgid "Serial Lot Name" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model_terms:ir.ui.view,arch_db:mrp_production_split_finished_product_by_serials.mrp_production_form_view +msgid "Total Quantity" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__total_produced_qty +msgid "Total Quantity Produced" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#. odoo-python +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#: code:addons/mrp_production_split_finished_product_by_serials/models/mrp_production.py:0 +#, python-format +msgid "You must introduce the serial lot name." +msgstr "" diff --git a/mrp_production_split_finished_product_by_serials/i18n/pt.po b/mrp_production_split_finished_product_by_serials/i18n/pt.po new file mode 100644 index 000000000..4b45233f6 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/pt.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-09 09:44+0000\n" +"PO-Revision-Date: 2022-08-09 09:44+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom__display_name +msgid "Display Name" +msgstr "Nome" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom__id +msgid "ID" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial quantity to produce" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom____last_update +msgid "Last Modified on" +msgstr "Última Modificação em" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_production_lot +msgid "Lot/Serial" +msgstr "Lote/Séria" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "Unidade de medida do produto" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "Ordem de Produção" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "Cabazes" diff --git a/mrp_production_split_finished_product_by_serials/i18n/zh_CN.po b/mrp_production_split_finished_product_by_serials/i18n/zh_CN.po new file mode 100644 index 000000000..f4cb8f5b3 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/i18n/zh_CN.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_by_serials +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-09 09:43+0000\n" +"PO-Revision-Date: 2022-08-09 09:43+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_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant__display_name +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom__display_name +msgid "Display Name" +msgstr "显示名称" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant__id +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom__id +msgid "ID" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production__initial_product_qty +msgid "Initial quantity to produce" +msgstr "" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_mrp_production____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_production_lot____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_stock_quant____last_update +#: model:ir.model.fields,field_description:mrp_production_split_finished_product_by_serials.field_uom_uom____last_update +msgid "Last Modified on" +msgstr "最后修改日" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_production_lot +msgid "Lot/Serial" +msgstr "批次/序列号" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_uom_uom +msgid "Product Unit of Measure" +msgstr "产品计量单位" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_mrp_production +msgid "Production Order" +msgstr "生产订单" + +#. module: mrp_production_split_finished_product_by_serials +#: model:ir.model,name:mrp_production_split_finished_product_by_serials.model_stock_quant +msgid "Quants" +msgstr "份" diff --git a/mrp_production_split_finished_product_by_serials/models/__init__.py b/mrp_production_split_finished_product_by_serials/models/__init__.py new file mode 100644 index 000000000..188afbe52 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/models/__init__.py @@ -0,0 +1,4 @@ +from . import mrp_production +from . import stock_lot +from . import uom_uom +from . import stock_quant diff --git a/mrp_production_split_finished_product_by_serials/models/mrp_production.py b/mrp_production_split_finished_product_by_serials/models/mrp_production.py new file mode 100644 index 000000000..b3964aa18 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/models/mrp_production.py @@ -0,0 +1,256 @@ +# Copyright 2022 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import _, api, exceptions, fields, models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + initial_product_qty = fields.Float( + compute="_compute_total_produced_qty", + string="Initial Quantity To Produce", + digits="Product Unit of Measure", + ) + total_produced_qty = fields.Float( + compute="_compute_total_produced_qty", + string="Total Quantity Produced", + digits="Product Unit of Measure", + ) + serial_lot_name = fields.Char( + copy=False, + ) + + @api.onchange("lot_producing_id") + def _onchange_lot_producing(self): + res = super()._onchange_lot_producing() + self.serial_lot_name = self.lot_producing_id.name + if res is not True: + return res + + @api.depends( + "procurement_group_id.mrp_production_ids", + "workorder_ids.state", + "move_finished_ids", + "move_finished_ids.quantity_done", + "procurement_group_id.mrp_production_ids.workorder_ids.state", + "procurement_group_id.mrp_production_ids.move_finished_ids", + "procurement_group_id.mrp_production_ids.move_finished_ids.quantity_done", + ) + def _compute_total_produced_qty(self): + for production in self: + grouped_productions = production.mapped( + "procurement_group_id.mrp_production_ids" + ) + production.total_produced_qty = sum( + grouped_productions.mapped("qty_produced") + ) + production.initial_product_qty = sum( + grouped_productions.mapped("product_qty") + ) + + def _get_backorder_mo_vals(self): + values = super()._get_backorder_mo_vals() + values.update( + { + "serial_lot_name": self.serial_lot_name, + } + ) + return values + + def _split_productions( + self, amounts=False, cancel_remaining_qty=False, set_consumed_qty=False + ): + productions = super()._split_productions( + amounts=amounts, + cancel_remaining_qty=cancel_remaining_qty, + set_consumed_qty=set_consumed_qty, + ) + for production in productions.filtered( + lambda b: b.product_id.tracking == "serial" + ): + production.qty_producing = production.product_qty + return productions + + def _get_lot_name(self, number=1): + self.ensure_one() + if ( + self.product_tracking == "serial" + and self.state not in ("done", "cancel") + and not self.serial_lot_name + ): + if "from_product_lot_sequence" not in self.env.context or ( + "from_product_lot_sequence" in self.env.context + and not self.product_id.lot_sequence_id + ): + raise exceptions.UserError(_("You must introduce the serial lot name.")) + number = int(number) + lot_counter_length = max(len(str(int(self.initial_product_qty))), 3) + lot_name = self.serial_lot_name + base_lot_name = ( + lot_name[: -(lot_counter_length + 1)] if "x" in lot_name else lot_name + ) + new_lot_name = "{}x{}".format( + base_lot_name, str(number).zfill(lot_counter_length) + ) + return new_lot_name + + def action_generate_serial(self): + if ( + "from_product_lot_sequence" in self.env.context + and "from_button_mark_done" in self.env.context + and self.product_id.lot_sequence_id + and not self.serial_lot_name + ): + return True + + if ( + self.product_tracking == "serial" + and self.state not in ("done", "cancel") + and not self.serial_lot_name + ): + if "from_product_lot_sequence" not in self.env.context or ( + "from_product_lot_sequence" in self.env.context + and not self.product_id.lot_sequence_id + ): + raise exceptions.UserError(_("You must introduce the serial lot name.")) + if self.serial_lot_name: + lot_name = self._get_lot_name(self.total_produced_qty + 1) + return super( + MrpProduction, + self.with_context( + default_name=lot_name, qty_twith_serial=self.qty_producing + ), + ).action_generate_serial() + else: + return super( + MrpProduction, + self.with_context(qty_twith_serial=self.qty_producing), + ).action_generate_serial() + + def _set_qty_producing(self): + if self.product_id.tracking and self.product_id.tracking == "serial": + return super( + MrpProduction, self.with_context(qty_twith_serial=self.qty_producing) + )._set_qty_producing() + else: + return super()._set_qty_producing() + + def button_mark_done(self): + if self.product_tracking == "serial": + if not self.lot_producing_id: + if ( + "from_product_lot_sequence" not in self.env.context + or ( + "from_product_lot_sequence" in self.env.context + and not self.product_id.lot_sequence_id + ) + or ( + "from_product_lot_sequence" in self.env.context + and self.serial_lot_name + ) + ): + lot_name = self._get_lot_name(self.total_produced_qty + 1) + self.lot_producing_id = self.env["stock.lot"].create( + { + "name": lot_name, + "product_id": self.product_id.id, + "company_id": self.company_id.id, + } + ) + return super( + MrpProduction, self.with_context(with_tracking_serial=True) + ).button_mark_done() + else: + return super().button_mark_done() + + def _post_inventory(self, cancel_backorder=False): + for production in self.filtered(lambda p: p.product_id.tracking == "serial"): + production.create_lot_for_tracking_serial() + result = super()._post_inventory(cancel_backorder=cancel_backorder) + return result + + def create_lot_for_tracking_serial(self): + self.ensure_one() + moves = self.move_finished_ids.filtered( + lambda x: x.product_id == self.product_id + ) + lot_obj = self.env["stock.lot"] + offset = self.total_produced_qty or 0 + cont = offset + for move in moves: + qty_done = move.product_uom_qty + offset + move_lines_commands = [] + for move_line in move.move_line_ids: + cont += 1 + move_lines_commands.append( + ( + 1, + move_line.id, + { + "qty_done": 1.0, + }, + ) + ) + while cont < qty_done: + cont += 1 + if ( + "from_product_lot_sequence" not in self.env.context + or ( + "from_product_lot_sequence" in self.env.context + and not self.product_id.lot_sequence_id + ) + or ( + "from_product_lot_sequence" in self.env.context + and self.serial_lot_name + ) + ): + lot_name = self._get_lot_name(cont) + lot = lot_obj.search([("name", "=", lot_name)]) + if not lot: + lot = lot_obj.create( + { + "name": lot_name, + "product_id": move.product_id.id, + "company_id": self.company_id.id, + } + ) + else: + lot = lot_obj.create( + { + "product_id": move.product_id.id, + "company_id": self.company_id.id, + } + ) + if cont == 1 and not self.lot_producing_id: + self.lot_producing_id = lot.id + move_line_vals = move._prepare_move_line_vals(quantity=0) + move_line_vals["lot_id"] = lot.id + move_line_vals["lot_name"] = lot.name + move_line_vals["product_uom_id"] = move.product_id.uom_id.id + move_line_vals["qty_done"] = 1 + move_lines_commands.append((0, 0, move_line_vals)) + move.with_context(bypass_reservation_update=True).write( + { + "move_line_ids": move_lines_commands, + } + ) + + def _prepare_stock_lot_values(self): + self.ensure_one() + if self.product_id.tracking == "lot": + return super()._prepare_stock_lot_values() + if "default_name" in self.env.context: + return { + "product_id": self.product_id.id, + "company_id": self.company_id.id, + "name": self.env.context.get("default_name"), + } + if ( + "from_product_lot_sequence" in self.env.context + and self.product_id.lot_sequence_id + ): + return { + "product_id": self.product_id.id, + "company_id": self.company_id.id, + } + return super()._prepare_stock_lot_values() diff --git a/mrp_production_split_finished_product_by_serials/models/stock_lot.py b/mrp_production_split_finished_product_by_serials/models/stock_lot.py new file mode 100644 index 000000000..0d7eee109 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/models/stock_lot.py @@ -0,0 +1,16 @@ +# Copyright 2022 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import api, models + + +class StockLot(models.Model): + _inherit = "stock.lot" + + @api.model_create_multi + def create(self, vals_list): + if self.env.context.get("same_subproduct", False): + vals_list[0]["name"] = "TEMP - 001" + lot = super(StockLot, self.with_context(mail_create_nosubscribe=True)).create( + vals_list + ) + return lot diff --git a/mrp_production_split_finished_product_by_serials/models/stock_quant.py b/mrp_production_split_finished_product_by_serials/models/stock_quant.py new file mode 100644 index 000000000..39d902135 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/models/stock_quant.py @@ -0,0 +1,12 @@ +# Copyright 2022 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import api, models + + +class StockQuant(models.Model): + _inherit = "stock.quant" + + @api.constrains("quantity") + def check_quantity(self): + if "with_tracking_serial" not in self.env.context: + return super().check_quantity() diff --git a/mrp_production_split_finished_product_by_serials/models/uom_uom.py b/mrp_production_split_finished_product_by_serials/models/uom_uom.py new file mode 100644 index 000000000..e96cd78cc --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/models/uom_uom.py @@ -0,0 +1,27 @@ +# Copyright 2022 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import models + + +class UomUom(models.Model): + _inherit = "uom.uom" + + def _compute_quantity( + self, qty, to_unit, round=True, rounding_method="UP", raise_if_failure=True + ): + if "qty_twith_serial" in self.env.context: + return super()._compute_quantity( + self.env.context.get("qty_twith_serial"), + to_unit, + round=round, + rounding_method=rounding_method, + raise_if_failure=raise_if_failure, + ) + else: + return super()._compute_quantity( + qty, + to_unit, + round=round, + rounding_method=rounding_method, + raise_if_failure=raise_if_failure, + ) diff --git a/mrp_production_split_finished_product_by_serials/views/mrp_production_views.xml b/mrp_production_split_finished_product_by_serials/views/mrp_production_views.xml new file mode 100644 index 000000000..11ac2d598 --- /dev/null +++ b/mrp_production_split_finished_product_by_serials/views/mrp_production_views.xml @@ -0,0 +1,34 @@ + + + + mrp.production + + + + + + + + + + mrp.production + + + + + diff --git a/mrp_production_split_finished_product_lot_sequence/README.rst b/mrp_production_split_finished_product_lot_sequence/README.rst new file mode 100644 index 000000000..13db9d20a --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/README.rst @@ -0,0 +1,29 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +================================================== +Mrp production split finished product lot sequence +================================================== + +If the product to be produced has a "tracking" of "By unique serial number", +"Product Moves (Stock Move Line)" will be created for one unit, with a single +lot, using product sequence. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ +* Ana Juaristi +* Alfredo de la Fuente + +Do not contact contributors directly about support or help with technical issues. diff --git a/mrp_production_split_finished_product_lot_sequence/__init__.py b/mrp_production_split_finished_product_lot_sequence/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_production_split_finished_product_lot_sequence/__manifest__.py b/mrp_production_split_finished_product_lot_sequence/__manifest__.py new file mode 100644 index 000000000..447228379 --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Mrp Production Split Finished Product Lot Sequence", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "license": "AGPL-3", + "author": "AvanzOSC", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "mrp_production_split_finished_product_by_serials", + "product_lot_sequence", + ], + "data": [], + "installable": True, + "auto_install": True, +} diff --git a/mrp_production_split_finished_product_lot_sequence/i18n/ca_ES.po b/mrp_production_split_finished_product_lot_sequence/i18n/ca_ES.po new file mode 100644 index 000000000..3e62e7986 --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/i18n/ca_ES.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_lot_sequence +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-08-07 07:11+0000\n" +"PO-Revision-Date: 2024-08-07 07:11+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_production_split_finished_product_lot_sequence +#: model:ir.model,name:mrp_production_split_finished_product_lot_sequence.model_mrp_production +msgid "Production Order" +msgstr "Ordre de producció" diff --git a/mrp_production_split_finished_product_lot_sequence/i18n/en_GB.po b/mrp_production_split_finished_product_lot_sequence/i18n/en_GB.po new file mode 100644 index 000000000..575cd1434 --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/i18n/en_GB.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_lot_sequence +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-08-07 07:11+0000\n" +"PO-Revision-Date: 2024-08-07 07:11+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_production_split_finished_product_lot_sequence +#: model:ir.model,name:mrp_production_split_finished_product_lot_sequence.model_mrp_production +msgid "Production Order" +msgstr "" diff --git a/mrp_production_split_finished_product_lot_sequence/i18n/es.po b/mrp_production_split_finished_product_lot_sequence/i18n/es.po new file mode 100644 index 000000000..61abee5ee --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/i18n/es.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_lot_sequence +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-08-07 07:12+0000\n" +"PO-Revision-Date: 2024-08-07 07:12+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_production_split_finished_product_lot_sequence +#: model:ir.model,name:mrp_production_split_finished_product_lot_sequence.model_mrp_production +msgid "Production Order" +msgstr "Orden de producción" diff --git a/mrp_production_split_finished_product_lot_sequence/i18n/fr.po b/mrp_production_split_finished_product_lot_sequence/i18n/fr.po new file mode 100644 index 000000000..30fe0734d --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/i18n/fr.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_lot_sequence +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-08-07 07:11+0000\n" +"PO-Revision-Date: 2024-08-07 07:11+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_production_split_finished_product_lot_sequence +#: model:ir.model,name:mrp_production_split_finished_product_lot_sequence.model_mrp_production +msgid "Production Order" +msgstr "Ordre de production" diff --git a/mrp_production_split_finished_product_lot_sequence/i18n/mrp_production_split_finished_product_lot_sequence.pot b/mrp_production_split_finished_product_lot_sequence/i18n/mrp_production_split_finished_product_lot_sequence.pot new file mode 100644 index 000000000..de8e16bc7 --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/i18n/mrp_production_split_finished_product_lot_sequence.pot @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_production_split_finished_product_lot_sequence +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-08-07 07:10+0000\n" +"PO-Revision-Date: 2024-08-07 07:10+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_production_split_finished_product_lot_sequence +#: model:ir.model,name:mrp_production_split_finished_product_lot_sequence.model_mrp_production +msgid "Production Order" +msgstr "" diff --git a/mrp_production_split_finished_product_lot_sequence/models/__init__.py b/mrp_production_split_finished_product_lot_sequence/models/__init__.py new file mode 100644 index 000000000..a9e5f13e4 --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/models/__init__.py @@ -0,0 +1 @@ +from . import mrp_production diff --git a/mrp_production_split_finished_product_lot_sequence/models/mrp_production.py b/mrp_production_split_finished_product_lot_sequence/models/mrp_production.py new file mode 100644 index 000000000..830976651 --- /dev/null +++ b/mrp_production_split_finished_product_lot_sequence/models/mrp_production.py @@ -0,0 +1,26 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import models + + +class MrpProduction(models.Model): + _inherit = "mrp.production" + + def action_generate_serial(self): + return super( + MrpProduction, self.with_context(from_product_lot_sequence=True) + ).action_generate_serial() + + def _prepare_stock_lot_values(self): + self.ensure_one() + return super( + MrpProduction, self.with_context(from_product_lot_sequence=True) + )._prepare_stock_lot_values() + + def button_mark_done(self): + return super( + MrpProduction, + self.with_context( + from_product_lot_sequence=True, from_button_mark_done=True + ), + ).button_mark_done() diff --git a/mrp_production_stencil_product/__manifest__.py b/mrp_production_stencil_product/__manifest__.py index 416f63006..5bca227ab 100644 --- a/mrp_production_stencil_product/__manifest__.py +++ b/mrp_production_stencil_product/__manifest__.py @@ -15,6 +15,7 @@ ], "data": [ "security/ir.model.access.csv", + "report/mrp_production_report.xml", "views/mrp_bom_views.xml", "views/mrp_production_views.xml", "views/mrp_workorder_views.xml", diff --git a/mrp_production_stencil_product/i18n/es.po b/mrp_production_stencil_product/i18n/es.po index 8e6301dda..6fee96b46 100644 --- a/mrp_production_stencil_product/i18n/es.po +++ b/mrp_production_stencil_product/i18n/es.po @@ -145,3 +145,24 @@ msgstr "Unidad de medida" #: model:ir.model,name:mrp_production_stencil_product.model_mrp_workorder msgid "Work Order" msgstr "Orden de trabajo" + +#. module: mrp_production_stencil_product +#: model_terms:ir.ui.view,arch_db:mrp_production_stencil_product.report_mrporder +msgid "Stencil Products" +msgstr "Utillaje" + +#. module: mrp_production_stencil_product +#: model_terms:ir.ui.view,arch_db:mrp_production_stencil_product.report_mrporder +msgid "Location" +msgstr "Ubicación" + +#. module: mrp_production_stencil_product +#: model_terms:ir.ui.view,arch_db:mrp_production_stencil_product.report_mrporder +msgid "Product" +msgstr "Producto" + +#. module: mrp_production_stencil_product +#: model_terms:ir.ui.view,arch_db:mrp_production_stencil_product.report_mrporder +msgid "Quantity" +msgstr "Cantidad" + diff --git a/mrp_production_stencil_product/i18n/mrp_production_stencil_product.pot b/mrp_production_stencil_product/i18n/mrp_production_stencil_product.pot index 43f6f031e..62551d131 100644 --- a/mrp_production_stencil_product/i18n/mrp_production_stencil_product.pot +++ b/mrp_production_stencil_product/i18n/mrp_production_stencil_product.pot @@ -145,3 +145,24 @@ msgstr "" #: model:ir.model,name:mrp_production_stencil_product.model_mrp_workorder msgid "Work Order" msgstr "" + +#. module: mrp_production_stencil_product +#: model_terms:ir.ui.view,arch_db:mrp_production_stencil_product.report_mrporder +msgid "Stencil Products" +msgstr "" + +#. module: mrp_production_stencil_product +#: model_terms:ir.ui.view,arch_db:mrp_production_stencil_product.report_mrporder +msgid "Location" +msgstr "" + +#. module: mrp_production_stencil_product +#: model_terms:ir.ui.view,arch_db:mrp_production_stencil_product.report_mrporder +msgid "Product" +msgstr "" + +#. module: mrp_production_stencil_product +#: model_terms:ir.ui.view,arch_db:mrp_production_stencil_product.report_mrporder +msgid "Quantity" +msgstr "" + diff --git a/mrp_production_stencil_product/report/mrp_production_report.xml b/mrp_production_stencil_product/report/mrp_production_report.xml new file mode 100644 index 000000000..40c73dc4c --- /dev/null +++ b/mrp_production_stencil_product/report/mrp_production_report.xml @@ -0,0 +1,31 @@ + + + + diff --git a/mrp_production_stencil_product/views/mrp_bom_views.xml b/mrp_production_stencil_product/views/mrp_bom_views.xml index bf6add63e..aa0101eaa 100644 --- a/mrp_production_stencil_product/views/mrp_bom_views.xml +++ b/mrp_production_stencil_product/views/mrp_bom_views.xml @@ -7,7 +7,7 @@ - + - + `_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Ana Juaristi +* Alfredo de la Fuente diff --git a/mrp_subcontracting_owner/__init__.py b/mrp_subcontracting_owner/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mrp_subcontracting_owner/__manifest__.py b/mrp_subcontracting_owner/__manifest__.py new file mode 100644 index 000000000..91e6d004d --- /dev/null +++ b/mrp_subcontracting_owner/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Mrp Subcontracting Owner", + "version": "16.0.1.0.0", + "category": "Manufacturing/Manufacturing", + "author": "Avanzosc", + "license": "AGPL-3", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "mrp_subcontracting", + "mrp_production_owner", + ], + "data": [ + "views/stock_move_line_views.xml", + ], + "installable": True, + "auto_install": True, +} diff --git a/mrp_subcontracting_owner/i18n/ca_ES.po b/mrp_subcontracting_owner/i18n/ca_ES.po new file mode 100644 index 000000000..5251a255b --- /dev/null +++ b/mrp_subcontracting_owner/i18n/ca_ES.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 09:00+0000\n" +"PO-Revision-Date: 2024-07-23 09:00+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" diff --git a/mrp_subcontracting_owner/i18n/en_GB.po b/mrp_subcontracting_owner/i18n/en_GB.po new file mode 100644 index 000000000..5251a255b --- /dev/null +++ b/mrp_subcontracting_owner/i18n/en_GB.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 09:00+0000\n" +"PO-Revision-Date: 2024-07-23 09:00+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" diff --git a/mrp_subcontracting_owner/i18n/es.po b/mrp_subcontracting_owner/i18n/es.po new file mode 100644 index 000000000..5251a255b --- /dev/null +++ b/mrp_subcontracting_owner/i18n/es.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 09:00+0000\n" +"PO-Revision-Date: 2024-07-23 09:00+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" diff --git a/mrp_subcontracting_owner/i18n/fr.po b/mrp_subcontracting_owner/i18n/fr.po new file mode 100644 index 000000000..5251a255b --- /dev/null +++ b/mrp_subcontracting_owner/i18n/fr.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 09:00+0000\n" +"PO-Revision-Date: 2024-07-23 09:00+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" diff --git a/mrp_subcontracting_owner/i18n/mrp_subcontracting_owner.pot b/mrp_subcontracting_owner/i18n/mrp_subcontracting_owner.pot new file mode 100644 index 000000000..1fcdd57c9 --- /dev/null +++ b/mrp_subcontracting_owner/i18n/mrp_subcontracting_owner.pot @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-23 08:59+0000\n" +"PO-Revision-Date: 2024-07-23 08:59+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" diff --git a/mrp_subcontracting_owner/views/stock_move_line_views.xml b/mrp_subcontracting_owner/views/stock_move_line_views.xml new file mode 100644 index 000000000..9dd9abac1 --- /dev/null +++ b/mrp_subcontracting_owner/views/stock_move_line_views.xml @@ -0,0 +1,15 @@ + + + + stock.move.line + + + + + + + + diff --git a/mrp_workorder_grouping_by_material/__manifest__.py b/mrp_workorder_grouping_by_material/__manifest__.py index 9a261ed26..816a07ffe 100644 --- a/mrp_workorder_grouping_by_material/__manifest__.py +++ b/mrp_workorder_grouping_by_material/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { "name": "Workorders grouping by main material", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "depends": [ "mrp", diff --git a/mrp_workorder_grouping_by_material/i18n/es.po b/mrp_workorder_grouping_by_material/i18n/es.po index d200bac27..839cb3839 100644 --- a/mrp_workorder_grouping_by_material/i18n/es.po +++ b/mrp_workorder_grouping_by_material/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-11 08:49+0000\n" -"PO-Revision-Date: 2023-09-11 08:49+0000\n" +"POT-Creation-Date: 2024-05-15 11:44+0000\n" +"PO-Revision-Date: 2024-05-15 11:44+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -26,6 +26,14 @@ msgid "" " * Cancelled: The MO has been cancelled, can't be confirmed anymore." msgstr "Técnico: utilizado sólo en vistas" +#. module: mrp_workorder_grouping_by_material +#. odoo-python +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 +#, python-format +msgid "%(workorder)s: %(error_name)s" +msgstr "" + #. module: mrp_workorder_grouping_by_material #: model_terms:ir.ui.view,arch_db:mrp_workorder_grouping_by_material.mrp_production_view_form #: model_terms:ir.ui.view,arch_db:mrp_workorder_grouping_by_material.mrp_workorder_view_form @@ -381,6 +389,7 @@ msgstr "Material principal" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_bom.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_bom.py:0 #, python-format msgid "Main material must have an operation" msgstr "El material principal debe tener una operación" @@ -388,6 +397,7 @@ msgstr "El material principal debe tener una operación" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest.py:0 #, python-format msgid "Main product lot is not selected" msgstr "No seleccionado lote para material principal" @@ -739,10 +749,6 @@ msgstr "Empezar a trabajar" #. module: mrp_workorder_grouping_by_material #: model:ir.model.fields,field_description:mrp_workorder_grouping_by_material.field_mrp_workorder_nest__state -msgid "State" -msgstr "Estado" - -#. module: mrp_workorder_grouping_by_material #: model:ir.model.fields,field_description:mrp_workorder_grouping_by_material.field_mrp_workorder_nest_line__state msgid "Status" msgstr "Estado" @@ -774,6 +780,7 @@ msgstr "El número de productos tomados por esta orden de trabajo" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder.py:0 #, python-format msgid "The workcenter is 'nesting_required'" msgstr "El centro de trabajo requiere anidado" @@ -781,6 +788,7 @@ msgstr "El centro de trabajo requiere anidado" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_bom.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_bom.py:0 #, python-format msgid "" "There can only be one main material per operation. Check lines that contains" @@ -874,6 +882,7 @@ msgstr "Estado de la orden de trabajo" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 #: model:ir.model.fields,field_description:mrp_workorder_grouping_by_material.field_mrp_workorder_nest_line__worksheet #, python-format msgid "Worksheet" @@ -882,6 +891,7 @@ msgstr "Hoja de trabajo" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest.py:0 #, python-format msgid "Worksheets" msgstr "Hojas de trabajo" @@ -889,6 +899,7 @@ msgstr "Hojas de trabajo" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/wizard/nested_new_line.py:0 +#: code:addons/mrp_workorder_grouping_by_material/wizard/nested_new_line.py:0 #, python-format msgid "" "the quantity to be produced must be less than or equal to quantity produced" @@ -897,6 +908,7 @@ msgstr "La cantidad a producir debe ser menor o igual a la cantidad producida" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 #, python-format msgid "{}: You should provide a lot/serial number for the final product." msgstr "{}: Deberias de añadir un lot/num. de serie para el producto final." diff --git a/mrp_workorder_grouping_by_material/i18n/mrp_workorder_grouping_by_material.pot b/mrp_workorder_grouping_by_material/i18n/mrp_workorder_grouping_by_material.pot index 88e58ad61..e266937b6 100644 --- a/mrp_workorder_grouping_by_material/i18n/mrp_workorder_grouping_by_material.pot +++ b/mrp_workorder_grouping_by_material/i18n/mrp_workorder_grouping_by_material.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-11 08:49+0000\n" -"PO-Revision-Date: 2023-09-11 08:49+0000\n" +"POT-Creation-Date: 2024-05-15 11:44+0000\n" +"PO-Revision-Date: 2024-05-15 11:44+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -26,6 +26,14 @@ msgid "" " * Cancelled: The MO has been cancelled, can't be confirmed anymore." msgstr "" +#. module: mrp_workorder_grouping_by_material +#. odoo-python +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 +#, python-format +msgid "%(workorder)s: %(error_name)s" +msgstr "" + #. module: mrp_workorder_grouping_by_material #: model_terms:ir.ui.view,arch_db:mrp_workorder_grouping_by_material.mrp_production_view_form #: model_terms:ir.ui.view,arch_db:mrp_workorder_grouping_by_material.mrp_workorder_view_form @@ -381,6 +389,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_bom.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_bom.py:0 #, python-format msgid "Main material must have an operation" msgstr "" @@ -388,6 +397,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest.py:0 #, python-format msgid "Main product lot is not selected" msgstr "" @@ -564,7 +574,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #: model:ir.model.fields,help:mrp_workorder_grouping_by_material.field_mrp_workorder_nest__message_needaction_counter -msgid "Number of messages which requires an action" +msgid "Number of messages requiring action" msgstr "" #. module: mrp_workorder_grouping_by_material @@ -739,10 +749,6 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #: model:ir.model.fields,field_description:mrp_workorder_grouping_by_material.field_mrp_workorder_nest__state -msgid "State" -msgstr "" - -#. module: mrp_workorder_grouping_by_material #: model:ir.model.fields,field_description:mrp_workorder_grouping_by_material.field_mrp_workorder_nest_line__state msgid "Status" msgstr "" @@ -770,6 +776,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder.py:0 #, python-format msgid "The workcenter is 'nesting_required'" msgstr "" @@ -777,6 +784,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_bom.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_bom.py:0 #, python-format msgid "" "There can only be one main material per operation. Check lines that contains" @@ -870,6 +878,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 #: model:ir.model.fields,field_description:mrp_workorder_grouping_by_material.field_mrp_workorder_nest_line__worksheet #, python-format msgid "Worksheet" @@ -878,6 +887,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest.py:0 #, python-format msgid "Worksheets" msgstr "" @@ -885,6 +895,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/wizard/nested_new_line.py:0 +#: code:addons/mrp_workorder_grouping_by_material/wizard/nested_new_line.py:0 #, python-format msgid "" "the quantity to be produced must be less than or equal to quantity produced" @@ -893,6 +904,7 @@ msgstr "" #. module: mrp_workorder_grouping_by_material #. odoo-python #: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 +#: code:addons/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py:0 #, python-format msgid "{}: You should provide a lot/serial number for the final product." msgstr "" diff --git a/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py b/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py index f339da060..7c95d6101 100644 --- a/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py +++ b/mrp_workorder_grouping_by_material/models/mrp_workorder_nest_line.py @@ -293,7 +293,7 @@ def _write_lot_producing_qty(self): move_line.write( { "lot_id": n_line.nest_id.lot_id.id, - "qty_done": move_line.qty_to_consume, + "qty_done": move_line.reserved_qty, } ) # if res: @@ -326,10 +326,10 @@ def action_check_ready(self): elif nl.workorder_id.state == "done": nl.state = "done" - def action_cancel(self): - if not any(self.filtered(lambda n: n.state == "ready")): - raise UserError(_("")) - return self.write({"state": "cancel"}) + # def action_cancel(self): + # if not any(self.filtered(lambda n: n.state == "ready")): + # raise UserError(_("")) + # return self.write({"state": "cancel"}) def button_start(self): for nl in self.filtered(lambda n: n.state == "ready"): diff --git a/mrp_workorder_grouping_by_material/security/mrp_workorder_grouping_by_material_security.xml b/mrp_workorder_grouping_by_material/security/mrp_workorder_grouping_by_material_security.xml index 7c95b72a4..a1fd443c8 100644 --- a/mrp_workorder_grouping_by_material/security/mrp_workorder_grouping_by_material_security.xml +++ b/mrp_workorder_grouping_by_material/security/mrp_workorder_grouping_by_material_security.xml @@ -1,17 +1,14 @@ - - + mrp_workorder_nest multi-company + name="model_id" + search="[('model','=','mrp.workorder.nest')]" + model="ir.model" + /> [('company_id', 'in', company_ids)] - - diff --git a/mrp_workorder_grouping_by_material/views/mrp_workorder_nest_view.xml b/mrp_workorder_grouping_by_material/views/mrp_workorder_nest_view.xml index dbf681530..4eaeb9846 100644 --- a/mrp_workorder_grouping_by_material/views/mrp_workorder_nest_view.xml +++ b/mrp_workorder_grouping_by_material/views/mrp_workorder_nest_view.xml @@ -23,6 +23,12 @@ string="Planned Start Date" domain="[]" context="{'group_by': 'date_planned_start'}" + /> + @@ -39,7 +45,14 @@ - + diff --git a/product_last_mrp_cost_info/README.rst b/product_last_mrp_cost_info/README.rst new file mode 100644 index 000000000..4487b9934 --- /dev/null +++ b/product_last_mrp_cost_info/README.rst @@ -0,0 +1,27 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========================== +Product last mrp cost info +========================== + +* In products new field: "Last Manufacturing Order Cost Unit Price". + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ +* Ana Juaristi +* Alfredo de la Fuente diff --git a/product_last_mrp_cost_info/__init__.py b/product_last_mrp_cost_info/__init__.py new file mode 100644 index 000000000..83e553ac4 --- /dev/null +++ b/product_last_mrp_cost_info/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/product_last_mrp_cost_info/__manifest__.py b/product_last_mrp_cost_info/__manifest__.py new file mode 100644 index 000000000..54020820b --- /dev/null +++ b/product_last_mrp_cost_info/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Product Last MRP Cost Info", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "category": "Manufacturing", + "author": "Avanzosc", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "product_last_mrp_info", + "mrp_stock_move_cost", + ], + "data": ["views/product_product_views.xml"], + "installable": True, + "auto_install": True, +} diff --git a/product_last_mrp_cost_info/i18n/es.po b/product_last_mrp_cost_info/i18n/es.po new file mode 100644 index 000000000..2a467076e --- /dev/null +++ b/product_last_mrp_cost_info/i18n/es.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_last_mrp_cost_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 11:31+0000\n" +"PO-Revision-Date: 2024-05-16 11:31+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: product_last_mrp_cost_info +#: model:ir.model.fields,field_description:product_last_mrp_cost_info.field_product_product__last_mrp_price_unit_cost +msgid "Last Manufacturing Order Cost Unit Price" +msgstr "Última OF Coste precio unitario" + +#. module: product_last_mrp_cost_info +#: model:ir.model,name:product_last_mrp_cost_info.model_product_product +msgid "Product Variant" +msgstr "Variante de producto" diff --git a/product_last_mrp_cost_info/i18n/product_last_mrp_cost_info.pot b/product_last_mrp_cost_info/i18n/product_last_mrp_cost_info.pot new file mode 100644 index 000000000..4026b0022 --- /dev/null +++ b/product_last_mrp_cost_info/i18n/product_last_mrp_cost_info.pot @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_last_mrp_cost_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 11:31+0000\n" +"PO-Revision-Date: 2024-05-16 11:31+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: product_last_mrp_cost_info +#: model:ir.model.fields,field_description:product_last_mrp_cost_info.field_product_product__last_mrp_price_unit_cost +msgid "Last Manufacturing Order Cost Unit Price" +msgstr "" + +#. module: product_last_mrp_cost_info +#: model:ir.model,name:product_last_mrp_cost_info.model_product_product +msgid "Product Variant" +msgstr "" diff --git a/product_last_mrp_cost_info/models/__init__.py b/product_last_mrp_cost_info/models/__init__.py new file mode 100644 index 000000000..5c74c8c30 --- /dev/null +++ b/product_last_mrp_cost_info/models/__init__.py @@ -0,0 +1 @@ +from . import product_product diff --git a/product_last_mrp_cost_info/models/product_product.py b/product_last_mrp_cost_info/models/product_product.py new file mode 100644 index 000000000..de4730233 --- /dev/null +++ b/product_last_mrp_cost_info/models/product_product.py @@ -0,0 +1,18 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class ProductProduct(models.Model): + _inherit = "product.product" + + last_mrp_price_unit_cost = fields.Float( + string="Last Manufacturing Order Cost Unit Price", + digits="Product Price", + compute="_compute_last_mrp_info", + ) + + def _get_last_mrp_info(self, production): + result = super()._get_last_mrp_info(production) + self.last_mrp_price_unit_cost = production.price_unit_cost + return result diff --git a/product_last_mrp_cost_info/views/product_product_views.xml b/product_last_mrp_cost_info/views/product_product_views.xml new file mode 100644 index 000000000..b49332d90 --- /dev/null +++ b/product_last_mrp_cost_info/views/product_product_views.xml @@ -0,0 +1,28 @@ + + + product.product + + + + + + + + + + product.product + + + + + + + + diff --git a/product_last_mrp_info/README.rst b/product_last_mrp_info/README.rst new file mode 100644 index 000000000..76e026796 --- /dev/null +++ b/product_last_mrp_info/README.rst @@ -0,0 +1,28 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +===================== +Product last mrp info +===================== + +* In products new fields: "Last Manufacturing Order", and + "Last Manufacturing Order Date". + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ +* Ana Juaristi +* Alfredo de la Fuente diff --git a/product_last_mrp_info/__init__.py b/product_last_mrp_info/__init__.py new file mode 100644 index 000000000..83e553ac4 --- /dev/null +++ b/product_last_mrp_info/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/product_last_mrp_info/__manifest__.py b/product_last_mrp_info/__manifest__.py new file mode 100644 index 000000000..1c02a0867 --- /dev/null +++ b/product_last_mrp_info/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +{ + "name": "Product Last MRP Info", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "category": "Manufacturing", + "author": "Avanzosc", + "website": "https://github.com/avanzosc/mrp-addons", + "depends": [ + "product", + "mrp", + ], + "data": ["views/product_product_views.xml"], + "installable": True, +} diff --git a/product_last_mrp_info/i18n/es.po b/product_last_mrp_info/i18n/es.po new file mode 100644 index 000000000..0459675d9 --- /dev/null +++ b/product_last_mrp_info/i18n/es.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_last_mrp_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 11:00+0000\n" +"PO-Revision-Date: 2024-05-16 11:00+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: product_last_mrp_info +#: model:ir.model.fields,field_description:product_last_mrp_info.field_product_product__last_mrp_id +msgid "Last Manufacturing Order" +msgstr "Última OF" + +#. module: product_last_mrp_info +#: model:ir.model.fields,field_description:product_last_mrp_info.field_product_product__last_mrp_date +msgid "Last Manufacturing Order Date" +msgstr "Última fecha OF" + +#. module: product_last_mrp_info +#: model_terms:ir.ui.view,arch_db:product_last_mrp_info.product_normal_form_view +msgid "MRP" +msgstr "MRP" + +#. module: product_last_mrp_info +#: model:ir.model,name:product_last_mrp_info.model_product_product +msgid "Product Variant" +msgstr "Variante de producto" diff --git a/product_last_mrp_info/i18n/product_last_mrp_info.pot b/product_last_mrp_info/i18n/product_last_mrp_info.pot new file mode 100644 index 000000000..126c78b27 --- /dev/null +++ b/product_last_mrp_info/i18n/product_last_mrp_info.pot @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_last_mrp_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-05-16 11:00+0000\n" +"PO-Revision-Date: 2024-05-16 11:00+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: product_last_mrp_info +#: model:ir.model.fields,field_description:product_last_mrp_info.field_product_product__last_mrp_id +msgid "Last Manufacturing Order" +msgstr "" + +#. module: product_last_mrp_info +#: model:ir.model.fields,field_description:product_last_mrp_info.field_product_product__last_mrp_date +msgid "Last Manufacturing Order Date" +msgstr "" + +#. module: product_last_mrp_info +#: model_terms:ir.ui.view,arch_db:product_last_mrp_info.product_normal_form_view +msgid "MRP" +msgstr "" + +#. module: product_last_mrp_info +#: model:ir.model,name:product_last_mrp_info.model_product_product +msgid "Product Variant" +msgstr "" diff --git a/product_last_mrp_info/models/__init__.py b/product_last_mrp_info/models/__init__.py new file mode 100644 index 000000000..5c74c8c30 --- /dev/null +++ b/product_last_mrp_info/models/__init__.py @@ -0,0 +1 @@ +from . import product_product diff --git a/product_last_mrp_info/models/product_product.py b/product_last_mrp_info/models/product_product.py new file mode 100644 index 000000000..ecbb45b14 --- /dev/null +++ b/product_last_mrp_info/models/product_product.py @@ -0,0 +1,29 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +from odoo import fields, models + + +class ProductProduct(models.Model): + _inherit = "product.product" + + last_mrp_id = fields.Many2one( + string="Last Manufacturing Order", + comodel_name="mrp.production", + compute="_compute_last_mrp_info", + ) + last_mrp_date = fields.Datetime( + string="Last Manufacturing Order Date", compute="_compute_last_mrp_info" + ) + + def _compute_last_mrp_info(self): + for product in self: + production = self.env["mrp.production"].search( + [("product_id", "=", product.id), ("state", "=", "done")], + limit=1, + order="date_finished desc", + ) + product._get_last_mrp_info(production) + + def _get_last_mrp_info(self, production): + self.last_mrp_id = production.id + self.last_mrp_date = production.date_finished diff --git a/product_last_mrp_info/views/product_product_views.xml b/product_last_mrp_info/views/product_product_views.xml new file mode 100644 index 000000000..9fc18a558 --- /dev/null +++ b/product_last_mrp_info/views/product_product_views.xml @@ -0,0 +1,37 @@ + + + product.product + + + + + + + + + + + + + + + product.product + + + + + + + + + diff --git a/quality_control_claim/README.rst b/quality_control_claim/README.rst new file mode 100644 index 000000000..f7def3fa6 --- /dev/null +++ b/quality_control_claim/README.rst @@ -0,0 +1,26 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +===================== +Quality Control Claim +===================== + +If the quality test status is 'Quality failed', a claim is automatically +generated, to accomplish this, we have defined the field 'Automatic Claims', +in "test", and "inspection" objects. + +It also defined the field "Automatic Claims by line", when this fields is +checked, and the test line state is "No ok",a claim is automatically generated +per line. + +Credits +======= + +Contributors +------------ +* Pedro M. Baeza +* Ana Juaristi +* Alfredo de la Fuente +* Oihane Crucelaegui +* Daniel Campos diff --git a/quality_control_claim/__init__.py b/quality_control_claim/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/quality_control_claim/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/quality_control_claim/__manifest__.py b/quality_control_claim/__manifest__.py new file mode 100644 index 000000000..1fd8e2ee2 --- /dev/null +++ b/quality_control_claim/__manifest__.py @@ -0,0 +1,26 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Quality control claim", + "version": "16.0.1.0.0", + "author": "OdooMRP team," "AvanzOSC," "Serv. Tecnol. Avanzados - Pedro M. Baeza", + "website": "https://github.com/avanzosc/mrp-addons", + "license": "AGPL-3", + "contributors": [ + "Pedro M. Baeza ", + "Alfredo de la Fuente ", + "Oihane Crucelaegui ", + "Daniel Campos ", + ], + "category": "Quality control", + "depends": [ + "quality_control_oca", + "crm_claim", + ], + "data": [ + "views/qc_test_view.xml", + "views/qc_inspection_view.xml", + ], + "installable": True, +} diff --git a/quality_control_claim/i18n/es.po b/quality_control_claim/i18n/es.po new file mode 100644 index 000000000..c9b9fd5dc --- /dev/null +++ b/quality_control_claim/i18n/es.po @@ -0,0 +1,113 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * quality_control_claim +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-22 14:59+0000\n" +"PO-Revision-Date: 2024-07-22 14:59+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: quality_control_claim +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_inspection__automatic_claims +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_test__automatic_claims +msgid "Automatic Claims" +msgstr "Reclamaciones automáticas" + +#. module: quality_control_claim +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_inspection__automatic_claims_by_line +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_test__automatic_claims_by_line +msgid "Automatic Claims By Line" +msgstr "Reclamaciones automáticas por línea de test" + +#. module: quality_control_claim +#: model:ir.model,name:quality_control_claim.model_crm_claim +msgid "Claim" +msgstr "Reclamación" + +#. module: quality_control_claim +#: model:ir.actions.act_window,name:quality_control_claim.action_claims_per_inspection +msgid "Claims" +msgstr "Reclamaciones" + +#. module: quality_control_claim +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_inspection__claims +msgid "Created claims" +msgstr "Reclamaciones creadas" + +#. module: quality_control_claim +#: model:ir.model.fields,help:quality_control_claim.field_qc_inspection__automatic_claims_by_line +#: model:ir.model.fields,help:quality_control_claim.field_qc_test__automatic_claims_by_line +msgid "" +"If you want to create one claim per quality test line, when the quality test" +" line status is 'No ok'." +msgstr "" +"Si quiere crear una reclamación por línea de test de calidad, cuando el " +"estado de la línea de test de calidad sea 'No ok'." + +#. module: quality_control_claim +#: model:ir.model.fields,help:quality_control_claim.field_qc_inspection__automatic_claims +#: model:ir.model.fields,help:quality_control_claim.field_qc_test__automatic_claims +msgid "" +"If you want to create one claim when the quality test status is 'Quality " +"failed'." +msgstr "" +"Si quiere crear una reclamación cuando el estado del test de calidad es " +"'Calidad fallida'." + +#. module: quality_control_claim +#: model_terms:ir.actions.act_window,help:quality_control_claim.action_claims_per_inspection +msgid "No data found!" +msgstr "¡No se encontró información!" + +#. module: quality_control_claim +#: model:ir.model,name:quality_control_claim.model_qc_inspection +msgid "Quality control inspection" +msgstr "Inspección del control de calidad" + +#. module: quality_control_claim +#: model:ir.model,name:quality_control_claim.model_qc_test +msgid "Quality control test" +msgstr "Test del control de calidad" + +#. module: quality_control_claim +#. odoo-python +#: code:addons/quality_control_claim/models/qc_inspection.py:0 +#, python-format +msgid "" +"Quality test %(test_name)s for %(name)s unsurpassed, in test line " +"%(line_name)s" +msgstr "" + +#. module: quality_control_claim +#. odoo-python +#: code:addons/quality_control_claim/models/qc_inspection.py:0 +#, python-format +msgid "Quality test %(test_name)s for object %(name)s unsurpassed" +msgstr "" + +#. module: quality_control_claim +#. odoo-python +#: code:addons/quality_control_claim/models/qc_inspection.py:0 +#, python-format +msgid "Quality test %(test_name)s unsurpassed" +msgstr "" + +#. module: quality_control_claim +#. odoo-python +#: code:addons/quality_control_claim/models/qc_inspection.py:0 +#, python-format +msgid "Quality test %(test_name)s unsurpassed, in test line %(line_name)s" +msgstr "" + +#. module: quality_control_claim +#: model_terms:ir.actions.act_window,help:quality_control_claim.action_claims_per_inspection +msgid "Record and track your claims." +msgstr "Registre y realice el seguimiento de sus reclamaciones." diff --git a/quality_control_claim/i18n/quality_control_claim.pot b/quality_control_claim/i18n/quality_control_claim.pot new file mode 100644 index 000000000..5f6f9c2e1 --- /dev/null +++ b/quality_control_claim/i18n/quality_control_claim.pot @@ -0,0 +1,109 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * quality_control_claim +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-22 14:59+0000\n" +"PO-Revision-Date: 2024-07-22 14:59+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: quality_control_claim +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_inspection__automatic_claims +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_test__automatic_claims +msgid "Automatic Claims" +msgstr "" + +#. module: quality_control_claim +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_inspection__automatic_claims_by_line +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_test__automatic_claims_by_line +msgid "Automatic Claims By Line" +msgstr "" + +#. module: quality_control_claim +#: model:ir.model,name:quality_control_claim.model_crm_claim +msgid "Claim" +msgstr "" + +#. module: quality_control_claim +#: model:ir.actions.act_window,name:quality_control_claim.action_claims_per_inspection +msgid "Claims" +msgstr "" + +#. module: quality_control_claim +#: model:ir.model.fields,field_description:quality_control_claim.field_qc_inspection__claims +msgid "Created claims" +msgstr "" + +#. module: quality_control_claim +#: model:ir.model.fields,help:quality_control_claim.field_qc_inspection__automatic_claims_by_line +#: model:ir.model.fields,help:quality_control_claim.field_qc_test__automatic_claims_by_line +msgid "" +"If you want to create one claim per quality test line, when the quality test" +" line status is 'No ok'." +msgstr "" + +#. module: quality_control_claim +#: model:ir.model.fields,help:quality_control_claim.field_qc_inspection__automatic_claims +#: model:ir.model.fields,help:quality_control_claim.field_qc_test__automatic_claims +msgid "" +"If you want to create one claim when the quality test status is 'Quality " +"failed'." +msgstr "" + +#. module: quality_control_claim +#: model_terms:ir.actions.act_window,help:quality_control_claim.action_claims_per_inspection +msgid "No data found!" +msgstr "" + +#. module: quality_control_claim +#: model:ir.model,name:quality_control_claim.model_qc_inspection +msgid "Quality control inspection" +msgstr "" + +#. module: quality_control_claim +#: model:ir.model,name:quality_control_claim.model_qc_test +msgid "Quality control test" +msgstr "" + +#. module: quality_control_claim +#. odoo-python +#: code:addons/quality_control_claim/models/qc_inspection.py:0 +#, python-format +msgid "" +"Quality test %(test_name)s for %(name)s unsurpassed, in test line " +"%(line_name)s" +msgstr "" + +#. module: quality_control_claim +#. odoo-python +#: code:addons/quality_control_claim/models/qc_inspection.py:0 +#, python-format +msgid "Quality test %(test_name)s for object %(name)s unsurpassed" +msgstr "" + +#. module: quality_control_claim +#. odoo-python +#: code:addons/quality_control_claim/models/qc_inspection.py:0 +#, python-format +msgid "Quality test %(test_name)s unsurpassed" +msgstr "" + +#. module: quality_control_claim +#. odoo-python +#: code:addons/quality_control_claim/models/qc_inspection.py:0 +#, python-format +msgid "Quality test %(test_name)s unsurpassed, in test line %(line_name)s" +msgstr "" + +#. module: quality_control_claim +#: model_terms:ir.actions.act_window,help:quality_control_claim.action_claims_per_inspection +msgid "Record and track your claims." +msgstr "" diff --git a/quality_control_claim/i18n/sl.po b/quality_control_claim/i18n/sl.po new file mode 100644 index 000000000..c72256691 --- /dev/null +++ b/quality_control_claim/i18n/sl.po @@ -0,0 +1,84 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * quality_control_claim +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: odoomrp-wip (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-07 10:44+0000\n" +"PO-Revision-Date: 2015-09-20 19:04+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-wip-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: quality_control_claim +#: field:qc.inspection,automatic_claims:0 field:qc.test,automatic_claims:0 +msgid "Automatic Claims" +msgstr "Upravljanje reklamacij" + +#. module: quality_control_claim +#: field:qc.inspection,automatic_claims_by_line:0 +#: field:qc.test,automatic_claims_by_line:0 +msgid "Automatic Claims by line" +msgstr "Samodejne reklamacije po postavki" + +#. module: quality_control_claim +#: model:ir.actions.act_window,name:quality_control_claim.action_claims_per_inspection +msgid "Claims" +msgstr "Reklamacije" + +#. module: quality_control_claim +#: help:qc.inspection,automatic_claims_by_line:0 +#: help:qc.test,automatic_claims_by_line:0 +msgid "" +"If you want to create one claim per quality test line, when the quality test" +" line status is 'No ok'." +msgstr "Če želite po eno reklamacijo za vsako postavko testiranja kakovosti, ko je status postavke testiranja kakovosti 'Ni v redu'." + +#. module: quality_control_claim +#: help:qc.inspection,automatic_claims:0 help:qc.test,automatic_claims:0 +msgid "" +"If you want to create one claim when the quality test status is 'Quality " +"failed'." +msgstr "Če želite ustvariti reklamacijo ko je status testiranja kakovosti 'Kvaliteta neustrezna'." + +#. module: quality_control_claim +#: model:ir.model,name:quality_control_claim.model_qc_inspection +msgid "Quality control inspection" +msgstr "Inšpekcija nadzora kvalitete" + +#. module: quality_control_claim +#: model:ir.model,name:quality_control_claim.model_qc_test +msgid "Quality control test" +msgstr "Testiranje kontrole kakovosti" + +#. module: quality_control_claim +#: code:addons/quality_control_claim/models/qc_inspection.py:69 +#, python-format +msgid "Quality test %s for %s unsurpassed, in test line %s" +msgstr "Test kvalitete %s za %s spodletel pri postavki %s" + +#. module: quality_control_claim +#: code:addons/quality_control_claim/models/qc_inspection.py:47 +#, python-format +msgid "Quality test %s for object %s unsurpassed" +msgstr "Test kvalitete %s za predmet %s spodletel" + +#. module: quality_control_claim +#: code:addons/quality_control_claim/models/qc_inspection.py:50 +#, python-format +msgid "Quality test %s unsurpassed" +msgstr "Test kvalitete %s spodletel" + +#. module: quality_control_claim +#: code:addons/quality_control_claim/models/qc_inspection.py:72 +#, python-format +msgid "Quality test %s unsurpassed, in test line %s" +msgstr "Test kvalitete %s spodletel pri postavki %s" diff --git a/quality_control_claim/models/__init__.py b/quality_control_claim/models/__init__.py new file mode 100644 index 000000000..de55d6a7e --- /dev/null +++ b/quality_control_claim/models/__init__.py @@ -0,0 +1,3 @@ +from . import crm_claim +from . import qc_test +from . import qc_inspection diff --git a/quality_control_claim/models/crm_claim.py b/quality_control_claim/models/crm_claim.py new file mode 100644 index 000000000..e3c14d106 --- /dev/null +++ b/quality_control_claim/models/crm_claim.py @@ -0,0 +1,12 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class CrmClaim(models.Model): + _inherit = "crm.claim" + + def _selection_model(self): + result = super()._selection_model() + result.extend([("qc.inspection", "Quality control inspection")]) + return result diff --git a/quality_control_claim/models/qc_inspection.py b/quality_control_claim/models/qc_inspection.py new file mode 100644 index 000000000..8980ff027 --- /dev/null +++ b/quality_control_claim/models/qc_inspection.py @@ -0,0 +1,90 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import _, fields, models + + +class QcInspection(models.Model): + _inherit = "qc.inspection" + + def _compute_claims(self): + claim_obj = self.env["crm.claim"] + cond = [("model_ref_id", "=", "%s,%d" % (self._name, self.id))] + claims = claim_obj.search(cond) + self.claims = len(claims) + + automatic_claims = fields.Boolean( + default=False, + help="If you want to create one claim when the quality test status is" + " 'Quality failed'.", + ) + automatic_claims_by_line = fields.Boolean( + default=False, + help="If you want to create one claim per quality test line, when the" + " quality test line status is 'No ok'.", + ) + claims = fields.Integer( + string="Created claims", + compute="_compute_claims", + store=False, + ) + + def _prepare_inspection_header(self, object_ref, trigger_line): + result = super()._prepare_inspection_header(object_ref, trigger_line) + result.update( + { + "automatic_claims": trigger_line.test.automatic_claims, + "automatic_claims_by_line": trigger_line.test.automatic_claims_by_line, + } + ) + return result + + def action_approve(self): + crm_claim_obj = self.env["crm.claim"] + result = super().action_approve() + for inspection in self: + if inspection.state == "failed" and inspection.automatic_claims: + vals = inspection.init_claim_vals() + if self.object_id: + res_id, name = self.object_id.name_get()[0] + vals["name"] = _( + "Quality test %(test_name)s for object %(name)s unsurpassed" + ) % { + "test_name": self.name, + "name": name, + } + else: + vals["name"] = _("Quality test %(test_name)s unsurpassed") % { + "test_name": self.name, + } + crm_claim_obj.create(vals) + elif inspection.automatic_claims_by_line: + for line in inspection.inspection_lines: + if not line.success: + inspection.create_claim_by_line(line) + return result + + def init_claim_vals(self): + vals = { + "date": fields.Datetime.now(), + "model_ref_id": "%s,%d" % (self._name, self.id), + } + return vals + + def create_claim_by_line(self, line): + crm_claim_obj = self.env["crm.claim"] + vals = self.init_claim_vals() + if self.object_id: + res_id, name = self.object_id.name_get()[0] + vals["name"] = _( + "Quality test %(test_name)s for %(name)s unsurpassed, in test line %(" + "line_name)s" + ) % {"test_name": self.name, "name": name, "line_name": line.name} + else: + vals["name"] = _( + "Quality test %(test_name)s unsurpassed, in test line %(line_name)s" + ) % { + "test_name": self.name, + "line_name": line.name, + } + claim = crm_claim_obj.create(vals) + return claim diff --git a/quality_control_claim/models/qc_test.py b/quality_control_claim/models/qc_test.py new file mode 100644 index 000000000..19450ec03 --- /dev/null +++ b/quality_control_claim/models/qc_test.py @@ -0,0 +1,18 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class QcTest(models.Model): + _inherit = "qc.test" + + automatic_claims = fields.Boolean( + default=False, + help="If you want to create one claim when the quality test status is" + " 'Quality failed'.", + ) + automatic_claims_by_line = fields.Boolean( + default=False, + help="If you want to create one claim per quality test line, when the" + " quality test line status is 'No ok'.", + ) diff --git a/quality_control_claim/static/description/icon.png b/quality_control_claim/static/description/icon.png new file mode 100644 index 000000000..cf4d8fc26 Binary files /dev/null and b/quality_control_claim/static/description/icon.png differ diff --git a/quality_control_claim/views/qc_inspection_view.xml b/quality_control_claim/views/qc_inspection_view.xml new file mode 100644 index 000000000..45e752eb9 --- /dev/null +++ b/quality_control_claim/views/qc_inspection_view.xml @@ -0,0 +1,56 @@ + + + + Claims + crm.claim + tree,form + {'default_model_ref_id': 'qc.inspection,'+context.get('active_id', False)} + [('model_ref_id','=','qc.inspection,'+context.get('active_id',False))] + +

+ No data found! +

+

+ Record and track your claims. +

+
+
+ + + qc.inspection.claim.tree + qc.inspection + + + + + + + + + + + qc.inspection.claim.form + qc.inspection + + + + + + +
+ +
+
+
+
diff --git a/quality_control_claim/views/qc_test_view.xml b/quality_control_claim/views/qc_test_view.xml new file mode 100644 index 000000000..fe1e76ecc --- /dev/null +++ b/quality_control_claim/views/qc_test_view.xml @@ -0,0 +1,25 @@ + + + + qc.test.tree.view.inh.qualitycontroclaim + qc.test + + + + + + + + + + qc.test.form.view.inh.qualitycontroclaim + qc.test + + + + + + + + + diff --git a/quality_control_ref_search/views/qc_inspection_view.xml b/quality_control_ref_search/views/qc_inspection_view.xml index 1b88cc217..56f4f0f90 100644 --- a/quality_control_ref_search/views/qc_inspection_view.xml +++ b/quality_control_ref_search/views/qc_inspection_view.xml @@ -1,7 +1,6 @@ - qc.inspection.tree.view.inh.refsearch qc.inspection @@ -12,9 +11,9 @@ - qc.inspection.search.view.inh.refsearch qc.inspection + 100 diff --git a/setup/mrp_bom_component_change/odoo/addons/mrp_bom_component_change b/setup/mrp_bom_component_change/odoo/addons/mrp_bom_component_change new file mode 120000 index 000000000..c5e491946 --- /dev/null +++ b/setup/mrp_bom_component_change/odoo/addons/mrp_bom_component_change @@ -0,0 +1 @@ +../../../../mrp_bom_component_change \ No newline at end of file diff --git a/setup/mrp_bom_component_change/setup.py b/setup/mrp_bom_component_change/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_bom_component_change/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_bom_line_product_brand_info/odoo/addons/mrp_bom_line_product_brand_info b/setup/mrp_bom_line_product_brand_info/odoo/addons/mrp_bom_line_product_brand_info new file mode 120000 index 000000000..3a63f5c83 --- /dev/null +++ b/setup/mrp_bom_line_product_brand_info/odoo/addons/mrp_bom_line_product_brand_info @@ -0,0 +1 @@ +../../../../mrp_bom_line_product_brand_info \ No newline at end of file diff --git a/setup/mrp_bom_line_product_brand_info/setup.py b/setup/mrp_bom_line_product_brand_info/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_bom_line_product_brand_info/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_bom_multiple_production_qty/odoo/addons/mrp_bom_multiple_production_qty b/setup/mrp_bom_multiple_production_qty/odoo/addons/mrp_bom_multiple_production_qty new file mode 120000 index 000000000..aeea9961f --- /dev/null +++ b/setup/mrp_bom_multiple_production_qty/odoo/addons/mrp_bom_multiple_production_qty @@ -0,0 +1 @@ +../../../../mrp_bom_multiple_production_qty \ No newline at end of file diff --git a/setup/mrp_bom_multiple_production_qty/setup.py b/setup/mrp_bom_multiple_production_qty/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_bom_multiple_production_qty/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_bom_report/odoo/addons/mrp_bom_report b/setup/mrp_bom_report/odoo/addons/mrp_bom_report new file mode 120000 index 000000000..ef2c0b19b --- /dev/null +++ b/setup/mrp_bom_report/odoo/addons/mrp_bom_report @@ -0,0 +1 @@ +../../../../mrp_bom_report \ No newline at end of file diff --git a/setup/mrp_bom_report/setup.py b/setup/mrp_bom_report/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_bom_report/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_bom_sale_price_subtotal/odoo/addons/mrp_bom_sale_price_subtotal b/setup/mrp_bom_sale_price_subtotal/odoo/addons/mrp_bom_sale_price_subtotal new file mode 120000 index 000000000..dea0bac9e --- /dev/null +++ b/setup/mrp_bom_sale_price_subtotal/odoo/addons/mrp_bom_sale_price_subtotal @@ -0,0 +1 @@ +../../../../mrp_bom_sale_price_subtotal \ No newline at end of file diff --git a/setup/mrp_bom_sale_price_subtotal/setup.py b/setup/mrp_bom_sale_price_subtotal/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_bom_sale_price_subtotal/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_bom_version_component_change/odoo/addons/mrp_bom_version_component_change b/setup/mrp_bom_version_component_change/odoo/addons/mrp_bom_version_component_change new file mode 120000 index 000000000..65969e9c9 --- /dev/null +++ b/setup/mrp_bom_version_component_change/odoo/addons/mrp_bom_version_component_change @@ -0,0 +1 @@ +../../../../mrp_bom_version_component_change \ No newline at end of file diff --git a/setup/mrp_bom_version_component_change/setup.py b/setup/mrp_bom_version_component_change/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_bom_version_component_change/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_bom_version_note/odoo/addons/mrp_bom_version_note b/setup/mrp_bom_version_note/odoo/addons/mrp_bom_version_note new file mode 120000 index 000000000..76c98308b --- /dev/null +++ b/setup/mrp_bom_version_note/odoo/addons/mrp_bom_version_note @@ -0,0 +1 @@ +../../../../mrp_bom_version_note \ No newline at end of file diff --git a/setup/mrp_bom_version_note/setup.py b/setup/mrp_bom_version_note/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_bom_version_note/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_bom_version_report/odoo/addons/mrp_bom_version_report b/setup/mrp_bom_version_report/odoo/addons/mrp_bom_version_report new file mode 120000 index 000000000..502755639 --- /dev/null +++ b/setup/mrp_bom_version_report/odoo/addons/mrp_bom_version_report @@ -0,0 +1 @@ +../../../../mrp_bom_version_report \ No newline at end of file diff --git a/setup/mrp_bom_version_report/setup.py b/setup/mrp_bom_version_report/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_bom_version_report/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_component_show_info/odoo/addons/mrp_component_show_info b/setup/mrp_component_show_info/odoo/addons/mrp_component_show_info new file mode 120000 index 000000000..2a0688fd1 --- /dev/null +++ b/setup/mrp_component_show_info/odoo/addons/mrp_component_show_info @@ -0,0 +1 @@ +../../../../mrp_component_show_info \ No newline at end of file diff --git a/setup/mrp_component_show_info/setup.py b/setup/mrp_component_show_info/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_component_show_info/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_cost/odoo/addons/mrp_production_cost b/setup/mrp_production_cost/odoo/addons/mrp_production_cost new file mode 120000 index 000000000..163f7ef00 --- /dev/null +++ b/setup/mrp_production_cost/odoo/addons/mrp_production_cost @@ -0,0 +1 @@ +../../../../mrp_production_cost \ No newline at end of file diff --git a/setup/mrp_production_cost/setup.py b/setup/mrp_production_cost/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_cost/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_deconstruction_reader/odoo/addons/mrp_production_deconstruction_reader b/setup/mrp_production_deconstruction_reader/odoo/addons/mrp_production_deconstruction_reader new file mode 120000 index 000000000..11eaf5141 --- /dev/null +++ b/setup/mrp_production_deconstruction_reader/odoo/addons/mrp_production_deconstruction_reader @@ -0,0 +1 @@ +../../../../mrp_production_deconstruction_reader \ No newline at end of file diff --git a/setup/mrp_production_deconstruction_reader/setup.py b/setup/mrp_production_deconstruction_reader/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_deconstruction_reader/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_historical/odoo/addons/mrp_production_historical b/setup/mrp_production_historical/odoo/addons/mrp_production_historical new file mode 120000 index 000000000..322e2de76 --- /dev/null +++ b/setup/mrp_production_historical/odoo/addons/mrp_production_historical @@ -0,0 +1 @@ +../../../../mrp_production_historical \ No newline at end of file diff --git a/setup/mrp_production_historical/setup.py b/setup/mrp_production_historical/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_historical/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_historical_bom_version/odoo/addons/mrp_production_historical_bom_version b/setup/mrp_production_historical_bom_version/odoo/addons/mrp_production_historical_bom_version new file mode 120000 index 000000000..21f903bb7 --- /dev/null +++ b/setup/mrp_production_historical_bom_version/odoo/addons/mrp_production_historical_bom_version @@ -0,0 +1 @@ +../../../../mrp_production_historical_bom_version \ No newline at end of file diff --git a/setup/mrp_production_historical_bom_version/setup.py b/setup/mrp_production_historical_bom_version/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_historical_bom_version/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_historical_follower/odoo/addons/mrp_production_historical_follower b/setup/mrp_production_historical_follower/odoo/addons/mrp_production_historical_follower new file mode 120000 index 000000000..a7513cf99 --- /dev/null +++ b/setup/mrp_production_historical_follower/odoo/addons/mrp_production_historical_follower @@ -0,0 +1 @@ +../../../../mrp_production_historical_follower \ No newline at end of file diff --git a/setup/mrp_production_historical_follower/setup.py b/setup/mrp_production_historical_follower/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_historical_follower/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_owner/odoo/addons/mrp_production_owner b/setup/mrp_production_owner/odoo/addons/mrp_production_owner new file mode 120000 index 000000000..6b1e9fe5a --- /dev/null +++ b/setup/mrp_production_owner/odoo/addons/mrp_production_owner @@ -0,0 +1 @@ +../../../../mrp_production_owner \ No newline at end of file diff --git a/setup/mrp_production_owner/setup.py b/setup/mrp_production_owner/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_owner/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_report/odoo/addons/mrp_production_report b/setup/mrp_production_report/odoo/addons/mrp_production_report new file mode 120000 index 000000000..4838c7d83 --- /dev/null +++ b/setup/mrp_production_report/odoo/addons/mrp_production_report @@ -0,0 +1 @@ +../../../../mrp_production_report \ No newline at end of file diff --git a/setup/mrp_production_report/setup.py b/setup/mrp_production_report/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_report/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_report_bom_version/odoo/addons/mrp_production_report_bom_version b/setup/mrp_production_report_bom_version/odoo/addons/mrp_production_report_bom_version new file mode 120000 index 000000000..d0aeb5155 --- /dev/null +++ b/setup/mrp_production_report_bom_version/odoo/addons/mrp_production_report_bom_version @@ -0,0 +1 @@ +../../../../mrp_production_report_bom_version \ No newline at end of file diff --git a/setup/mrp_production_report_bom_version/setup.py b/setup/mrp_production_report_bom_version/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_report_bom_version/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_report_note/odoo/addons/mrp_production_report_note b/setup/mrp_production_report_note/odoo/addons/mrp_production_report_note new file mode 120000 index 000000000..358a3e976 --- /dev/null +++ b/setup/mrp_production_report_note/odoo/addons/mrp_production_report_note @@ -0,0 +1 @@ +../../../../mrp_production_report_note \ No newline at end of file diff --git a/setup/mrp_production_report_note/setup.py b/setup/mrp_production_report_note/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_report_note/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_report_sale_info/odoo/addons/mrp_production_report_sale_info b/setup/mrp_production_report_sale_info/odoo/addons/mrp_production_report_sale_info new file mode 120000 index 000000000..10fd4f4f4 --- /dev/null +++ b/setup/mrp_production_report_sale_info/odoo/addons/mrp_production_report_sale_info @@ -0,0 +1 @@ +../../../../mrp_production_report_sale_info \ No newline at end of file diff --git a/setup/mrp_production_report_sale_info/setup.py b/setup/mrp_production_report_sale_info/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_report_sale_info/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_split_finished_product_by_serials/odoo/addons/mrp_production_split_finished_product_by_serials b/setup/mrp_production_split_finished_product_by_serials/odoo/addons/mrp_production_split_finished_product_by_serials new file mode 120000 index 000000000..a30dc9be3 --- /dev/null +++ b/setup/mrp_production_split_finished_product_by_serials/odoo/addons/mrp_production_split_finished_product_by_serials @@ -0,0 +1 @@ +../../../../mrp_production_split_finished_product_by_serials \ No newline at end of file diff --git a/setup/mrp_production_split_finished_product_by_serials/setup.py b/setup/mrp_production_split_finished_product_by_serials/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_split_finished_product_by_serials/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_production_split_finished_product_lot_sequence/odoo/addons/mrp_production_split_finished_product_lot_sequence b/setup/mrp_production_split_finished_product_lot_sequence/odoo/addons/mrp_production_split_finished_product_lot_sequence new file mode 120000 index 000000000..7f5668224 --- /dev/null +++ b/setup/mrp_production_split_finished_product_lot_sequence/odoo/addons/mrp_production_split_finished_product_lot_sequence @@ -0,0 +1 @@ +../../../../mrp_production_split_finished_product_lot_sequence \ No newline at end of file diff --git a/setup/mrp_production_split_finished_product_lot_sequence/setup.py b/setup/mrp_production_split_finished_product_lot_sequence/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_production_split_finished_product_lot_sequence/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/mrp_subcontracting_owner/odoo/addons/mrp_subcontracting_owner b/setup/mrp_subcontracting_owner/odoo/addons/mrp_subcontracting_owner new file mode 120000 index 000000000..8cb60aa42 --- /dev/null +++ b/setup/mrp_subcontracting_owner/odoo/addons/mrp_subcontracting_owner @@ -0,0 +1 @@ +../../../../mrp_subcontracting_owner \ No newline at end of file diff --git a/setup/mrp_subcontracting_owner/setup.py b/setup/mrp_subcontracting_owner/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_subcontracting_owner/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/product_last_mrp_cost_info/odoo/addons/product_last_mrp_cost_info b/setup/product_last_mrp_cost_info/odoo/addons/product_last_mrp_cost_info new file mode 120000 index 000000000..06e14e9d4 --- /dev/null +++ b/setup/product_last_mrp_cost_info/odoo/addons/product_last_mrp_cost_info @@ -0,0 +1 @@ +../../../../product_last_mrp_cost_info \ No newline at end of file diff --git a/setup/product_last_mrp_cost_info/setup.py b/setup/product_last_mrp_cost_info/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/product_last_mrp_cost_info/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/product_last_mrp_info/odoo/addons/product_last_mrp_info b/setup/product_last_mrp_info/odoo/addons/product_last_mrp_info new file mode 120000 index 000000000..01f0d7b41 --- /dev/null +++ b/setup/product_last_mrp_info/odoo/addons/product_last_mrp_info @@ -0,0 +1 @@ +../../../../product_last_mrp_info \ No newline at end of file diff --git a/setup/product_last_mrp_info/setup.py b/setup/product_last_mrp_info/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/product_last_mrp_info/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/quality_control_claim/odoo/addons/quality_control_claim b/setup/quality_control_claim/odoo/addons/quality_control_claim new file mode 120000 index 000000000..f9d8077e3 --- /dev/null +++ b/setup/quality_control_claim/odoo/addons/quality_control_claim @@ -0,0 +1 @@ +../../../../quality_control_claim \ No newline at end of file diff --git a/setup/quality_control_claim/setup.py b/setup/quality_control_claim/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/quality_control_claim/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)