From d4bd67574d93b764037026f90e3ba994ac883234 Mon Sep 17 00:00:00 2001 From: Tran Anh Tuan Date: Tue, 12 Mar 2024 09:31:28 +0700 Subject: [PATCH] [IMP] stock_release_channel_shipment_advice: Add buttons on release channel kanban to print shipments and delivery slip --- .../models/stock_release_channel.py | 12 +++++++++++ .../views/stock_release_channel.xml | 20 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/stock_release_channel_shipment_advice/models/stock_release_channel.py b/stock_release_channel_shipment_advice/models/stock_release_channel.py index b2d559a7a2..01f4971fec 100644 --- a/stock_release_channel_shipment_advice/models/stock_release_channel.py +++ b/stock_release_channel_shipment_advice/models/stock_release_channel.py @@ -131,3 +131,15 @@ def _check_warehouse(self): def _onchange_check_warehouse(self): self.ensure_one() self._check_warehouse() + + def action_print_shipment(self): + if self.shipment_advice_ids: + return self.env.ref( + "shipment_advice.action_report_shipment_advice" + ).report_action(self.shipment_advice_ids) + return {} + + def action_print_deliveryslip(self): + if self.shipment_advice_ids: + return self.shipment_advice_ids.print_all_deliveryslip() + return {} diff --git a/stock_release_channel_shipment_advice/views/stock_release_channel.xml b/stock_release_channel_shipment_advice/views/stock_release_channel.xml index 5a49101022..778d1e0260 100644 --- a/stock_release_channel_shipment_advice/views/stock_release_channel.xml +++ b/stock_release_channel_shipment_advice/views/stock_release_channel.xml @@ -65,6 +65,26 @@ Plan Shipment + + +
+ Print Shipment +
+
+ +
+ Print Deliveries +
+
+