From edad52b65b8aeb2e775b49ca62004aae0ce6153f Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Wed, 8 Feb 2023 19:57:49 +0100 Subject: [PATCH 1/2] [IMP] stock_picking_report_summary : Add test --- .../tests/__init__.py | 1 + .../tests/test_module.py | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 stock_picking_report_summary/tests/__init__.py create mode 100644 stock_picking_report_summary/tests/test_module.py diff --git a/stock_picking_report_summary/tests/__init__.py b/stock_picking_report_summary/tests/__init__.py new file mode 100644 index 0000000..d9b96c4 --- /dev/null +++ b/stock_picking_report_summary/tests/__init__.py @@ -0,0 +1 @@ +from . import test_module diff --git a/stock_picking_report_summary/tests/test_module.py b/stock_picking_report_summary/tests/test_module.py new file mode 100644 index 0000000..6ad1292 --- /dev/null +++ b/stock_picking_report_summary/tests/test_module.py @@ -0,0 +1,33 @@ +# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop) +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests.common import TransactionCase + + +class TestModule(TransactionCase): + def setUp(self): + super().setUp() + self.PickingReportWizard = self.env["picking.summary.wizard"] + self.StockPicking = self.env["stock.picking"] + self.outPickingType = self.env.ref("stock.picking_type_out") + + def _test_wizard(self, pickings): + wizard = self.PickingReportWizard.with_context( + active_model="stock.picking", + active_ids=pickings.ids, + ).create({}) + + custom_note = "La Rabia Del Pueblo - Keny Arkana" + pickings[0].note = custom_note + report = self.env.ref("stock_picking_report_summary.report_picking_summary") + res = str(report.render_qweb_html(wizard.ids)[0]) + self.assertIn(custom_note, res) + + def test_wizard(self): + pickings = self.StockPicking.search( + [ + ("picking_type_id", "=", self.outPickingType.id), + ] + ) + self._test_wizard(pickings) From f567c320d89fed4e8bca52774bee7e53cce942c4 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Tue, 18 Apr 2023 23:51:52 +0200 Subject: [PATCH 2/2] [REF] stock_picking_report_summary : add legalsylvain as comaintainers --- stock_picking_report_summary/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_picking_report_summary/__manifest__.py b/stock_picking_report_summary/__manifest__.py index a56555b..ba4ab78 100644 --- a/stock_picking_report_summary/__manifest__.py +++ b/stock_picking_report_summary/__manifest__.py @@ -8,7 +8,7 @@ "version": "12.0.1.0.0", "author": "Grap, " "Odoo Community Association (OCA)", - "maintainers": ["quentinDupont"], + "maintainers": ["quentinDupont", "legalsylvain"], "website": "https://github.com/OCA/stock-logistics-reporting", "category": "Warehouse Management", "license": "AGPL-3",