Merge pull request #21110 from nextchamp-saqib/cancel-error-hyperlink
chore: hyperlinks in cannot cancel message
This commit is contained in:
commit
fe1f754d83
@ -745,7 +745,7 @@ class BuyingController(StockController):
|
|||||||
asset.supplier = None
|
asset.supplier = None
|
||||||
if asset.docstatus == 1 and delete_asset:
|
if asset.docstatus == 1 and delete_asset:
|
||||||
frappe.throw(_('Cannot cancel this document as it is linked with submitted asset {0}.\
|
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_validate_update_after_submit = True
|
||||||
asset.flags.ignore_mandatory = True
|
asset.flags.ignore_mandatory = True
|
||||||
|
@ -314,7 +314,7 @@ class WorkOrder(Document):
|
|||||||
stock_entry = frappe.db.sql("""select name from `tabStock Entry`
|
stock_entry = frappe.db.sql("""select name from `tabStock Entry`
|
||||||
where work_order = %s and docstatus = 1""", self.name)
|
where work_order = %s and docstatus = 1""", self.name)
|
||||||
if stock_entry:
|
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):
|
def update_planned_qty(self):
|
||||||
update_bin_qty(self.production_item, self.fg_warehouse, {
|
update_bin_qty(self.production_item, self.fg_warehouse, {
|
||||||
|
Loading…
Reference in New Issue
Block a user