mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 15:38:39 +00:00
fix(manufacturing): adapt version 16 compatibility
This commit is contained in:
@@ -854,7 +854,7 @@ class BOM(WebsiteGenerator):
|
|||||||
self.add_materials_from_bom(row.finished_good, row.bom_no, row.idx, qty=row.finished_good_qty)
|
self.add_materials_from_bom(row.finished_good, row.bom_no, row.idx, qty=row.finished_good_qty)
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def add_raw_materials(self, operation_row_id: str, items: str | list[dict]) -> None:
|
def add_raw_materials(self, operation_row_id: str | int, items: str | list[dict]) -> None:
|
||||||
if isinstance(items, str):
|
if isinstance(items, str):
|
||||||
items = parse_json(items)
|
items = parse_json(items)
|
||||||
|
|
||||||
|
|||||||
@@ -3238,7 +3238,8 @@ class StockEntry(StockController, SubcontractingInwardController):
|
|||||||
entry_qty = flt(finished_qty + flt(self.process_loss_qty), precision)
|
entry_qty = flt(finished_qty + flt(self.process_loss_qty), precision)
|
||||||
|
|
||||||
if entry_qty > pending_qty:
|
if entry_qty > pending_qty:
|
||||||
uom = job_card.stock_uom
|
item_code = job_card.finished_good or job_card.production_item
|
||||||
|
uom = frappe.get_cached_value("Item", item_code, "stock_uom")
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_(
|
_(
|
||||||
"The Job Card {0} has only {1} left to produce, but this entry books {2} ({3} finished goods and {4} process loss). Cancel or update its other manufacture entries first."
|
"The Job Card {0} has only {1} left to produce, but this entry books {2} ({3} finished goods and {4} process loss). Cancel or update its other manufacture entries first."
|
||||||
|
|||||||
Reference in New Issue
Block a user