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)
# Conflicts:
# erpnext/stock/doctype/stock_entry/stock_entry.py
* chore: resolve conflicts
---------
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
@@ -214,7 +214,6 @@ class StockEntry(StockController):
|
|||||||
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()
|
||||||
@@ -227,6 +226,7 @@ class StockEntry(StockController):
|
|||||||
self.mark_finished_and_scrap_items()
|
self.mark_finished_and_scrap_items()
|
||||||
self.validate_finished_goods()
|
self.validate_finished_goods()
|
||||||
|
|
||||||
|
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()
|
||||||
@@ -775,15 +775,14 @@ class StockEntry(StockController):
|
|||||||
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.is_scrap_item:
|
||||||
if d.is_finished_item or d.is_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