How to override JavaScript Function

Make folder structure like (depends on you):
image

forum_issue.bundle.js :

import "./monkey_patch/transaction.js";

transaction.js :

erpnext.TransactionController.prototype.make_quality_inspection = function () {
	// Your new implementation goes here
};

hooks.py:

app_include_js = ["forum_issue.bundle.js"]

Note: forum_issue :arrow_right: YOUR_APP_NAME

If not works build the bench.

bench build --app YOUR_APP_NAME
3 Likes