mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: allow to set rate manually for service item in BOM (#38880)
This commit is contained in:
19
erpnext/patches/v14_0/set_maintain_stock_for_bom_item.py
Normal file
19
erpnext/patches/v14_0/set_maintain_stock_for_bom_item.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
if not frappe.db.exists("BOM", {"docstatus": 1}):
|
||||
return
|
||||
|
||||
# Added is_stock_item to handle Read Only based on condition for the rate field
|
||||
frappe.db.sql(
|
||||
"""
|
||||
UPDATE
|
||||
`tabBOM Item` boi,
|
||||
`tabItem` i
|
||||
SET
|
||||
boi.is_stock_item = i.is_stock_item
|
||||
WHERE
|
||||
boi.item_code = i.name
|
||||
"""
|
||||
)
|
||||
Reference in New Issue
Block a user