|
|
@ -962,10 +962,12 @@ frappe.ui.form.on("Publish", { |
|
|
|
cur_frm.refresh_field("feature_finder_publish_docs", 'read_only', 1); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (added) { frappe.msgprint(__(added + " Doc(s) Added")); |
|
|
|
if (added) { |
|
|
|
frappe.msgprint(__(added + " Doc(s) Added")); |
|
|
|
cur_frm.set_df_property('feature_finder_publish', 'read_only', 1) |
|
|
|
cur_frm.set_df_property("feature_finder_publish_docs", 'read_only', 1); |
|
|
|
cur_frm.refresh_field("feature_finder_publish"); } |
|
|
|
cur_frm.refresh_field("feature_finder_publish"); |
|
|
|
} |
|
|
|
else if (added == 0) { frappe.msgprint(__("No Doc Added")); } |
|
|
|
}); |
|
|
|
|
|
|
@ -1009,10 +1011,12 @@ frappe.ui.form.on("Publish", { |
|
|
|
// cur_frm.refresh_field("torque_manual_publish_docs",'read_only',1);
|
|
|
|
} |
|
|
|
}); |
|
|
|
if (added) { frappe.msgprint(__(added + " Doc(s) Added")); |
|
|
|
if (added) { |
|
|
|
frappe.msgprint(__(added + " Doc(s) Added")); |
|
|
|
cur_frm.set_df_property('torque_manual_publish', 'read_only', 1) |
|
|
|
cur_frm.set_df_property("torque_manual_publish_docs", 'read_only', 1); |
|
|
|
cur_frm.refresh_field("torque_manual_publish"); } |
|
|
|
cur_frm.refresh_field("torque_manual_publish"); |
|
|
|
} |
|
|
|
else if (added == 0) { frappe.msgprint(__("No Doc Added")); } |
|
|
|
}); |
|
|
|
|
|
|
@ -1195,31 +1199,31 @@ frappe.ui.form.on("Publish", { |
|
|
|
refresh_field("publish_documents"); |
|
|
|
frappe.msgprint(__(frm.doc.variant_mapping + " Added")); |
|
|
|
} |
|
|
|
if(frm.doc.feature_finder_publish_docs && frm.doc.publish_module=='Feature Finder'){ |
|
|
|
frm.doc.publish_documents.forEach(publishrow => { |
|
|
|
if (frm.doc.variant_mapping == publishrow.variant_mapping) { |
|
|
|
dulicate = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
frappe.msgprint("Variant Mapping already added"); |
|
|
|
// if(frm.doc.feature_finder_publish_docs && frm.doc.publish_module=='Feature Finder'){
|
|
|
|
// frm.doc.publish_documents.forEach(publishrow => {
|
|
|
|
// if (frm.doc.variant_mapping == publishrow.variant_mapping) {
|
|
|
|
// dulicate = true;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// frappe.msgprint("Variant Mapping already added");
|
|
|
|
|
|
|
|
} |
|
|
|
if(frm.doc.torque_manual_publish_docs && frm.doc.publish_module=='Torque Manual'){ |
|
|
|
frm.doc.publish_documents.forEach(publishrow => { |
|
|
|
if (frm.doc.variant_mapping == publishrow.variant_mapping) { |
|
|
|
dulicate = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
frappe.msgprint("Variant Mapping already added"); |
|
|
|
// }
|
|
|
|
// if(frm.doc.torque_manual_publish_docs && frm.doc.publish_module=='Torque Manual'){
|
|
|
|
// frm.doc.publish_documents.forEach(publishrow => {
|
|
|
|
// if (frm.doc.variant_mapping == publishrow.variant_mapping) {
|
|
|
|
// dulicate = true;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// frappe.msgprint("Variant Mapping already added");
|
|
|
|
|
|
|
|
} |
|
|
|
if (dulicate === false && frm.doc.publish_module == "Torque Manual") { |
|
|
|
let child = cur_frm.add_child("publish_documents"); |
|
|
|
child.variant_mapping = frm.doc.variant_mapping; |
|
|
|
child.item_category = "Variant Mapping"; |
|
|
|
refresh_field("publish_documents"); |
|
|
|
frappe.msgprint(__(frm.doc.variant_mapping + " Added")); |
|
|
|
} |
|
|
|
// }
|
|
|
|
// if (dulicate === false && frm.doc.publish_module == "Torque Manual") {
|
|
|
|
// let child = cur_frm.add_child("publish_documents");
|
|
|
|
// child.variant_mapping = frm.doc.variant_mapping;
|
|
|
|
// child.item_category = "Variant Mapping";
|
|
|
|
// refresh_field("publish_documents");
|
|
|
|
// frappe.msgprint(__(frm.doc.variant_mapping + " Added"));
|
|
|
|
// }
|
|
|
|
}, |
|
|
|
km_report: function (frm, cdt, cdn) { |
|
|
|
if (frm.doc.publish_module == "Automotive System") { |
|
|
|