mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-15 23:54:59 +00:00
Merge pull request #46927 from frappe/mergify/bp/version-15-hotfix/pr-46903
fix: restrict customer change if creating from opportunity (backport #46903)
This commit is contained in:
@@ -69,6 +69,8 @@ frappe.ui.form.on("Quotation", {
|
||||
erpnext.selling.QuotationController = class QuotationController extends erpnext.selling.SellingController {
|
||||
onload(doc, dt, dn) {
|
||||
super.onload(doc, dt, dn);
|
||||
|
||||
this.frm.trigger("disable_customer_if_creating_from_opportunity");
|
||||
}
|
||||
party_name() {
|
||||
var me = this;
|
||||
@@ -373,6 +375,12 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext.
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
disable_customer_if_creating_from_opportunity(doc) {
|
||||
if (doc.opportunity) {
|
||||
this.frm.set_df_property("party_name", "read_only", 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
cur_frm.script_manager.make(erpnext.selling.QuotationController);
|
||||
|
||||
Reference in New Issue
Block a user