From 857d9e42896628acfe611e616e017e4fdbecb56e Mon Sep 17 00:00:00 2001 From: Chanakya Soni Date: Tue, 9 Mar 2021 17:28:22 +0530 Subject: [PATCH 1/6] [14.0][ADD] Stock Picking Batch Report --- stock_picking_batch_report/README.rst | 88 ++++ stock_picking_batch_report/__init__.py | 4 + stock_picking_batch_report/__manifest__.py | 16 + stock_picking_batch_report/models/__init__.py | 4 + .../models/stock_picking_batch.py | 26 ++ .../reports/report_picking_batch.xml | 428 ++++++++++++++++++ 6 files changed, 566 insertions(+) create mode 100644 stock_picking_batch_report/README.rst create mode 100644 stock_picking_batch_report/__init__.py create mode 100644 stock_picking_batch_report/__manifest__.py create mode 100644 stock_picking_batch_report/models/__init__.py create mode 100644 stock_picking_batch_report/models/stock_picking_batch.py create mode 100644 stock_picking_batch_report/reports/report_picking_batch.xml diff --git a/stock_picking_batch_report/README.rst b/stock_picking_batch_report/README.rst new file mode 100644 index 0000000..a25f71a --- /dev/null +++ b/stock_picking_batch_report/README.rst @@ -0,0 +1,88 @@ +========================== +Stock Picking Batch Report +========================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/12.0/stock_picking_product_label + :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-12-0/stock-logistics-reporting-12-0-stock_picking_product_label + :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/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows users to print batch picking. + + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +This module will aggregate pickings by location in Batch. +Also It will have picking details. + +Note: It will work only for 2 step delivery. + + +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 smashing 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 +* Maxime Chambreuil + +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 0000000..bb83730 --- /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 0000000..b93c4e2 --- /dev/null +++ b/stock_picking_batch_report/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Stock Picking Batch Report", + "version": "14.0.1.0.0", + "author": "Open Source Integrators, " "Odoo Community Association (OCA)", + "license": "AGPL-3", + "summary": "Stock Picking Batch Report", + "category": "Stock", + "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/models/__init__.py b/stock_picking_batch_report/models/__init__.py new file mode 100644 index 0000000..ced8a5a --- /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 0000000..38aa50b --- /dev/null +++ b/stock_picking_batch_report/models/stock_picking_batch.py @@ -0,0 +1,26 @@ +# Copyright (C) 2021 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class StockPikcingBatch(models.Model): + _inherit = "stock.picking.batch" + + def get_out_pickings(self): + for rec in self: + # TO BE Modified Later + # if ( + # rec.picking_type_id.warehouse_id + # and rec.picking_type_id.warehouse_id.delivery_steps != "pick_ship" + # ): + # raise UserError( + # _( + # "This report is only available for " + # "warehouses configured with 2-steps delivery" + # ) + # ) + out_pickings = ( + rec.mapped("move_ids").mapped("move_dest_ids").mapped("picking_id") + ) + return out_pickings 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 0000000..c5f105e --- /dev/null +++ b/stock_picking_batch_report/reports/report_picking_batch.xml @@ -0,0 +1,428 @@ + + + + + + From f4d1988ada28d21c221f12f455d0a8d25bf359cd Mon Sep 17 00:00:00 2001 From: Chanakya Soni Date: Tue, 9 Mar 2021 21:31:02 +0530 Subject: [PATCH 2/6] [UPD] Updated Picking Report by sorting location,product --- .../reports/report_picking_batch.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stock_picking_batch_report/reports/report_picking_batch.xml b/stock_picking_batch_report/reports/report_picking_batch.xml index c5f105e..87c465a 100644 --- a/stock_picking_batch_report/reports/report_picking_batch.xml +++ b/stock_picking_batch_report/reports/report_picking_batch.xml @@ -6,13 +6,18 @@ +
@@ -39,6 +44,7 @@ Quantity Transfer + @@ -89,8 +95,8 @@ /> From 43ac226a8998eb326e5a56e38df273cd4397b4c0 Mon Sep 17 00:00:00 2001 From: Chanakya Soni Date: Tue, 9 Mar 2021 21:34:28 +0530 Subject: [PATCH 3/6] [FIX] Fixed Travis --- stock_picking_batch_report/reports/report_picking_batch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_picking_batch_report/reports/report_picking_batch.xml b/stock_picking_batch_report/reports/report_picking_batch.xml index 87c465a..ab3bf43 100644 --- a/stock_picking_batch_report/reports/report_picking_batch.xml +++ b/stock_picking_batch_report/reports/report_picking_batch.xml @@ -44,7 +44,7 @@ Quantity Transfer - + From 1db9ace03d7e8b503309a2b5a7284b44d6d455e1 Mon Sep 17 00:00:00 2001 From: "Atchuthan, Sodexis" Date: Thu, 27 May 2021 10:42:12 +0530 Subject: [PATCH 4/6] [FIX] Delivery add & Carrier information in report --- .../reports/report_picking_batch.xml | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/stock_picking_batch_report/reports/report_picking_batch.xml b/stock_picking_batch_report/reports/report_picking_batch.xml index ab3bf43..4033f52 100644 --- a/stock_picking_batch_report/reports/report_picking_batch.xml +++ b/stock_picking_batch_report/reports/report_picking_batch.xml @@ -119,12 +119,14 @@ t-value="picking.partner_id or (picking.move_lines and picking.move_lines[0].partner_id) or False" /> - -
- +
+
+
+
+
@@ -155,6 +157,13 @@ />
+
+ Carrier: +

