From 7b28d7d2b8cc2f71a175af1793ed28636faa2f5e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 21:37:13 +0530 Subject: [PATCH] feat: allow to pick manually qty / batches / serial nos (backport #40723) (#41435) * feat: allow to pick manually qty / batches / serial nos (cherry picked from commit 50dd9fa8a32b8cd29b50d1c6181dfd8f6f5d27b6) # Conflicts: # erpnext/stock/doctype/pick_list/pick_list.json # erpnext/stock/doctype/pick_list/pick_list.py * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: Rohit Waghchaure --- erpnext/stock/doctype/pick_list/pick_list.json | 12 ++++++++++-- erpnext/stock/doctype/pick_list/pick_list.py | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.json b/erpnext/stock/doctype/pick_list/pick_list.json index 948011cce69..b4aadbd7987 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.json +++ b/erpnext/stock/doctype/pick_list/pick_list.json @@ -18,6 +18,7 @@ "parent_warehouse", "consider_rejected_warehouses", "get_item_locations", + "pick_manually", "section_break_6", "scan_barcode", "column_break_13", @@ -192,11 +193,18 @@ "fieldname": "consider_rejected_warehouses", "fieldtype": "Check", "label": "Consider Rejected Warehouses" + }, + { + "default": "0", + "description": "If enabled then system won't override the picked qty / batches / serial numbers.", + "fieldname": "pick_manually", + "fieldtype": "Check", + "label": "Pick Manually" } ], "is_submittable": 1, "links": [], - "modified": "2024-01-24 17:05:20.317180", + "modified": "2024-03-27 22:49:16.954637", "modified_by": "Administrator", "module": "Stock", "name": "Pick List", @@ -268,4 +276,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index ef7dc710b13..99858835fed 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -29,7 +29,8 @@ class PickList(Document): def before_save(self): self.update_status() - self.set_item_locations() + if not self.pick_manually: + self.set_item_locations() if self.get("locations"): self.validate_sales_order_percentage()