diff --git a/setup/stock_picking_report_custom_description/odoo/addons/stock_picking_report_custom_description b/setup/stock_picking_report_custom_description/odoo/addons/stock_picking_report_custom_description new file mode 120000 index 0000000..fa882a4 --- /dev/null +++ b/setup/stock_picking_report_custom_description/odoo/addons/stock_picking_report_custom_description @@ -0,0 +1 @@ +../../../../stock_picking_report_custom_description \ No newline at end of file diff --git a/setup/stock_picking_report_custom_description/setup.py b/setup/stock_picking_report_custom_description/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/stock_picking_report_custom_description/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_picking_report_custom_description/README.rst b/stock_picking_report_custom_description/README.rst new file mode 100644 index 0000000..d77e356 --- /dev/null +++ b/stock_picking_report_custom_description/README.rst @@ -0,0 +1,101 @@ +======================================= +Stock Picking Report Custom Description +======================================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-reporting/tree/15.0/stock_picking_report_custom_description + :alt: OCA/stock-logistics-reporting +.. |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_custom_description + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/stock-logistics-reporting&target_branch=15.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module transfers the sales order line description to the picking, and +allows to print such text on the picking reports. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Create a sale order and set manual description in sale order lines. +#. Confirm the order. +#. Navigate to the delivery through the smart-button. +#. You can print the reports with move name instead product name on the specific + reports: + + * Delivery Slip (Description). + * Picking Operations (Description) + +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 +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_: + + * Carlos Dauden + * Sergio Teruel + * Ernesto Tejeda + * Pilar Vargas + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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-carlosdauden| image:: https://github.com/carlosdauden.png?size=40px + :target: https://github.com/carlosdauden + :alt: carlosdauden + +Current `maintainer `__: + +|maintainer-carlosdauden| + +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_custom_description/__init__.py b/stock_picking_report_custom_description/__init__.py new file mode 100644 index 0000000..02179fb --- /dev/null +++ b/stock_picking_report_custom_description/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import models diff --git a/stock_picking_report_custom_description/__manifest__.py b/stock_picking_report_custom_description/__manifest__.py new file mode 100644 index 0000000..d881d1d --- /dev/null +++ b/stock_picking_report_custom_description/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2017 Tecnativa - Carlos Dauden +# Copyright 2018 Tecnativa - Vicent Cubells +# Copyright 2018 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Stock Picking Report Custom Description", + "summary": "Show moves description in picking reports", + "version": "15.0.1.0.0", + "category": "Warehouse", + "website": "https://github.com/OCA/stock-logistics-reporting", + "author": "Tecnativa, Odoo Community Association (OCA)", + "development_status": "Production/Stable", + "maintainers": ["carlosdauden"], + "license": "AGPL-3", + "depends": [ + "sale_stock", + ], + "data": [ + "views/report_deliveryslip.xml", + "views/report_stockpicking_operations.xml", + "views/stock_report.xml", + ], +} diff --git a/stock_picking_report_custom_description/i18n/es.po b/stock_picking_report_custom_description/i18n/es.po new file mode 100644 index 0000000..2cb3573 --- /dev/null +++ b/stock_picking_report_custom_description/i18n/es.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_report_custom_description +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-12-04 15:34+0000\n" +"PO-Revision-Date: 2019-12-04 16:35+0100\n" +"Last-Translator: Carlos Dauden \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: \n" +"X-Generator: Poedit 2.0.6\n" + +#. module: stock_picking_report_custom_description +#: model:ir.actions.report,name:stock_picking_report_custom_description.action_report_delivery_description +msgid "Delivery Slip (Description)" +msgstr "Vale de entrega (descripción)" + +#. module: stock_picking_report_custom_description +#: model:ir.actions.report,name:stock_picking_report_custom_description.action_report_picking_description +msgid "Picking Operations (Description)" +msgstr "Operaciones de picking (descripción)" + +#~ msgid "Description" +#~ msgstr "Descripción" + +#~ msgid "Qty" +#~ msgstr "Ctd." + +#~ msgid "Packing Operation" +#~ msgstr "Operación de empaquetado" + +#~ msgid "Several product description" +#~ msgstr "Varias descripciones de producto" diff --git a/stock_picking_report_custom_description/i18n/stock_picking_report_custom_description.pot b/stock_picking_report_custom_description/i18n/stock_picking_report_custom_description.pot new file mode 100644 index 0000000..1bb08a0 --- /dev/null +++ b/stock_picking_report_custom_description/i18n/stock_picking_report_custom_description.pot @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_report_custom_description +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \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: stock_picking_report_custom_description +#: model:ir.actions.report,name:stock_picking_report_custom_description.action_report_delivery_description +msgid "Delivery Slip (Description)" +msgstr "" + +#. module: stock_picking_report_custom_description +#: model:ir.actions.report,name:stock_picking_report_custom_description.action_report_picking_description +msgid "Picking Operations (Description)" +msgstr "" diff --git a/stock_picking_report_custom_description/models/__init__.py b/stock_picking_report_custom_description/models/__init__.py new file mode 100644 index 0000000..c6e6e2f --- /dev/null +++ b/stock_picking_report_custom_description/models/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import stock_rule diff --git a/stock_picking_report_custom_description/models/stock_rule.py b/stock_picking_report_custom_description/models/stock_rule.py new file mode 100644 index 0000000..041dc83 --- /dev/null +++ b/stock_picking_report_custom_description/models/stock_rule.py @@ -0,0 +1,35 @@ +# Copyright 2022 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class StockRule(models.Model): + _inherit = "stock.rule" + + def _get_stock_move_values( + self, + product_id, + product_qty, + product_uom, + location_id, + name, + origin, + company_id, + values, + ): + """Transfer the SO line description to the move name.""" + res = super()._get_stock_move_values( + product_id, + product_qty, + product_uom, + location_id, + name, + origin, + company_id, + values, + ) + if values.get("sale_line_id"): + line = self.env["sale.order.line"].browse(values["sale_line_id"]) + res["name"] = line.name + return res diff --git a/stock_picking_report_custom_description/readme/CONTRIBUTORS.rst b/stock_picking_report_custom_description/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..0b7af09 --- /dev/null +++ b/stock_picking_report_custom_description/readme/CONTRIBUTORS.rst @@ -0,0 +1,6 @@ +* `Tecnativa `_: + + * Carlos Dauden + * Sergio Teruel + * Ernesto Tejeda + * Pilar Vargas diff --git a/stock_picking_report_custom_description/readme/DESCRIPTION.rst b/stock_picking_report_custom_description/readme/DESCRIPTION.rst new file mode 100644 index 0000000..a2d382e --- /dev/null +++ b/stock_picking_report_custom_description/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module transfers the sales order line description to the picking, and +allows to print such text on the picking reports. diff --git a/stock_picking_report_custom_description/readme/USAGE.rst b/stock_picking_report_custom_description/readme/USAGE.rst new file mode 100644 index 0000000..66a59ec --- /dev/null +++ b/stock_picking_report_custom_description/readme/USAGE.rst @@ -0,0 +1,10 @@ +To use this module, you need to: + +#. Create a sale order and set manual description in sale order lines. +#. Confirm the order. +#. Navigate to the delivery through the smart-button. +#. You can print the reports with move name instead product name on the specific + reports: + + * Delivery Slip (Description). + * Picking Operations (Description). diff --git a/stock_picking_report_custom_description/static/description/icon.png b/stock_picking_report_custom_description/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/stock_picking_report_custom_description/static/description/icon.png differ diff --git a/stock_picking_report_custom_description/static/description/index.html b/stock_picking_report_custom_description/static/description/index.html new file mode 100644 index 0000000..5035a46 --- /dev/null +++ b/stock_picking_report_custom_description/static/description/index.html @@ -0,0 +1,444 @@ + + + + + + +Stock Picking Report Custom Description + + + +
+

