Skip to content

Commit

Permalink
Merge pull request #40723 from rohitwaghchaure/fixed-allow-to-manuall…
Browse files Browse the repository at this point in the history
…y-pick-batches

feat: allow to pick manually qty / batches / serial nos
  • Loading branch information
rohitwaghchaure committed Apr 2, 2024
2 parents f3bcdbe + 50dd9fa commit c3b2ed5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 10 additions & 2 deletions erpnext/stock/doctype/pick_list/pick_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"parent_warehouse",
"consider_rejected_warehouses",
"get_item_locations",
"pick_manually",
"section_break_6",
"scan_barcode",
"column_break_13",
Expand Down Expand Up @@ -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-03-27 13:10:13.177072",
"modified": "2024-03-27 22:49:16.954637",
"modified_by": "Administrator",
"module": "Stock",
"name": "Pick List",
Expand Down Expand Up @@ -264,7 +272,7 @@
"write": 1
}
],
"sort_field": "creation",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
Expand Down
5 changes: 4 additions & 1 deletion erpnext/stock/doctype/pick_list/pick_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class PickList(Document):

amended_from: DF.Link | None
company: DF.Link
consider_rejected_warehouses: DF.Check
customer: DF.Link | None
customer_name: DF.Data | None
for_qty: DF.Float
Expand All @@ -49,6 +50,7 @@ class PickList(Document):
material_request: DF.Link | None
naming_series: DF.Literal["STO-PICK-.YYYY.-"]
parent_warehouse: DF.Link | None
pick_manually: DF.Check
prompt_qty: DF.Check
purpose: DF.Literal["Material Transfer for Manufacture", "Material Transfer", "Delivery"]
scan_barcode: DF.Data | None
Expand All @@ -70,7 +72,8 @@ def validate(self):

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()
Expand Down

0 comments on commit c3b2ed5

Please sign in to comment.