+

Date: Wed, 18 Oct 2023 09:16:03 -0500 Subject: [PATCH 5/6] [IMP] stock_picking_batch_report: black, isort, prettier --- .../odoo/addons/stock_picking_batch_report | 1 + setup/stock_picking_batch_report/setup.py | 6 ++++++ 2 files changed, 7 insertions(+) create mode 120000 setup/stock_picking_batch_report/odoo/addons/stock_picking_batch_report create mode 100644 setup/stock_picking_batch_report/setup.py diff --git a/setup/stock_picking_batch_report/odoo/addons/stock_picking_batch_report b/setup/stock_picking_batch_report/odoo/addons/stock_picking_batch_report new file mode 120000 index 0000000..f27a8fd --- /dev/null +++ b/setup/stock_picking_batch_report/odoo/addons/stock_picking_batch_report @@ -0,0 +1 @@ +../../../../stock_picking_batch_report \ No newline at end of file diff --git a/setup/stock_picking_batch_report/setup.py b/setup/stock_picking_batch_report/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/stock_picking_batch_report/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From c69a5298d3441dcf3ea1259ac162c030089859e1 Mon Sep 17 00:00:00 2001 From: Christopher Ormaza Date: Wed, 18 Oct 2023 09:39:27 -0500 Subject: [PATCH 6/6] [16.0][MIG] stock_picking_batch_report --- stock_picking_batch_report/__manifest__.py | 2 +- .../models/stock_picking_batch.py | 17 +- .../reports/report_picking_batch.xml | 795 +++++++++--------- 3 files changed, 391 insertions(+), 423 deletions(-) diff --git a/stock_picking_batch_report/__manifest__.py b/stock_picking_batch_report/__manifest__.py index b93c4e2..f54ec50 100644 --- a/stock_picking_batch_report/__manifest__.py +++ b/stock_picking_batch_report/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Stock Picking Batch Report", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "author": "Open Source Integrators, " "Odoo Community Association (OCA)", "license": "AGPL-3", "summary": "Stock Picking Batch Report", diff --git a/stock_picking_batch_report/models/stock_picking_batch.py b/stock_picking_batch_report/models/stock_picking_batch.py index 38aa50b..c167d51 100644 --- a/stock_picking_batch_report/models/stock_picking_batch.py +++ b/stock_picking_batch_report/models/stock_picking_batch.py @@ -8,19 +8,4 @@ class StockPikcingBatch(models.Model): _inherit = "stock.picking.batch" def get_out_pickings(self): - for rec in self: - # TO BE Modified Later - # if ( - # rec.picking_type_id.warehouse_id - # and rec.picking_type_id.warehouse_id.delivery_steps != "pick_ship" - # ): - # raise UserError( - # _( - # "This report is only available for " - # "warehouses configured with 2-steps delivery" - # ) - # ) - out_pickings = ( - rec.mapped("move_ids").mapped("move_dest_ids").mapped("picking_id") - ) - return out_pickings + return self.mapped("move_ids.move_dest_ids.picking_id") diff --git a/stock_picking_batch_report/reports/report_picking_batch.xml b/stock_picking_batch_report/reports/report_picking_batch.xml index 4033f52..566d081 100644 --- a/stock_picking_batch_report/reports/report_picking_batch.xml +++ b/stock_picking_batch_report/reports/report_picking_batch.xml @@ -1,333 +1,257 @@ - -