feat(stock): add company field to Bin with migration patch

This commit is contained in:
Praveenkumar26-S
2026-02-03 11:26:13 +05:30
parent dbbeca6308
commit d54259c99c
4 changed files with 28 additions and 2 deletions

View 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 = ''
"""
)