mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-21 02:16:28 +00:00
fix: alias name and parent to prevent child row mapping issues
(cherry picked from commit a418e377f4)
This commit is contained in:
@@ -875,8 +875,8 @@ def get_items_tagged_to_wip_composite_asset(params):
|
||||
"valuation_rate",
|
||||
"amount",
|
||||
"is_fixed_asset",
|
||||
"parent",
|
||||
"name",
|
||||
"parent as purchase_receipt",
|
||||
"name as purchase_receipt_item",
|
||||
]
|
||||
|
||||
pr_items = frappe.get_all(
|
||||
@@ -905,7 +905,7 @@ def process_stock_item(d):
|
||||
stock_capitalized = frappe.db.exists(
|
||||
"Asset Capitalization Stock Item",
|
||||
{
|
||||
"purchase_receipt_item": d.name,
|
||||
"purchase_receipt_item": d.purchase_receipt_item,
|
||||
"parentfield": "stock_items",
|
||||
"parenttype": "Asset Capitalization",
|
||||
"docstatus": 1,
|
||||
@@ -916,7 +916,7 @@ def process_stock_item(d):
|
||||
return None
|
||||
|
||||
stock_item_data = frappe._dict(d)
|
||||
stock_item_data.purchase_receipt_item = d.name
|
||||
stock_item_data.purchase_receipt_item = d.purchase_receipt_item
|
||||
return stock_item_data
|
||||
|
||||
|
||||
@@ -925,7 +925,7 @@ def process_fixed_asset(d):
|
||||
"Asset",
|
||||
{
|
||||
"item_code": d.item_code,
|
||||
"purchase_receipt": d.parent,
|
||||
"purchase_receipt": d.purchase_receipt,
|
||||
"status": ("not in", ["Draft", "Scrapped", "Sold", "Capitalized"]),
|
||||
},
|
||||
["name as asset", "asset_name", "company"],
|
||||
|
||||
Reference in New Issue
Block a user