diff --git a/README.md b/README.md index 560f1faa0..85a692fc4 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,10 @@ addon | version | maintainers | summary --- | --- | --- | --- [stock_delivery_note](stock_delivery_note/) | 19.0.1.0.0 | | This module allows to fill in a delivery note that will be displayed on delivery report [stock_move_value_report](stock_move_value_report/) | 19.0.1.0.0 | | Stock Move Cost Value Report -[stock_picking_report_external_note](stock_picking_report_external_note/) | 19.0.1.0.0 | Shide | Adds a note in Stock Picking shown on external reports like Delivery Slip +[stock_picking_batch_report](stock_picking_batch_report/) | 19.0.1.0.0 | | Stock Picking Batch Report +[stock_picking_report_external_note](stock_picking_report_external_note/) | 19.0.1.0.0 | | Adds a note in Stock Picking Report [stock_picking_report_valued](stock_picking_report_valued/) | 19.0.1.0.1 | | Adding Valued Picking on Delivery Slip report -[stock_product_demand_info](stock_product_demand_info/) | 19.0.1.1.0 | ivantodorovich | Past demand by configurable periods on product and orderpoint - +[stock_product_demand_info](stock_product_demand_info/) | 19.0.1.1.0 | | Past demand by periods on products [//]: # (end addons) diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index 4a72dbca4..06f335636 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -4,6 +4,7 @@ version = "19.0.20260724.0" dependencies = [ "odoo-addon-stock_delivery_note==19.0.*", "odoo-addon-stock_move_value_report==19.0.*", + "odoo-addon-stock_picking_batch_report==19.0.*", "odoo-addon-stock_picking_report_external_note==19.0.*", "odoo-addon-stock_picking_report_valued==19.0.*", "odoo-addon-stock_product_demand_info==19.0.*", diff --git a/stock_picking_batch_report/README.rst b/stock_picking_batch_report/README.rst new file mode 100644 index 000000000..1bb1fa681 --- /dev/null +++ b/stock_picking_batch_report/README.rst @@ -0,0 +1,94 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +========================== +Stock Picking Batch Report +========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:90db565ee90bc55ee854eceb9135cab1dd8be671074dfb9224aedde3eb7dd5cf + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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/19.0/stock_picking_batch_report + :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-19-0/stock-logistics-reporting-19-0-stock_picking_batch_report + :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=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module will aggregate pickings by location in Batch. Also It will +have picking details. + +This module works only for 2-step delivery. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Guidelines for use: + +- In a Batch Transfer, press the Print Batch Transfer. + +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 +------- + +* Open Source Integrators + +Contributors +------------ + +- Chanakya Soni csoni@opensourceintegrators.com +- Maxime Chambreuil mchambreuil@opensourceintegrators.com +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia + +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_batch_report/__init__.py b/stock_picking_batch_report/__init__.py new file mode 100644 index 000000000..bb83730e9 --- /dev/null +++ b/stock_picking_batch_report/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/stock_picking_batch_report/__manifest__.py b/stock_picking_batch_report/__manifest__.py new file mode 100644 index 000000000..007dfc3e6 --- /dev/null +++ b/stock_picking_batch_report/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Stock Picking Batch Report", + "version": "19.0.1.0.0", + "author": "Open Source Integrators, Odoo Community Association (OCA)", + "development_status": "Beta", + "license": "AGPL-3", + "summary": "Stock Picking Batch Report", + "category": "Inventory/Delivery", + "maintainer": "Open Source Integrators", + "website": "https://github.com/OCA/stock-logistics-reporting", + "depends": ["stock_picking_batch"], + "data": ["reports/report_picking_batch.xml"], + "installable": True, +} diff --git a/stock_picking_batch_report/i18n/it.po b/stock_picking_batch_report/i18n/it.po new file mode 100644 index 000000000..332551ff6 --- /dev/null +++ b/stock_picking_batch_report/i18n/it.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_batch_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-07-30 11:58+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6.2\n" + +#. module: stock_picking_batch_report +#: model:ir.model,name:stock_picking_batch_report.model_stock_picking_batch +msgid "Batch Transfer" +msgstr "Trasferimento raggruppato" diff --git a/stock_picking_batch_report/i18n/stock_picking_batch_report.pot b/stock_picking_batch_report/i18n/stock_picking_batch_report.pot new file mode 100644 index 000000000..71ae0eaf7 --- /dev/null +++ b/stock_picking_batch_report/i18n/stock_picking_batch_report.pot @@ -0,0 +1,19 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_batch_report +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.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_batch_report +#: model:ir.model,name:stock_picking_batch_report.model_stock_picking_batch +msgid "Batch Transfer" +msgstr "" diff --git a/stock_picking_batch_report/models/__init__.py b/stock_picking_batch_report/models/__init__.py new file mode 100644 index 000000000..ced8a5a57 --- /dev/null +++ b/stock_picking_batch_report/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import stock_picking_batch diff --git a/stock_picking_batch_report/models/stock_picking_batch.py b/stock_picking_batch_report/models/stock_picking_batch.py new file mode 100644 index 000000000..30d23d06f --- /dev/null +++ b/stock_picking_batch_report/models/stock_picking_batch.py @@ -0,0 +1,11 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class StockPickingBatch(models.Model): + _inherit = "stock.picking.batch" + + def get_out_pickings(self): + return self.mapped("move_ids.move_dest_ids.picking_id") diff --git a/stock_picking_batch_report/pyproject.toml b/stock_picking_batch_report/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/stock_picking_batch_report/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/stock_picking_batch_report/readme/CONTRIBUTORS.md b/stock_picking_batch_report/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..465b6e627 --- /dev/null +++ b/stock_picking_batch_report/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- Chanakya Soni +- Maxime Chambreuil +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia diff --git a/stock_picking_batch_report/readme/DESCRIPTION.md b/stock_picking_batch_report/readme/DESCRIPTION.md new file mode 100644 index 000000000..8570868b8 --- /dev/null +++ b/stock_picking_batch_report/readme/DESCRIPTION.md @@ -0,0 +1,4 @@ +This module will aggregate pickings by location in Batch. +Also It will have picking details. + +This module works only for 2-step delivery. diff --git a/stock_picking_batch_report/readme/USAGE.md b/stock_picking_batch_report/readme/USAGE.md new file mode 100644 index 000000000..82787ac8e --- /dev/null +++ b/stock_picking_batch_report/readme/USAGE.md @@ -0,0 +1,3 @@ +Guidelines for use: + + * In a Batch Transfer, press the Print Batch Transfer. diff --git a/stock_picking_batch_report/reports/report_picking_batch.xml b/stock_picking_batch_report/reports/report_picking_batch.xml new file mode 100644 index 000000000..e3ba30634 --- /dev/null +++ b/stock_picking_batch_report/reports/report_picking_batch.xml @@ -0,0 +1,490 @@ + + + + diff --git a/stock_picking_batch_report/static/description/icon.png b/stock_picking_batch_report/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/stock_picking_batch_report/static/description/icon.png differ diff --git a/stock_picking_batch_report/static/description/index.html b/stock_picking_batch_report/static/description/index.html new file mode 100644 index 000000000..47f5ce021 --- /dev/null +++ b/stock_picking_batch_report/static/description/index.html @@ -0,0 +1,444 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Stock Picking Batch Report

+ +

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

+

This module will aggregate pickings by location in Batch. Also It will +have picking details.

+

This module works only for 2-step delivery.

+

Table of contents

+ +
+

Usage

+

Guidelines for use:

+
    +
  • In a Batch Transfer, press the Print Batch Transfer.
  • +
+
+
+

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

+
    +
  • Open Source Integrators
  • +
+
+ +
+

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.

+
+
+
+
+ + diff --git a/stock_picking_batch_report/tests/__init__.py b/stock_picking_batch_report/tests/__init__.py new file mode 100644 index 000000000..501c435c1 --- /dev/null +++ b/stock_picking_batch_report/tests/__init__.py @@ -0,0 +1 @@ +from . import test_stock_picking_batch_report diff --git a/stock_picking_batch_report/tests/test_stock_picking_batch_report.py b/stock_picking_batch_report/tests/test_stock_picking_batch_report.py new file mode 100644 index 000000000..82d0fd110 --- /dev/null +++ b/stock_picking_batch_report/tests/test_stock_picking_batch_report.py @@ -0,0 +1,70 @@ +# Copyright (C) 2026 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import Command +from odoo.tests import TransactionCase + + +class TestStockPickingBatchReport(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.warehouse = cls.env.ref("stock.warehouse0") + cls.stock_location = cls.warehouse.lot_stock_id + cls.output_location = cls.warehouse.wh_output_stock_loc_id + cls.customer_location = cls.env.ref("stock.stock_location_customers") + cls.uom_unit = cls.env.ref("uom.product_uom_unit") + cls.product = cls.env["product.product"].create( + { + "name": "Batch Report Test Product", + "type": "consu", + "is_storable": True, + "uom_id": cls.uom_unit.id, + } + ) + + @classmethod + def _create_picking(cls, picking_type, location, location_dest): + return cls.env["stock.picking"].create( + { + "picking_type_id": picking_type.id, + "location_id": location.id, + "location_dest_id": location_dest.id, + } + ) + + @classmethod + def _create_move(cls, picking, location, location_dest): + return cls.env["stock.move"].create( + { + "picking_id": picking.id, + "product_id": cls.product.id, + "product_uom_qty": 1.0, + "product_uom": cls.uom_unit.id, + "location_id": location.id, + "location_dest_id": location_dest.id, + } + ) + + def test_get_out_pickings_returns_chained_destination_pickings(self): + pick_picking = self._create_picking( + self.warehouse.pick_type_id, self.stock_location, self.output_location + ) + out_picking = self._create_picking( + self.warehouse.out_type_id, self.output_location, self.customer_location + ) + out_move = self._create_move( + out_picking, self.output_location, self.customer_location + ) + pick_move = self._create_move( + pick_picking, self.stock_location, self.output_location + ) + pick_move.move_dest_ids = [Command.link(out_move.id)] + batch = self.env["stock.picking.batch"].create( + { + "picking_type_id": self.warehouse.pick_type_id.id, + "picking_ids": [Command.link(pick_picking.id)], + } + ) + + self.assertEqual(batch.get_out_pickings(), out_picking)