fix: args must be wrapped under a ctx

This commit is contained in:
khushi8112
2026-02-18 12:35:29 +05:30
parent beffc016da
commit eb17284711
2 changed files with 13 additions and 13 deletions

View File

@@ -2,8 +2,6 @@
# For license information, please see license.txt # For license information, please see license.txt
from typing import Any
import frappe import frappe
from frappe import _ from frappe import _
from frappe.query_builder import Order from frappe.query_builder import Order

View File

@@ -396,17 +396,19 @@ erpnext.assets.AssetCapitalization = class AssetCapitalization extends erpnext.s
method: "erpnext.assets.doctype.asset_capitalization.asset_capitalization.get_warehouse_details", method: "erpnext.assets.doctype.asset_capitalization.asset_capitalization.get_warehouse_details",
child: item, child: item,
args: { args: {
item_code: item.item_code, ctx: {
warehouse: cstr(item.warehouse), item_code: item.item_code,
qty: -1 * flt(item.stock_qty), warehouse: cstr(item.warehouse),
serial_no: item.serial_no, qty: -1 * flt(item.stock_qty),
posting_date: me.frm.doc.posting_date, serial_no: item.serial_no,
posting_time: me.frm.doc.posting_time, posting_date: me.frm.doc.posting_date,
company: me.frm.doc.company, posting_time: me.frm.doc.posting_time,
voucher_type: me.frm.doc.doctype, company: me.frm.doc.company,
voucher_no: me.frm.doc.name, voucher_type: me.frm.doc.doctype,
allow_zero_valuation: 1, voucher_no: me.frm.doc.name,
serial_and_batch_bundle: item.serial_and_batch_bundle, allow_zero_valuation: 1,
serial_and_batch_bundle: item.serial_and_batch_bundle,
},
}, },
callback: function (r) { callback: function (r) {
if (!r.exc) { if (!r.exc) {