mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
fix: raw material should not have target warehouse in manufacture entry (#54849)
This commit is contained in:
@@ -237,7 +237,6 @@ class StockEntry(StockController, SubcontractingInwardController):
|
||||
self.set_transfer_qty()
|
||||
self.validate_uom_is_integer("uom", "qty")
|
||||
self.validate_uom_is_integer("stock_uom", "transfer_qty")
|
||||
self.validate_warehouse()
|
||||
self.validate_warehouse_of_sabb()
|
||||
self.validate_work_order()
|
||||
self.validate_source_stock_entry()
|
||||
@@ -252,6 +251,7 @@ class StockEntry(StockController, SubcontractingInwardController):
|
||||
else:
|
||||
self.validate_job_card_fg_item()
|
||||
|
||||
self.validate_warehouse()
|
||||
self.validate_with_material_request()
|
||||
self.validate_batch()
|
||||
self.validate_inspection()
|
||||
@@ -846,15 +846,14 @@ class StockEntry(StockController, SubcontractingInwardController):
|
||||
frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
|
||||
|
||||
if self.purpose == "Manufacture":
|
||||
if has_bom:
|
||||
if d.is_finished_item or d.type or d.is_legacy_scrap_item:
|
||||
d.s_warehouse = None
|
||||
if not d.t_warehouse:
|
||||
frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
|
||||
else:
|
||||
d.t_warehouse = None
|
||||
if not d.s_warehouse:
|
||||
frappe.throw(_("Source warehouse is mandatory for row {0}").format(d.idx))
|
||||
if d.is_finished_item or d.type or d.is_legacy_scrap_item:
|
||||
d.s_warehouse = None
|
||||
if not d.t_warehouse:
|
||||
frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
|
||||
else:
|
||||
d.t_warehouse = None
|
||||
if not d.s_warehouse:
|
||||
frappe.throw(_("Source warehouse is mandatory for row {0}").format(d.idx))
|
||||
|
||||
if self.purpose == "Disassemble":
|
||||
if has_bom:
|
||||
|
||||
Reference in New Issue
Block a user