From 9fefecd32bb07473aed24673eb57360958209dcb Mon Sep 17 00:00:00 2001 From: David Vidal Date: Thu, 29 Jan 2026 13:46:39 +0100 Subject: [PATCH 1/3] [ADD] stock_picking_report_valued_delivery_fee: new module MT-13311 --- .../README.rst | 102 ++++ .../__init__.py | 1 + .../__manifest__.py | 18 + .../models/__init__.py | 1 + .../models/stock_picking.py | 27 ++ .../readme/CONTRIBUTORS.md | 3 + .../readme/DESCRIPTION.md | 1 + .../readme/USAGE.md | 2 + .../static/description/index.html | 441 ++++++++++++++++++ 9 files changed, 596 insertions(+) create mode 100644 stock_picking_report_valued_delivery_fee/README.rst create mode 100644 stock_picking_report_valued_delivery_fee/__init__.py create mode 100644 stock_picking_report_valued_delivery_fee/__manifest__.py create mode 100644 stock_picking_report_valued_delivery_fee/models/__init__.py create mode 100644 stock_picking_report_valued_delivery_fee/models/stock_picking.py create mode 100644 stock_picking_report_valued_delivery_fee/readme/CONTRIBUTORS.md create mode 100644 stock_picking_report_valued_delivery_fee/readme/DESCRIPTION.md create mode 100644 stock_picking_report_valued_delivery_fee/readme/USAGE.md create mode 100644 stock_picking_report_valued_delivery_fee/static/description/index.html diff --git a/stock_picking_report_valued_delivery_fee/README.rst b/stock_picking_report_valued_delivery_fee/README.rst new file mode 100644 index 000000000..a0836725a --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/README.rst @@ -0,0 +1,102 @@ +==================================== +Valued Picking Report - Delivery Fee +==================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:7ca1754ed21dd14bf8cba222b7128628091fcb55a2ea73b1907fec74dc2e1c23 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |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/16.0/stock_picking_report_valued_delivery_fee + :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-16-0/stock-logistics-reporting-16-0-stock_picking_report_valued_delivery_fee + :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=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +When this module is active, the delivery fee will be added to the +picking total amount. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +When you print the valued picking, the amount of the applied delivery +fee (if any) will be summed to the total amount although it will only be +rendered on the picking footer. + +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 +------- + +* Moduon + +Contributors +------------ + +- David Vidal (`Moduon `__) +- Emilio Pascual (`Moduon `__) +- Rafael Blasco (`Moduon `__) + +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-chienandalu| image:: https://github.com/chienandalu.png?size=40px + :target: https://github.com/chienandalu + :alt: chienandalu +.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px + :target: https://github.com/rafaelbn + :alt: rafaelbn + +Current `maintainers `__: + +|maintainer-chienandalu| |maintainer-rafaelbn| + +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_valued_delivery_fee/__init__.py b/stock_picking_report_valued_delivery_fee/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_picking_report_valued_delivery_fee/__manifest__.py b/stock_picking_report_valued_delivery_fee/__manifest__.py new file mode 100644 index 000000000..1043893ce --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2026 Moduon Team S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0) +{ + "name": "Valued Picking Report - Delivery Fee", + "summary": "Add delivery fee to the valued picking total value", + "version": "16.0.1.0.0", + "development_status": "Alpha", + "category": "Warehouse Management", + "website": "https://github.com/OCA/stock-logistics-reporting", + "author": "Moduon, Odoo Community Association (OCA)", + "maintainers": ["chienandalu", "rafaelbn"], + "license": "AGPL-3", + "depends": [ + "stock_picking_report_valued", + "delivery_fee", + ], + "data": [], +} diff --git a/stock_picking_report_valued_delivery_fee/models/__init__.py b/stock_picking_report_valued_delivery_fee/models/__init__.py new file mode 100644 index 000000000..ae4c27227 --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/models/__init__.py @@ -0,0 +1 @@ +from . import stock_picking diff --git a/stock_picking_report_valued_delivery_fee/models/stock_picking.py b/stock_picking_report_valued_delivery_fee/models/stock_picking.py new file mode 100644 index 000000000..adce696f7 --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/models/stock_picking.py @@ -0,0 +1,27 @@ +# Copyright 2026 Moduon +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import models + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + def _compute_amount_all(self): + res = super()._compute_amount_all() + for picking in self: + fee_lines = picking.sale_id.order_line.filtered( + lambda x: x.delivery_fee_picking_id == picking + ) + if not fee_lines: + continue + fee_amount_untaxed = sum(fee_lines.mapped("price_subtotal")) + fee_amount_taxed = sum(fee_lines.mapped("price_tax")) + fee_amount_total = fee_amount_untaxed + fee_amount_taxed + picking.update( + { + "amount_untaxed": picking.amount_untaxed + fee_amount_untaxed, + "amount_tax": picking.amount_tax + fee_amount_taxed, + "amount_total": picking.amount_total + fee_amount_total, + } + ) + return res diff --git a/stock_picking_report_valued_delivery_fee/readme/CONTRIBUTORS.md b/stock_picking_report_valued_delivery_fee/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..afdd95a38 --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- David Vidal ([Moduon](https://www.moduon.team/)) +- Emilio Pascual ([Moduon](https://www.moduon.team/)) +- Rafael Blasco ([Moduon](https://www.moduon.team/)) diff --git a/stock_picking_report_valued_delivery_fee/readme/DESCRIPTION.md b/stock_picking_report_valued_delivery_fee/readme/DESCRIPTION.md new file mode 100644 index 000000000..f8e3dfc0f --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/readme/DESCRIPTION.md @@ -0,0 +1 @@ +When this module is active, the delivery fee will be added to the picking total amount. diff --git a/stock_picking_report_valued_delivery_fee/readme/USAGE.md b/stock_picking_report_valued_delivery_fee/readme/USAGE.md new file mode 100644 index 000000000..cf783ab47 --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/readme/USAGE.md @@ -0,0 +1,2 @@ +When you print the valued picking, the amount of the applied delivery fee (if any) will +be summed to the total amount although it will only be rendered on the picking footer. diff --git a/stock_picking_report_valued_delivery_fee/static/description/index.html b/stock_picking_report_valued_delivery_fee/static/description/index.html new file mode 100644 index 000000000..76e828729 --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/static/description/index.html @@ -0,0 +1,441 @@ + + + + + +Valued Picking Report - Delivery Fee + + + +
+

