Merge branch 'develop' of https://github.com/frappe/erpnext into project-link-for-all-accounts

This commit is contained in:
Deepesh Garg
2020-07-06 12:37:28 +05:30
179 changed files with 3346 additions and 1787 deletions

View File

@@ -58,7 +58,7 @@
"type": "Report"
},
{
"label": "Assets Dashboard",
"label": "Dashboard",
"link_to": "Asset",
"type": "Dashboard"
}

View File

@@ -408,6 +408,8 @@ class Asset(AccountsController):
row.expected_value_after_useful_life = asset_value_after_full_schedule
def validate_cancellation(self):
if self.status in ("In Maintenance", "Out of Order"):
frappe.throw(_("There are active maintenance or repairs against the asset. You must complete all of them before cancelling the asset."))
if self.status not in ("Submitted", "Partially Depreciated", "Fully Depreciated"):
frappe.throw(_("Asset cannot be cancelled, as it is already {0}").format(self.status))