mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
Merge pull request #52380 from frappe/mergify/bp/version-16-hotfix/pr-52278
This commit is contained in:
14
erpnext/patches/v16_0/update_company_custom_field_in_bin.py
Normal file
14
erpnext/patches/v16_0/update_company_custom_field_in_bin.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("stock", "doctype", "bin")
|
||||
|
||||
frappe.db.sql(
|
||||
"""
|
||||
UPDATE `tabBin` b
|
||||
INNER JOIN `tabWarehouse` w ON b.warehouse = w.name
|
||||
SET b.company = w.company
|
||||
WHERE b.company IS NULL OR b.company = ''
|
||||
"""
|
||||
)
|
||||
Reference in New Issue
Block a user