From dbe24b9cd600c7b5a9d0587f80a782ed93c9a761 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Mon, 2 Dec 2024 13:37:28 +0700 Subject: add name to validation --- indoteknik_custom/models/stock_picking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 17dd5766..03b10cdb 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -539,7 +539,7 @@ class StockPicking(models.Model): qty_onhand = check_qty_per_inventory(self, line.product_id, line.location_id) if line.qty_done > qty_onhand: - raise UserError('Quantity Done melebihi Quantity Onhand') + raise UserError(f'{line.product_id.display_name} : Quantity Done melebihi Quantity Onhand') def button_validate(self): if not self.env.user.is_logistic_approver and self.env.context.get('active_model') == 'stock.picking': -- cgit v1.2.3