Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion virtual_pro/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# page_js = {"page" : "public/js/file.js"}

# include js in doctype views
# doctype_js = {"Quotation" : "public/js/quotation.js",}
doctype_js = {"Quotation" : "public/js/quotation.js",}
doctype_list_js = {"Task" : "public/js/task_list.js"}
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
Expand Down
30 changes: 15 additions & 15 deletions virtual_pro/public/js/quotation.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// frappe.ui.form.on('Quotation', {
// refresh: function(frm) {
// if (frm.doc.docstatus === 1 && frm.doc.status !== "Closed" && frm.doc.status !== "Lost" && frm.doc.status !== "Ordered") {
// frm.add_custom_button("Sales Invoice", function() {
// frappe.model.open_mapped_doc({
// method: "virtual_pro.events.quotation.make_sales_invoice",
// frm: frm
// });
// }, __('Create'));
// }
// setTimeout(() => {
// frm.remove_custom_button('Sales Order', 'Create');
// }, 500);
// }
// });
frappe.ui.form.on('Quotation', {
refresh: function(frm) {
// if (frm.doc.docstatus === 1 && frm.doc.status !== "Closed" && frm.doc.status !== "Lost" && frm.doc.status !== "Ordered") {
// frm.add_custom_button("Sales Invoice", function() {
// frappe.model.open_mapped_doc({
// method: "virtual_pro.events.quotation.make_sales_invoice",
// frm: frm
// });
// }, __('Create'));
// }
setTimeout(() => {
frm.remove_custom_button('Sales Order', 'Create');
}, 500);
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ def get_data():
return {
"fieldname": "service_request",
"non_standard_fieldnames": {
"Sales Invoice": "custom_enquiry",
"Task": "custom_service_request"

},
"internal_links": {
"Sales Invoice": "sales_invoice",

},

"transactions": [
{"label": _("Reference"), "items": ["Sales Invoice", "Task"]},

Expand Down