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 @@ + + + + + +