From 6dd1b66242f4f3957cac53374ecc460d919440a2 Mon Sep 17 00:00:00 2001 From: Alfredo Date: Thu, 14 Nov 2024 14:42:13 +0100 Subject: [PATCH] [16.0][ADD] mrp_qr_label: New QR labels in manufacturing orders. --- mrp_qr_label/README.rst | 29 +++++ mrp_qr_label/__init__.py | 1 + mrp_qr_label/__manifest__.py | 17 +++ mrp_qr_label/i18n/ca_ES.po | 102 ++++++++++++++++ mrp_qr_label/i18n/en_GB.po | 102 ++++++++++++++++ mrp_qr_label/i18n/es.po | 114 ++++++++++++++++++ mrp_qr_label/i18n/fr.po | 102 ++++++++++++++++ mrp_qr_label/i18n/mrp_qr_label.pot | 102 ++++++++++++++++ mrp_qr_label/models/__init__.py | 1 + mrp_qr_label/models/stock_move.py | 15 +++ .../report/mrp_consumed_product_qr_label.xml | 37 ++++++ .../report/mrp_finished_product_qr_label.xml | 90 ++++++++++++++ .../mrp_product_to_consume_qr_label.xml | 93 ++++++++++++++ setup/mrp_qr_label/odoo/addons/mrp_qr_label | 1 + setup/mrp_qr_label/setup.py | 6 + 15 files changed, 812 insertions(+) create mode 100644 mrp_qr_label/README.rst create mode 100644 mrp_qr_label/__init__.py create mode 100644 mrp_qr_label/__manifest__.py create mode 100644 mrp_qr_label/i18n/ca_ES.po create mode 100644 mrp_qr_label/i18n/en_GB.po create mode 100644 mrp_qr_label/i18n/es.po create mode 100644 mrp_qr_label/i18n/fr.po create mode 100644 mrp_qr_label/i18n/mrp_qr_label.pot create mode 100644 mrp_qr_label/models/__init__.py create mode 100644 mrp_qr_label/models/stock_move.py create mode 100644 mrp_qr_label/report/mrp_consumed_product_qr_label.xml create mode 100644 mrp_qr_label/report/mrp_finished_product_qr_label.xml create mode 100644 mrp_qr_label/report/mrp_product_to_consume_qr_label.xml create mode 120000 setup/mrp_qr_label/odoo/addons/mrp_qr_label create mode 100644 setup/mrp_qr_label/setup.py diff --git a/mrp_qr_label/README.rst b/mrp_qr_label/README.rst new file mode 100644 index 000000000..aa952314f --- /dev/null +++ b/mrp_qr_label/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 QR label +============ + +* In Manufacturing Order new reports: "Finished Product QR Label", and + "Products to consume QR Label". + +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_qr_label/__init__.py b/mrp_qr_label/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/mrp_qr_label/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mrp_qr_label/__manifest__.py b/mrp_qr_label/__manifest__.py new file mode 100644 index 000000000..f485e8aee --- /dev/null +++ b/mrp_qr_label/__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 QR Label", + "version": "16.0.1.0.0", + "author": "Avanzosc", + "website": "https://github.com/avanzosc/mrp-addons", + "category": "Manufacturing/Manufacturing", + "license": "AGPL-3", + "depends": ["mrp", "stock_product_qr_label"], + "data": [ + "report/mrp_finished_product_qr_label.xml", + "report/mrp_product_to_consume_qr_label.xml", + "report/mrp_consumed_product_qr_label.xml", + ], + "installable": True, +} diff --git a/mrp_qr_label/i18n/ca_ES.po b/mrp_qr_label/i18n/ca_ES.po new file mode 100644 index 000000000..1f457f4bc --- /dev/null +++ b/mrp_qr_label/i18n/ca_ES.po @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_qr_label +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-19 10:54+0000\n" +"PO-Revision-Date: 2024-11-19 10: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_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "" +"('QR Label Consumed Products For Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "('QR Label For Finished Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "" +"('QR Label Products To Consume For Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Bin: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Loc.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Qty.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "Consumed: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "" +"Loc.: \n" +"
" +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "Lot.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "To Consum: " +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "Consumed Products QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "Finished Product QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "Products to consume QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_move__qr_code +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_reservation__qr_code +msgid "QR Code" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.model,name:mrp_qr_label.model_stock_move +msgid "Stock Move" +msgstr "Moviment d'estoc" diff --git a/mrp_qr_label/i18n/en_GB.po b/mrp_qr_label/i18n/en_GB.po new file mode 100644 index 000000000..f16fbe1cc --- /dev/null +++ b/mrp_qr_label/i18n/en_GB.po @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_qr_label +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-19 10:54+0000\n" +"PO-Revision-Date: 2024-11-19 10: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_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "" +"('QR Label Consumed Products For Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "('QR Label For Finished Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "" +"('QR Label Products To Consume For Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Bin: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Loc.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Qty.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "Consumed: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "" +"Loc.: \n" +"
" +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "Lot.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "To Consum: " +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "Consumed Products QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "Finished Product QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "Products to consume QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_move__qr_code +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_reservation__qr_code +msgid "QR Code" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.model,name:mrp_qr_label.model_stock_move +msgid "Stock Move" +msgstr "" diff --git a/mrp_qr_label/i18n/es.po b/mrp_qr_label/i18n/es.po new file mode 100644 index 000000000..249b85fd7 --- /dev/null +++ b/mrp_qr_label/i18n/es.po @@ -0,0 +1,114 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_qr_label +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-19 10:54+0000\n" +"PO-Revision-Date: 2024-11-19 10: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_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "" +"('QR Label Consumed Products For Product - %s' % (object.product_id.name))" +msgstr "" +"('Etiqueta QR Productos Consumidos Para Producto - %s' % (object.product_id.name))" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "('QR Label For Finished Product - %s' % (object.product_id.name))" +msgstr "" +"('Etiqueta QR Para Producto Terminado - %s' % (object.product_id.name))" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "" +"('QR Label Products To Consume For Product - %s' % (object.product_id.name))" +msgstr "" +"('Etiquta QR Productos A Consumir Para Producto - %s' % " +"(object.product_id.name))" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Bin: " +msgstr "" +"
\n" +" Bin: " + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Loc.: " +msgstr "" +"
\n" +" Ubic.: " + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Qty.: " +msgstr "" +"
\n" +" Cant.: " + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "Consumed: " +msgstr "Consumido: " + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "" +"Loc.: \n" +"
" +msgstr "" +"Ubic.: \n" +"
" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "Lot.: " +msgstr "Lote: " + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "To Consum: " +msgstr "A consumir: " + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "Consumed Products QR Label" +msgstr "Etiqueta QR Productos consumidos" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "Finished Product QR Label" +msgstr "Etiqueta QR Producto finalizado" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "Products to consume QR Label" +msgstr "Etiqueta QR Productos a consumir" + +#. module: mrp_qr_label +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_move__qr_code +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_reservation__qr_code +msgid "QR Code" +msgstr "Código QR" + +#. module: mrp_qr_label +#: model:ir.model,name:mrp_qr_label.model_stock_move +msgid "Stock Move" +msgstr "Movimiento de existencias" diff --git a/mrp_qr_label/i18n/fr.po b/mrp_qr_label/i18n/fr.po new file mode 100644 index 000000000..95ee31d06 --- /dev/null +++ b/mrp_qr_label/i18n/fr.po @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_qr_label +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-19 10:54+0000\n" +"PO-Revision-Date: 2024-11-19 10: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_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "" +"('QR Label Consumed Products For Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "('QR Label For Finished Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "" +"('QR Label Products To Consume For Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Bin: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Loc.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Qty.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "Consumed: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "" +"Loc.: \n" +"
" +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "Lot.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "To Consum: " +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "Consumed Products QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "Finished Product QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "Products to consume QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_move__qr_code +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_reservation__qr_code +msgid "QR Code" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.model,name:mrp_qr_label.model_stock_move +msgid "Stock Move" +msgstr "Mouvement de stock" diff --git a/mrp_qr_label/i18n/mrp_qr_label.pot b/mrp_qr_label/i18n/mrp_qr_label.pot new file mode 100644 index 000000000..49647a7c0 --- /dev/null +++ b/mrp_qr_label/i18n/mrp_qr_label.pot @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_qr_label +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-19 10:53+0000\n" +"PO-Revision-Date: 2024-11-19 10:53+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "" +"('QR Label Consumed Products For Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "('QR Label For Finished Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,print_report_name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "" +"('QR Label Products To Consume For Product - %s' % (object.product_id.name))" +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Bin: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Loc.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "" +"
\n" +" Qty.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "Consumed: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "" +"Loc.: \n" +"
" +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_finished_product_qr_label_document +msgid "Lot.: " +msgstr "" + +#. module: mrp_qr_label +#: model_terms:ir.ui.view,arch_db:mrp_qr_label.mrp_product_to_consume_qr_label_document +msgid "To Consum: " +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_consumed_product_qr_label_report +msgid "Consumed Products QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_finished_product_qr_label_report +msgid "Finished Product QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.actions.report,name:mrp_qr_label.action_mrp_product_to_consume_qr_label_report +msgid "Products to consume QR Label" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_move__qr_code +#: model:ir.model.fields,field_description:mrp_qr_label.field_stock_reservation__qr_code +msgid "QR Code" +msgstr "" + +#. module: mrp_qr_label +#: model:ir.model,name:mrp_qr_label.model_stock_move +msgid "Stock Move" +msgstr "" diff --git a/mrp_qr_label/models/__init__.py b/mrp_qr_label/models/__init__.py new file mode 100644 index 000000000..6bda2d242 --- /dev/null +++ b/mrp_qr_label/models/__init__.py @@ -0,0 +1 @@ +from . import stock_move diff --git a/mrp_qr_label/models/stock_move.py b/mrp_qr_label/models/stock_move.py new file mode 100644 index 000000000..7dd23d57e --- /dev/null +++ b/mrp_qr_label/models/stock_move.py @@ -0,0 +1,15 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class StockMove(models.Model): + _inherit = "stock.move" + + qr_code = fields.Char(string="QR Code", compute="_compute_qr_code") + + def _compute_qr_code(self): + for move in self: + move.qr_code = ( + move.product_id.code if move.product_id.code else move.product_id.name + ) diff --git a/mrp_qr_label/report/mrp_consumed_product_qr_label.xml b/mrp_qr_label/report/mrp_consumed_product_qr_label.xml new file mode 100644 index 000000000..c68c77ca7 --- /dev/null +++ b/mrp_qr_label/report/mrp_consumed_product_qr_label.xml @@ -0,0 +1,37 @@ + + + + + + Consumed Products QR Label + mrp.production + qweb-pdf + mrp_qr_label.report_mrp_consumed_product_qr_label + mrp_qr_label.report_mrp_consumed_product_qr_label + ('QR Label Consumed Products For Product - %s' % (object.product_id.name)) + + report + + + diff --git a/mrp_qr_label/report/mrp_finished_product_qr_label.xml b/mrp_qr_label/report/mrp_finished_product_qr_label.xml new file mode 100644 index 000000000..c37f79b60 --- /dev/null +++ b/mrp_qr_label/report/mrp_finished_product_qr_label.xml @@ -0,0 +1,90 @@ + + + + + + + + Finished Product QR Label + mrp.production + qweb-pdf + mrp_qr_label.report_mrp_finished_product_qr_label + mrp_qr_label.report_mrp_finished_product_qr_label + ('QR Label For Finished Product - %s' % (object.product_id.name)) + + report + + + diff --git a/mrp_qr_label/report/mrp_product_to_consume_qr_label.xml b/mrp_qr_label/report/mrp_product_to_consume_qr_label.xml new file mode 100644 index 000000000..7b93eae0a --- /dev/null +++ b/mrp_qr_label/report/mrp_product_to_consume_qr_label.xml @@ -0,0 +1,93 @@ + + + + + + + + Products to consume QR Label + mrp.production + qweb-pdf + mrp_qr_label.report_mrp_product_to_consume_qr_label + mrp_qr_label.report_mrp_product_to_consume_qr_label + ('QR Label Products To Consume For Product - %s' % (object.product_id.name)) + + report + + + diff --git a/setup/mrp_qr_label/odoo/addons/mrp_qr_label b/setup/mrp_qr_label/odoo/addons/mrp_qr_label new file mode 120000 index 000000000..ed9e11429 --- /dev/null +++ b/setup/mrp_qr_label/odoo/addons/mrp_qr_label @@ -0,0 +1 @@ +../../../../mrp_qr_label \ No newline at end of file diff --git a/setup/mrp_qr_label/setup.py b/setup/mrp_qr_label/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mrp_qr_label/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)