diff --git a/stock_picking_report_product_sticker/README.rst b/stock_picking_report_product_sticker/README.rst index ca585d5..97cef30 100644 --- a/stock_picking_report_product_sticker/README.rst +++ b/stock_picking_report_product_sticker/README.rst @@ -2,10 +2,13 @@ Stock Picking Report - Product Sticker ====================================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:0f26f8c5829d171015747e7f0ef2ef426fe9627c9bea856a5060adddd5753db4 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Stock Picking Report - Product Sticker .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/stock-logistics-reporting-15-0/stock-logistics-reporting-15-0-stock_picking_report_product_sticker :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/151/15.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-reporting&target_branch=15.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows you to display the Product Stickers in the Delivery Slip reports. @@ -44,8 +47,8 @@ Usage To use this module, you need to: #. You must go to the Picking Type that you want to show the Product Stickers - and activate the option to *Show Stickers on Pickings of this type*. -#. You can also enable or disable showing Stickers on each Picking by hand if you wish. + and choose the desired position of the stickers on the field *Show Product Stickers*. +#. You can also change the position or disable it on each Picking by hand if you wish. Regardless if your Picking Type has Show Stickers enabled or not. Bug Tracker @@ -53,7 +56,7 @@ 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 smashing it by providing a detailed and welcomed +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -84,6 +87,14 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. +.. |maintainer-Shide| image:: https://github.com/Shide.png?size=40px + :target: https://github.com/Shide + :alt: Shide + +Current `maintainer `__: + +|maintainer-Shide| + This module is part of the `OCA/stock-logistics-reporting `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_picking_report_product_sticker/__manifest__.py b/stock_picking_report_product_sticker/__manifest__.py index 0708a76..c9e935b 100644 --- a/stock_picking_report_product_sticker/__manifest__.py +++ b/stock_picking_report_product_sticker/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Stock Picking Report - Product Sticker", - "version": "15.0.1.0.1", + "version": "15.0.1.0.2", "author": "Moduon, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/stock-logistics-reporting", @@ -18,6 +18,6 @@ "report/report_deliveryslip.xml", "data/menus.xml", ], - "maintainer": ["Shide"], + "maintainers": ["Shide"], "installable": True, } diff --git a/stock_picking_report_product_sticker/i18n/es.po b/stock_picking_report_product_sticker/i18n/es.po new file mode 100644 index 0000000..f02a0cb --- /dev/null +++ b/stock_picking_report_product_sticker/i18n/es.po @@ -0,0 +1,70 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_report_product_sticker +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-31 10:48+0000\n" +"PO-Revision-Date: 2023-10-28 16:00+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields.selection,name:stock_picking_report_product_sticker.selection__stock_picking__show_product_stickers__bottom_left +#: model:ir.model.fields.selection,name:stock_picking_report_product_sticker.selection__stock_picking_type__show_product_stickers__bottom_left +msgid "Bottom (left)" +msgstr "Abajo (izquierda)" + +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields,help:stock_picking_report_product_sticker.field_stock_picking_type__show_product_stickers +msgid "Display Product Stickers on chosen position inside the report." +msgstr "" +"Mostrar Pegatinas de Producto en la posición elegida dentro del informe." + +#. module: stock_picking_report_product_sticker +#: model:ir.model,name:stock_picking_report_product_sticker.model_stock_picking_type +msgid "Picking Type" +msgstr "Tipo de albarán" + +#. module: stock_picking_report_product_sticker +#: model:ir.ui.menu,name:stock_picking_report_product_sticker.menu_stock_picking_report_product_sticker +msgid "Product Stickers" +msgstr "Pegatinas de producto" + +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields,field_description:stock_picking_report_product_sticker.field_stock_picking__show_product_stickers +#: model:ir.model.fields,field_description:stock_picking_report_product_sticker.field_stock_picking_type__show_product_stickers +msgid "Show Product Stickers" +msgstr "Mostrar pegatinas de productos" + +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields,help:stock_picking_report_product_sticker.field_stock_picking__show_product_stickers +msgid "Show Product Stickers on pickings of this type." +msgstr "Mostrar Pegatinas de productos en los albaranes de este tipo." + +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields,field_description:stock_picking_report_product_sticker.field_stock_picking__sticker_ids +msgid "Stickers" +msgstr "Pegatinas" + +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields.selection,name:stock_picking_report_product_sticker.selection__stock_picking__show_product_stickers__top_right +#: model:ir.model.fields.selection,name:stock_picking_report_product_sticker.selection__stock_picking_type__show_product_stickers__top_right +msgid "Top (right)" +msgstr "Arriba (derecha)" + +#. module: stock_picking_report_product_sticker +#: model:ir.model,name:stock_picking_report_product_sticker.model_stock_picking +msgid "Transfer" +msgstr "Albarán" + +#~ msgid "Position of the stickers inside the report." +#~ msgstr "Posición de las pegatinas de producto dentro del informe." diff --git a/stock_picking_report_product_sticker/i18n/stock_picking_report_product_sticker.pot b/stock_picking_report_product_sticker/i18n/stock_picking_report_product_sticker.pot index 065fe16..8fe2707 100644 --- a/stock_picking_report_product_sticker/i18n/stock_picking_report_product_sticker.pot +++ b/stock_picking_report_product_sticker/i18n/stock_picking_report_product_sticker.pot @@ -13,6 +13,17 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields.selection,name:stock_picking_report_product_sticker.selection__stock_picking__show_product_stickers__bottom_left +#: model:ir.model.fields.selection,name:stock_picking_report_product_sticker.selection__stock_picking_type__show_product_stickers__bottom_left +msgid "Bottom (left)" +msgstr "" + +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields,help:stock_picking_report_product_sticker.field_stock_picking_type__show_product_stickers +msgid "Display Product Stickers on chosen position inside the report." +msgstr "" + #. module: stock_picking_report_product_sticker #: model:ir.model,name:stock_picking_report_product_sticker.model_stock_picking_type msgid "Picking Type" @@ -29,11 +40,6 @@ msgstr "" msgid "Show Product Stickers" msgstr "" -#. module: stock_picking_report_product_sticker -#: model:ir.model.fields,help:stock_picking_report_product_sticker.field_stock_picking_type__show_product_stickers -msgid "Show Product Stickers on Pickings of this type." -msgstr "" - #. module: stock_picking_report_product_sticker #: model:ir.model.fields,help:stock_picking_report_product_sticker.field_stock_picking__show_product_stickers msgid "Show Product Stickers on pickings of this type." @@ -44,6 +50,12 @@ msgstr "" msgid "Stickers" msgstr "" +#. module: stock_picking_report_product_sticker +#: model:ir.model.fields.selection,name:stock_picking_report_product_sticker.selection__stock_picking__show_product_stickers__top_right +#: model:ir.model.fields.selection,name:stock_picking_report_product_sticker.selection__stock_picking_type__show_product_stickers__top_right +msgid "Top (right)" +msgstr "" + #. module: stock_picking_report_product_sticker #: model:ir.model,name:stock_picking_report_product_sticker.model_stock_picking msgid "Transfer" diff --git a/stock_picking_report_product_sticker/models/stock_picking.py b/stock_picking_report_product_sticker/models/stock_picking.py index 7f44aab..caf00c7 100644 --- a/stock_picking_report_product_sticker/models/stock_picking.py +++ b/stock_picking_report_product_sticker/models/stock_picking.py @@ -3,15 +3,18 @@ from odoo import api, fields, models +from .stock_picking_type import REPORT_STICKER_POSITIONS + class StockPicking(models.Model): _inherit = "stock.picking" - show_product_stickers = fields.Boolean( - help="Show Product Stickers on pickings of this type.", + show_product_stickers = fields.Selection( + selection=REPORT_STICKER_POSITIONS, compute="_compute_show_product_stickers", store=True, readonly=False, + help="Show Product Stickers on pickings of this type.", ) sticker_ids = fields.Many2many( comodel_name="product.sticker", @@ -20,7 +23,7 @@ class StockPicking(models.Model): store=False, ) - @api.depends("picking_type_id.show_product_stickers") + @api.depends("picking_type_id") def _compute_show_product_stickers(self): for picking in self: picking.show_product_stickers = ( diff --git a/stock_picking_report_product_sticker/models/stock_picking_type.py b/stock_picking_report_product_sticker/models/stock_picking_type.py index 64ca60d..2705f91 100644 --- a/stock_picking_report_product_sticker/models/stock_picking_type.py +++ b/stock_picking_report_product_sticker/models/stock_picking_type.py @@ -3,10 +3,16 @@ from odoo import fields, models +REPORT_STICKER_POSITIONS = [ + ("top_right", "Top (right)"), + ("bottom_left", "Bottom (left)"), +] + class StockPickingType(models.Model): _inherit = "stock.picking.type" - show_product_stickers = fields.Boolean( - help="Show Product Stickers on Pickings of this type.", + show_product_stickers = fields.Selection( + selection=REPORT_STICKER_POSITIONS, + help="Display Product Stickers on chosen position inside the report.", ) diff --git a/stock_picking_report_product_sticker/readme/USAGE.rst b/stock_picking_report_product_sticker/readme/USAGE.rst index d33b51c..526a53c 100644 --- a/stock_picking_report_product_sticker/readme/USAGE.rst +++ b/stock_picking_report_product_sticker/readme/USAGE.rst @@ -1,6 +1,6 @@ To use this module, you need to: #. You must go to the Picking Type that you want to show the Product Stickers - and activate the option to *Show Stickers on Pickings of this type*. -#. You can also enable or disable showing Stickers on each Picking by hand if you wish. + and choose the desired position of the stickers on the field *Show Product Stickers*. +#. You can also change the position or disable it on each Picking by hand if you wish. Regardless if your Picking Type has Show Stickers enabled or not. diff --git a/stock_picking_report_product_sticker/report/report_deliveryslip.xml b/stock_picking_report_product_sticker/report/report_deliveryslip.xml index 2243393..95e2f0e 100644 --- a/stock_picking_report_product_sticker/report/report_deliveryslip.xml +++ b/stock_picking_report_product_sticker/report/report_deliveryslip.xml @@ -8,8 +8,8 @@ >
+ +
+ +
+