mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
fix: raw material should not have target warehouse in manufacture entry (#54849)
(cherry picked from commit b5527cf328)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
@@ -243,7 +243,6 @@ class StockEntry(StockController, SubcontractingInwardController):
|
|||||||
self.set_transfer_qty()
|
self.set_transfer_qty()
|
||||||
self.validate_uom_is_integer("uom", "qty")
|
self.validate_uom_is_integer("uom", "qty")
|
||||||
self.validate_uom_is_integer("stock_uom", "transfer_qty")
|
self.validate_uom_is_integer("stock_uom", "transfer_qty")
|
||||||
self.validate_warehouse()
|
|
||||||
self.validate_warehouse_of_sabb()
|
self.validate_warehouse_of_sabb()
|
||||||
self.validate_work_order()
|
self.validate_work_order()
|
||||||
self.validate_source_stock_entry()
|
self.validate_source_stock_entry()
|
||||||
@@ -259,6 +258,7 @@ class StockEntry(StockController, SubcontractingInwardController):
|
|||||||
else:
|
else:
|
||||||
self.validate_job_card_fg_item()
|
self.validate_job_card_fg_item()
|
||||||
|
|
||||||
|
self.validate_warehouse()
|
||||||
self.validate_with_material_request()
|
self.validate_with_material_request()
|
||||||
self.validate_batch()
|
self.validate_batch()
|
||||||
self.validate_inspection()
|
self.validate_inspection()
|
||||||
@@ -853,15 +853,14 @@ class StockEntry(StockController, SubcontractingInwardController):
|
|||||||
frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
|
frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
|
||||||
|
|
||||||
if self.purpose == "Manufacture":
|
if self.purpose == "Manufacture":
|
||||||
if has_bom:
|
if d.is_finished_item or d.type or d.is_legacy_scrap_item:
|
||||||
if d.is_finished_item or d.type or d.is_legacy_scrap_item:
|
d.s_warehouse = None
|
||||||
d.s_warehouse = None
|
if not d.t_warehouse:
|
||||||
if not d.t_warehouse:
|
frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
|
||||||
frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx))
|
else:
|
||||||
else:
|
d.t_warehouse = None
|
||||||
d.t_warehouse = None
|
if not d.s_warehouse:
|
||||||
if not d.s_warehouse:
|
frappe.throw(_("Source warehouse is mandatory for row {0}").format(d.idx))
|
||||||
frappe.throw(_("Source warehouse is mandatory for row {0}").format(d.idx))
|
|
||||||
|
|
||||||
if self.purpose == "Disassemble":
|
if self.purpose == "Disassemble":
|
||||||
if has_bom:
|
if has_bom:
|
||||||
|
|||||||
Reference in New Issue
Block a user