[Fix] Item name and description in production order (#11723)
* fetch item name and description from bom * Update production_order.py * patch added * Update set_item_name_in_production_order.py
This commit is contained in:
parent
ab5e77ecf1
commit
e3d6d21ec5
@ -441,6 +441,8 @@ class ProductionOrder(Document):
|
|||||||
for item in sorted(item_dict.values(), key=lambda d: d['idx']):
|
for item in sorted(item_dict.values(), key=lambda d: d['idx']):
|
||||||
self.append('required_items', {
|
self.append('required_items', {
|
||||||
'item_code': item.item_code,
|
'item_code': item.item_code,
|
||||||
|
'item_name': item.item_name,
|
||||||
|
'description': item.description,
|
||||||
'required_qty': item.qty,
|
'required_qty': item.qty,
|
||||||
'source_warehouse': item.source_warehouse or item.default_warehouse
|
'source_warehouse': item.source_warehouse or item.default_warehouse
|
||||||
})
|
})
|
||||||
|
@ -461,4 +461,5 @@ execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
|
|||||||
erpnext.patches.v9_0.update_employee_loan_details
|
erpnext.patches.v9_0.update_employee_loan_details
|
||||||
erpnext.patches.v9_2.delete_healthcare_domain_default_items
|
erpnext.patches.v9_2.delete_healthcare_domain_default_items
|
||||||
erpnext.patches.v9_2.rename_translated_domains_in_en
|
erpnext.patches.v9_2.rename_translated_domains_in_en
|
||||||
erpnext.patches.v9_2.repost_reserved_qty_for_production
|
erpnext.patches.v9_2.repost_reserved_qty_for_production
|
||||||
|
erpnext.patches.v9_2.set_item_name_in_production_order
|
11
erpnext/patches/v9_2/set_item_name_in_production_order.py
Normal file
11
erpnext/patches/v9_2/set_item_name_in_production_order.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
|
||||||
|
frappe.db.sql("""
|
||||||
|
update `tabBOM Item` bom, `tabProduction Order Item` po_item
|
||||||
|
set po_item.item_name = bom.item_name,
|
||||||
|
po_item.description = bom.description
|
||||||
|
where po_item.item_code = bom.item_code
|
||||||
|
and (po_item.item_name is null or po_item.description is null)
|
||||||
|
""")
|
Loading…
x
Reference in New Issue
Block a user