mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
refactor: removal of composite asset creation from asset capitalization
This commit is contained in:
@@ -9,19 +9,17 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"title",
|
"title",
|
||||||
"naming_series",
|
"naming_series",
|
||||||
"capitalization_method",
|
|
||||||
"target_item_code",
|
|
||||||
"target_item_name",
|
|
||||||
"target_asset",
|
"target_asset",
|
||||||
"target_asset_name",
|
"target_asset_name",
|
||||||
"target_qty",
|
|
||||||
"target_asset_location",
|
"target_asset_location",
|
||||||
|
"target_item_code",
|
||||||
|
"finance_book",
|
||||||
|
"target_qty",
|
||||||
"column_break_9",
|
"column_break_9",
|
||||||
"company",
|
"company",
|
||||||
"posting_date",
|
"posting_date",
|
||||||
"posting_time",
|
"posting_time",
|
||||||
"set_posting_time",
|
"set_posting_time",
|
||||||
"finance_book",
|
|
||||||
"target_batch_no",
|
"target_batch_no",
|
||||||
"target_serial_no",
|
"target_serial_no",
|
||||||
"amended_from",
|
"amended_from",
|
||||||
@@ -62,14 +60,6 @@
|
|||||||
"mandatory_depends_on": "eval:doc.capitalization_method=='Create a new composite asset'",
|
"mandatory_depends_on": "eval:doc.capitalization_method=='Create a new composite asset'",
|
||||||
"options": "Item"
|
"options": "Item"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"depends_on": "eval:doc.target_item_code && doc.target_item_name != doc.target_item_code",
|
|
||||||
"fetch_from": "target_item_code.item_name",
|
|
||||||
"fieldname": "target_item_name",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"label": "Target Item Name",
|
|
||||||
"read_only": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"fetch_from": "target_item_code.is_fixed_asset",
|
"fetch_from": "target_item_code.is_fixed_asset",
|
||||||
@@ -80,18 +70,14 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:(doc.target_asset && !doc.__islocal) || doc.capitalization_method=='Choose a WIP composite asset'",
|
|
||||||
"fieldname": "target_asset",
|
"fieldname": "target_asset",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Target Asset",
|
"label": "Target Asset",
|
||||||
"mandatory_depends_on": "eval:doc.capitalization_method=='Choose a WIP composite asset'",
|
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"options": "Asset",
|
"options": "Asset"
|
||||||
"read_only_depends_on": "eval:doc.capitalization_method=='Create a new composite asset'"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:(doc.target_asset_name && !doc.__islocal) || (doc.target_asset && doc.capitalization_method=='Choose a WIP composite asset')",
|
|
||||||
"fetch_from": "target_asset.asset_name",
|
"fetch_from": "target_asset.asset_name",
|
||||||
"fieldname": "target_asset_name",
|
"fieldname": "target_asset_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
@@ -176,7 +162,9 @@
|
|||||||
"default": "1",
|
"default": "1",
|
||||||
"fieldname": "target_qty",
|
"fieldname": "target_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Target Qty"
|
"hidden": 1,
|
||||||
|
"label": "Target Qty",
|
||||||
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
@@ -306,18 +294,12 @@
|
|||||||
"label": "Target Asset Location",
|
"label": "Target Asset Location",
|
||||||
"mandatory_depends_on": "eval:doc.capitalization_method=='Create a new composite asset'",
|
"mandatory_depends_on": "eval:doc.capitalization_method=='Create a new composite asset'",
|
||||||
"options": "Location"
|
"options": "Location"
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "capitalization_method",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"label": "Capitalization Method",
|
|
||||||
"options": "\nCreate a new composite asset\nChoose a WIP composite asset"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2025-01-08 13:14:33.008458",
|
"modified": "2025-05-20 15:03:47.485193",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset Capitalization",
|
"name": "Asset Capitalization",
|
||||||
@@ -355,10 +337,11 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"row_format": "Dynamic",
|
||||||
"sort_field": "creation",
|
"sort_field": "creation",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": [],
|
"states": [],
|
||||||
"title_field": "title",
|
"title_field": "title",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 1
|
"track_seen": 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ class AssetCapitalization(StockController):
|
|||||||
amended_from: DF.Link | None
|
amended_from: DF.Link | None
|
||||||
asset_items: DF.Table[AssetCapitalizationAssetItem]
|
asset_items: DF.Table[AssetCapitalizationAssetItem]
|
||||||
asset_items_total: DF.Currency
|
asset_items_total: DF.Currency
|
||||||
capitalization_method: DF.Literal["", "Create new composite asset", "Use existing composite asset"]
|
|
||||||
company: DF.Link
|
company: DF.Link
|
||||||
cost_center: DF.Link | None
|
cost_center: DF.Link | None
|
||||||
finance_book: DF.Link | None
|
finance_book: DF.Link | None
|
||||||
@@ -92,7 +91,6 @@ class AssetCapitalization(StockController):
|
|||||||
target_incoming_rate: DF.Currency
|
target_incoming_rate: DF.Currency
|
||||||
target_is_fixed_asset: DF.Check
|
target_is_fixed_asset: DF.Check
|
||||||
target_item_code: DF.Link | None
|
target_item_code: DF.Link | None
|
||||||
target_item_name: DF.Data | None
|
|
||||||
target_qty: DF.Float
|
target_qty: DF.Float
|
||||||
target_serial_no: DF.SmallText | None
|
target_serial_no: DF.SmallText | None
|
||||||
title: DF.Data | None
|
title: DF.Data | None
|
||||||
|
|||||||
Reference in New Issue
Block a user