From 6d9c3c30d1843ab9bbff10ae8f5f8ff788689767 Mon Sep 17 00:00:00 2001 From: Carlos Roca Date: Thu, 22 Jun 2023 13:36:02 +0200 Subject: [PATCH 1/7] [ADD] stock_picking_report_internal_delivery_address: Module to show delivery address on internal transfers --- .../README.rst | 80 ++++ .../__init__.py | 1 + .../__manifest__.py | 14 + .../models/__init__.py | 1 + .../models/stock_picking.py | 14 + .../readme/CONTRIBUTORS.rst | 4 + .../readme/DESCRIPTION.rst | 2 + .../static/description/index.html | 426 ++++++++++++++++++ 8 files changed, 542 insertions(+) create mode 100644 stock_picking_report_internal_delivery_address/README.rst create mode 100644 stock_picking_report_internal_delivery_address/__init__.py create mode 100644 stock_picking_report_internal_delivery_address/__manifest__.py create mode 100644 stock_picking_report_internal_delivery_address/models/__init__.py create mode 100644 stock_picking_report_internal_delivery_address/models/stock_picking.py create mode 100644 stock_picking_report_internal_delivery_address/readme/CONTRIBUTORS.rst create mode 100644 stock_picking_report_internal_delivery_address/readme/DESCRIPTION.rst create mode 100644 stock_picking_report_internal_delivery_address/static/description/index.html diff --git a/stock_picking_report_internal_delivery_address/README.rst b/stock_picking_report_internal_delivery_address/README.rst new file mode 100644 index 0000000..dbec8cb --- /dev/null +++ b/stock_picking_report_internal_delivery_address/README.rst @@ -0,0 +1,80 @@ +============================================== +Stock picking report internal delivery address +============================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:49a245155f97e57b3ab9be41caa0ac9ea239fcc673ee1a7f980294fb0b564a0b + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |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_internal_delivery_address + :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_internal_delivery_address + :alt: Translate me on Weblate +.. |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| + +This module allows you to show the delivery address on reports when the operation type +of the picking is internal. + +**Table of contents** + +.. contents:: + :local: + +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 to smash 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 Roca + * Carlos Dauden + +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. + +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_internal_delivery_address/__init__.py b/stock_picking_report_internal_delivery_address/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/stock_picking_report_internal_delivery_address/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_picking_report_internal_delivery_address/__manifest__.py b/stock_picking_report_internal_delivery_address/__manifest__.py new file mode 100644 index 0000000..cf17986 --- /dev/null +++ b/stock_picking_report_internal_delivery_address/__manifest__.py @@ -0,0 +1,14 @@ +# Copyright 2023 Carlos Roca - Tecnativa +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Stock picking report internal delivery address", + "summary": "Show delivery address when picking type is internal", + "version": "15.0.1.0.0", + "author": "Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-reporting", + "category": "Warehouse", + "license": "AGPL-3", + "depends": ["stock"], + "installable": True, +} diff --git a/stock_picking_report_internal_delivery_address/models/__init__.py b/stock_picking_report_internal_delivery_address/models/__init__.py new file mode 100644 index 0000000..ae4c272 --- /dev/null +++ b/stock_picking_report_internal_delivery_address/models/__init__.py @@ -0,0 +1 @@ +from . import stock_picking diff --git a/stock_picking_report_internal_delivery_address/models/stock_picking.py b/stock_picking_report_internal_delivery_address/models/stock_picking.py new file mode 100644 index 0000000..6c2520b --- /dev/null +++ b/stock_picking_report_internal_delivery_address/models/stock_picking.py @@ -0,0 +1,14 @@ +# Copyright 2023 Tecnativa - Sergio Teruel +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + def _is_to_external_location(self): + self.ensure_one() + return ( + super()._is_to_external_location() or self.picking_type_code == "internal" + ) diff --git a/stock_picking_report_internal_delivery_address/readme/CONTRIBUTORS.rst b/stock_picking_report_internal_delivery_address/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..20c7879 --- /dev/null +++ b/stock_picking_report_internal_delivery_address/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Carlos Roca + * Carlos Dauden diff --git a/stock_picking_report_internal_delivery_address/readme/DESCRIPTION.rst b/stock_picking_report_internal_delivery_address/readme/DESCRIPTION.rst new file mode 100644 index 0000000..06cfe22 --- /dev/null +++ b/stock_picking_report_internal_delivery_address/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows you to show the delivery address on reports when the operation type +of the picking is internal. diff --git a/stock_picking_report_internal_delivery_address/static/description/index.html b/stock_picking_report_internal_delivery_address/static/description/index.html new file mode 100644 index 0000000..3180947 --- /dev/null +++ b/stock_picking_report_internal_delivery_address/static/description/index.html @@ -0,0 +1,426 @@ + + + + + + +Stock picking report internal delivery address + + + +
+

Stock picking report internal delivery address

+ + +

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

+

This module allows you to show the delivery address on reports when the operation type +of the picking is internal.

+

Table of contents

+ +
+

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 to smash 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 Roca
    • +
    • Carlos Dauden
    • +
    +
  • +
+
+
+

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.

+

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.

+
+
+
+ + From 8fc3ecc25f2e01481aae2da9c8a06454e4b029ce Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 28 Jun 2023 10:31:19 +0000 Subject: [PATCH 2/7] [UPD] Update stock_picking_report_internal_delivery_address.pot --- ...cking_report_internal_delivery_address.pot | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 stock_picking_report_internal_delivery_address/i18n/stock_picking_report_internal_delivery_address.pot diff --git a/stock_picking_report_internal_delivery_address/i18n/stock_picking_report_internal_delivery_address.pot b/stock_picking_report_internal_delivery_address/i18n/stock_picking_report_internal_delivery_address.pot new file mode 100644 index 0000000..2883732 --- /dev/null +++ b/stock_picking_report_internal_delivery_address/i18n/stock_picking_report_internal_delivery_address.pot @@ -0,0 +1,19 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_report_internal_delivery_address +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.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_internal_delivery_address +#: model:ir.model,name:stock_picking_report_internal_delivery_address.model_stock_picking +msgid "Transfer" +msgstr "" From b1035ca867da51e67bca876550f8d453fd0bb86c Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 28 Jun 2023 10:34:44 +0000 Subject: [PATCH 3/7] [UPD] README.rst --- .../README.rst | 15 ++++++--------- .../static/description/index.html | 8 +++----- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/stock_picking_report_internal_delivery_address/README.rst b/stock_picking_report_internal_delivery_address/README.rst index dbec8cb..ffe49f0 100644 --- a/stock_picking_report_internal_delivery_address/README.rst +++ b/stock_picking_report_internal_delivery_address/README.rst @@ -2,13 +2,10 @@ Stock picking report internal delivery address ============================================== -.. - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:49a245155f97e57b3ab9be41caa0ac9ea239fcc673ee1a7f980294fb0b564a0b - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -22,11 +19,11 @@ Stock picking report internal delivery address .. |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_internal_delivery_address :alt: Translate me on Weblate -.. |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 +.. |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 -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows you to show the delivery address on reports when the operation type of the picking is internal. @@ -41,7 +38,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 to smash it by providing a detailed and welcomed +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. diff --git a/stock_picking_report_internal_delivery_address/static/description/index.html b/stock_picking_report_internal_delivery_address/static/description/index.html index 3180947..2ebf8e3 100644 --- a/stock_picking_report_internal_delivery_address/static/description/index.html +++ b/stock_picking_report_internal_delivery_address/static/description/index.html @@ -3,7 +3,7 @@ - + Stock picking report internal delivery address