Stock Picking Report Custom Description

+ + +

Production/Stable License: AGPL-3 OCA/stock-logistics-reporting Translate me on Weblate Try me on Runboat

+

This module transfers the sales order line description to the picking, and +allows to print such text on the picking reports.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Create a sale order and set manual description in sale order lines.
  2. +
  3. Confirm the order.
  4. +
  5. Navigate to the delivery through the smart-button.
  6. +
  7. You can print the reports with move name instead product name on the specific +reports:
      +
    • Delivery Slip (Description).
    • +
    • Picking Operations (Description)
    • +
    +
  8. +
+
+
+

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 +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa:
      +
    • Carlos Dauden
    • +
    • Sergio Teruel
    • +
    • Ernesto Tejeda
    • +
    • Pilar Vargas
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

Current maintainer:

+

carlosdauden

+

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_custom_description/tests/__init__.py b/stock_picking_report_custom_description/tests/__init__.py new file mode 100644 index 0000000..21aa35c --- /dev/null +++ b/stock_picking_report_custom_description/tests/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import test_stock_picking_report_custom_description diff --git a/stock_picking_report_custom_description/tests/test_stock_picking_report_custom_description.py b/stock_picking_report_custom_description/tests/test_stock_picking_report_custom_description.py new file mode 100644 index 0000000..84981cf --- /dev/null +++ b/stock_picking_report_custom_description/tests/test_stock_picking_report_custom_description.py @@ -0,0 +1,24 @@ +# Copyright 2022 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests import common + + +class TestStockPickingReportCustomDescription(common.TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.customer = cls.env["res.partner"].create({"name": "Test customer"}) + cls.product = cls.env["product.product"].create( + {"name": "Test product", "type": "product"} + ) + order_form = common.Form(cls.env["sale.order"]) + order_form.partner_id = cls.customer + with order_form.order_line.new() as line_form: + line_form.product_id = cls.product + line_form.name = "Custom description" + cls.order = order_form.save() + + def test_so_custom_description_transfer_to_picking(self): + self.order.action_confirm() + self.assertEqual(self.order.order_line.move_ids.name, "Custom description") diff --git a/stock_picking_report_custom_description/views/report_deliveryslip.xml b/stock_picking_report_custom_description/views/report_deliveryslip.xml new file mode 100644 index 0000000..4931ab4 --- /dev/null +++ b/stock_picking_report_custom_description/views/report_deliveryslip.xml @@ -0,0 +1,62 @@ + + + + + + + + + + diff --git a/stock_picking_report_custom_description/views/report_stockpicking_operations.xml b/stock_picking_report_custom_description/views/report_stockpicking_operations.xml new file mode 100644 index 0000000..ac2701a --- /dev/null +++ b/stock_picking_report_custom_description/views/report_stockpicking_operations.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/stock_picking_report_custom_description/views/stock_report.xml b/stock_picking_report_custom_description/views/stock_report.xml new file mode 100644 index 0000000..1465285 --- /dev/null +++ b/stock_picking_report_custom_description/views/stock_report.xml @@ -0,0 +1,29 @@ + + + + Picking Operations (Description) + stock.picking + qweb-pdf + stock_picking_report_custom_description.report_picking_description + stock_picking_report_custom_description.report_picking_operations_description + + report + + + Delivery Slip (Description) + stock.picking + qweb-pdf + stock_picking_report_custom_description.report_deliveryslip_description + stock_picking_report_custom_description.report_deliveryslip_description + + report + +