mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-27 02:28:30 +00:00
Merge pull request #48682 from frappe/mergify/bp/version-15-hotfix/pr-48680
fix: patch to set default buying price list in material request (backport #48680)
This commit is contained in:
@@ -413,6 +413,7 @@ erpnext.patches.v15_0.update_pick_list_fields
|
||||
erpnext.patches.v15_0.update_pegged_currencies
|
||||
erpnext.patches.v15_0.set_company_on_pos_inv_merge_log
|
||||
erpnext.patches.v15_0.rename_price_list_to_buying_price_list
|
||||
erpnext.patches.v15_0.patch_missing_buying_price_list_in_material_request
|
||||
erpnext.patches.v15_0.remove_sales_partner_from_consolidated_sales_invoice
|
||||
erpnext.patches.v15_0.repost_gl_entries_with_no_account_subcontracting
|
||||
execute:frappe.db.set_single_value("Accounts Settings", "fetch_valuation_rate_for_internal_transaction", 1)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import frappe
|
||||
import frappe.defaults
|
||||
|
||||
|
||||
def execute():
|
||||
if frappe.db.has_column("Material Request", "buying_price_list") and (
|
||||
default_buying_price_list := frappe.defaults.get_defaults().buying_price_list
|
||||
):
|
||||
docs = frappe.get_all(
|
||||
"Material Request", filters={"buying_price_list": ["is", "not set"], "docstatus": 1}, pluck="name"
|
||||
)
|
||||
for doc in docs:
|
||||
frappe.db.set_value("Material Request", doc, "buying_price_list", default_buying_price_list)
|
||||
Reference in New Issue
Block a user