Valued Picking Report - Delivery Fee

+ + +

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

+

When this module is active, the delivery fee will be added to the +picking total amount.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Usage

+

When you print the valued picking, the amount of the applied delivery +fee (if any) will be summed to the total amount although it will only be +rendered on the picking footer.

+
+
+

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

+
    +
  • Moduon
  • +
+
+
+

Contributors

+ +
+
+

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 maintainers:

+

chienandalu rafaelbn

+

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 72e79ce68feab4aa87641887eac747ccc7861308 Mon Sep 17 00:00:00 2001 From: David Vidal Date: Mon, 6 Apr 2026 11:32:34 +0200 Subject: [PATCH 2/3] [IMP] stock_picking_report_valued_delivery_fee: pre-commit auto fixes --- stock_picking_report_valued_delivery_fee/pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 stock_picking_report_valued_delivery_fee/pyproject.toml diff --git a/stock_picking_report_valued_delivery_fee/pyproject.toml b/stock_picking_report_valued_delivery_fee/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/stock_picking_report_valued_delivery_fee/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" From 8f69713d910a7806b2824653d7efc79401956f72 Mon Sep 17 00:00:00 2001 From: David Vidal Date: Mon, 6 Apr 2026 11:34:49 +0200 Subject: [PATCH 3/3] [MIG] stock_picking_report_valued_delivery_fee: Migration to 18.0 MT-13311 --- stock_picking_report_valued_delivery_fee/README.rst | 10 +++++----- .../__manifest__.py | 2 +- .../models/stock_picking.py | 2 +- .../static/description/index.html | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/stock_picking_report_valued_delivery_fee/README.rst b/stock_picking_report_valued_delivery_fee/README.rst index a0836725a..49c925126 100644 --- a/stock_picking_report_valued_delivery_fee/README.rst +++ b/stock_picking_report_valued_delivery_fee/README.rst @@ -17,13 +17,13 @@ Valued Picking Report - Delivery Fee :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/16.0/stock_picking_report_valued_delivery_fee + :target: https://github.com/OCA/stock-logistics-reporting/tree/18.0/stock_picking_report_valued_delivery_fee :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-16-0/stock-logistics-reporting-16-0-stock_picking_report_valued_delivery_fee + :target: https://translation.odoo-community.org/projects/stock-logistics-reporting-18-0/stock-logistics-reporting-18-0-stock_picking_report_valued_delivery_fee :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=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-reporting&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -54,7 +54,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 -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -97,6 +97,6 @@ Current `maintainers `__: |maintainer-chienandalu| |maintainer-rafaelbn| -This module is part of the `OCA/stock-logistics-reporting `_ project on GitHub. +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_valued_delivery_fee/__manifest__.py b/stock_picking_report_valued_delivery_fee/__manifest__.py index 1043893ce..551633870 100644 --- a/stock_picking_report_valued_delivery_fee/__manifest__.py +++ b/stock_picking_report_valued_delivery_fee/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Valued Picking Report - Delivery Fee", "summary": "Add delivery fee to the valued picking total value", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "development_status": "Alpha", "category": "Warehouse Management", "website": "https://github.com/OCA/stock-logistics-reporting", diff --git a/stock_picking_report_valued_delivery_fee/models/stock_picking.py b/stock_picking_report_valued_delivery_fee/models/stock_picking.py index adce696f7..f029247b6 100644 --- a/stock_picking_report_valued_delivery_fee/models/stock_picking.py +++ b/stock_picking_report_valued_delivery_fee/models/stock_picking.py @@ -10,7 +10,7 @@ def _compute_amount_all(self): res = super()._compute_amount_all() for picking in self: fee_lines = picking.sale_id.order_line.filtered( - lambda x: x.delivery_fee_picking_id == picking + lambda x, picking=picking: x.delivery_fee_picking_id == picking ) if not fee_lines: continue diff --git a/stock_picking_report_valued_delivery_fee/static/description/index.html b/stock_picking_report_valued_delivery_fee/static/description/index.html index 76e828729..b70efeb27 100644 --- a/stock_picking_report_valued_delivery_fee/static/description/index.html +++ b/stock_picking_report_valued_delivery_fee/static/description/index.html @@ -369,7 +369,7 @@

Valued Picking Report - Delivery Fee

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:7ca1754ed21dd14bf8cba222b7128628091fcb55a2ea73b1907fec74dc2e1c23 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

When this module is active, the delivery fee will be added to the picking total amount.

@@ -402,7 +402,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 -feedback.

+feedback.

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

@@ -432,7 +432,7 @@

Maintainers

promote its widespread use.

Current maintainers:

chienandalu rafaelbn

-

This module is part of the OCA/stock-logistics-reporting project on GitHub.

+

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.