-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow to set rate manually for service item in BOM (backport #38880
) (backport #38882) (#38885) fix: allow to set rate manually for service item in BOM (backport #38880) (#38882) fix: allow to set rate manually for service item in BOM (#38880) (cherry picked from commit c2f692a) Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com> (cherry picked from commit a6ab532) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
58f1df5
commit 74606dc
Showing
5 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
""" | ||
) |