From 3f652bd4e1569497718c52411216c5f49f9de282 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 17:33:58 +0530 Subject: [PATCH] fix: enabled allow on submit for asset name field (backport #47093) (#47094) fix: enabled allow on submit for asset name field (#47093) (cherry picked from commit e41720f1a328c95b16a0f50ef5cb2f7d162e6e74) Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- erpnext/assets/doctype/asset/asset.json | 4 +++- erpnext/assets/doctype/asset/asset.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index aa5fd217665..cf3602ef966 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -87,6 +87,7 @@ "options": "ACC-ASS-.YYYY.-" }, { + "allow_on_submit": 1, "depends_on": "item_code", "fetch_from": "item_code.item_name", "fetch_if_empty": 1, @@ -592,7 +593,7 @@ "link_fieldname": "target_asset" } ], - "modified": "2025-02-20 14:09:05.421913", + "modified": "2025-04-15 16:33:17.189524", "modified_by": "Administrator", "module": "Assets", "name": "Asset", @@ -630,6 +631,7 @@ "write": 1 } ], + "row_format": "Dynamic", "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 9b3cb022bd8..6886a79bb0a 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -42,14 +42,15 @@ from erpnext.controllers.accounts_controller import AccountsController class Asset(AccountsController): # begin: auto-generated types + # ruff: noqa + # This code is auto-generated. Do not modify anything in this block. from typing import TYPE_CHECKING if TYPE_CHECKING: - from frappe.types import DF - from erpnext.assets.doctype.asset_finance_book.asset_finance_book import AssetFinanceBook + from frappe.types import DF additional_asset_cost: DF.Currency amended_from: DF.Link | None @@ -117,6 +118,7 @@ class Asset(AccountsController): total_asset_cost: DF.Currency total_number_of_depreciations: DF.Int value_after_depreciation: DF.Currency + # ruff: noqa # end: auto-generated types def validate(self):