Merge pull request #21111 from nextchamp-saqib/cancel-error-hyperlink-v12

chore: hyperlinks in cannot cancel message
This commit is contained in:
Deepesh Garg
2020-03-29 21:54:09 +05:30
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -731,7 +731,7 @@ class BuyingController(StockController):
asset.supplier = None
if asset.docstatus == 1 and delete_asset:
frappe.throw(_('Cannot cancel this document as it is linked with submitted asset {0}.\
Please cancel the it to continue.').format(asset.name))
Please cancel the it to continue.').format(frappe.utils.get_link_to_form('Asset', asset.name)))
asset.flags.ignore_validate_update_after_submit = True
asset.flags.ignore_mandatory = True

View File

@@ -274,7 +274,7 @@ class WorkOrder(Document):
stock_entry = frappe.db.sql("""select name from `tabStock Entry`
where work_order = %s and docstatus = 1""", self.name)
if stock_entry:
frappe.throw(_("Cannot cancel because submitted Stock Entry {0} exists").format(stock_entry[0][0]))
frappe.throw(_("Cannot cancel because submitted Stock Entry {0} exists").format(frappe.utils.get_link_to_form('Stock Entry', stock_entry[0][0])))
def update_planned_qty(self):
update_bin_qty(self.production_item, self.fg_warehouse, {