diff --git a/rmax_custom/inter_branch.py b/rmax_custom/inter_branch.py index cdf55b6..b489c8d 100644 --- a/rmax_custom/inter_branch.py +++ b/rmax_custom/inter_branch.py @@ -1042,7 +1042,7 @@ def _retag_se_gl_entries(stock_entry, source_branch: str, target_branch: str) -> fields=["name", "account", "debit", "credit"], ) for row in gl_rows: - warehouse = frappe.db.get_value("Account", row.account, "warehouse") + warehouse = frappe.db.get_value("Warehouse", {"account": row.account}, "name") if not warehouse: continue wh_branch = resolve_warehouse_branch(warehouse)