Merge pull request #23443 from marination/rfq-email
feat: Supplier Email Preview in RFQ
This commit is contained in:
commit
f8ce64c0ca
@ -22,8 +22,6 @@ frappe.ui.form.on("Request for Quotation",{
|
|||||||
},
|
},
|
||||||
|
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
frm.add_fetch('email_template', 'response', 'message_for_supplier');
|
|
||||||
|
|
||||||
if(!frm.doc.message_for_supplier) {
|
if(!frm.doc.message_for_supplier) {
|
||||||
frm.set_value("message_for_supplier", __("Please supply the specified items at the best possible rates"))
|
frm.set_value("message_for_supplier", __("Please supply the specified items at the best possible rates"))
|
||||||
}
|
}
|
||||||
@ -194,6 +192,66 @@ frappe.ui.form.on("Request for Quotation",{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
dialog.show()
|
dialog.show()
|
||||||
|
},
|
||||||
|
|
||||||
|
preview: (frm) => {
|
||||||
|
let dialog = new frappe.ui.Dialog({
|
||||||
|
title: __('Preview Email'),
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
label: __('Supplier'),
|
||||||
|
fieldtype: 'Select',
|
||||||
|
fieldname: 'supplier',
|
||||||
|
options: frm.doc.suppliers.map(row => row.supplier),
|
||||||
|
reqd: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldtype: 'Column Break',
|
||||||
|
fieldname: 'col_break_1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: __('Subject'),
|
||||||
|
fieldtype: 'Data',
|
||||||
|
fieldname: 'subject',
|
||||||
|
read_only: 1,
|
||||||
|
depends_on: 'subject'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldtype: 'Section Break',
|
||||||
|
fieldname: 'sec_break_1',
|
||||||
|
hide_border: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: __('Email'),
|
||||||
|
fieldtype: 'HTML',
|
||||||
|
fieldname: 'email_preview'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldtype: 'Section Break',
|
||||||
|
fieldname: 'sec_break_2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: __('Note'),
|
||||||
|
fieldtype: 'HTML',
|
||||||
|
fieldname: 'note'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog.fields_dict['supplier'].df.onchange = () => {
|
||||||
|
var supplier = dialog.get_value('supplier');
|
||||||
|
frm.call('get_supplier_email_preview', {supplier: supplier}).then(result => {
|
||||||
|
dialog.fields_dict.email_preview.$wrapper.empty();
|
||||||
|
dialog.fields_dict.email_preview.$wrapper.append(result.message);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog.fields_dict.note.$wrapper.append(`<p class="small text-muted">This is a preview of the email to be sent. A PDF of the document will
|
||||||
|
automatically be attached with the email.</p>`);
|
||||||
|
|
||||||
|
dialog.set_value("subject", frm.doc.subject);
|
||||||
|
dialog.show();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -276,7 +334,7 @@ erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.e
|
|||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
// Get items from Opportunity
|
// Get items from Opportunity
|
||||||
this.frm.add_custom_button(__('Opportunity'),
|
this.frm.add_custom_button(__('Opportunity'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.crm.doctype.opportunity.opportunity.make_request_for_quotation",
|
method: "erpnext.crm.doctype.opportunity.opportunity.make_request_for_quotation",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"actions": "",
|
"actions": [],
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
"creation": "2016-02-25 01:24:07.224790",
|
"creation": "2016-02-25 01:24:07.224790",
|
||||||
@ -19,7 +19,12 @@
|
|||||||
"items",
|
"items",
|
||||||
"link_to_mrs",
|
"link_to_mrs",
|
||||||
"supplier_response_section",
|
"supplier_response_section",
|
||||||
|
"salutation",
|
||||||
"email_template",
|
"email_template",
|
||||||
|
"col_break_email_1",
|
||||||
|
"subject",
|
||||||
|
"preview",
|
||||||
|
"sec_break_email_2",
|
||||||
"message_for_supplier",
|
"message_for_supplier",
|
||||||
"terms_section_break",
|
"terms_section_break",
|
||||||
"tc_name",
|
"tc_name",
|
||||||
@ -126,8 +131,10 @@
|
|||||||
"label": "Link to Material Requests"
|
"label": "Link to Material Requests"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"fieldname": "supplier_response_section",
|
"fieldname": "supplier_response_section",
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Email Details"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "email_template",
|
"fieldname": "email_template",
|
||||||
@ -137,6 +144,8 @@
|
|||||||
"print_hide": 1
|
"print_hide": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"fetch_from": "email_template.response",
|
||||||
|
"fetch_if_empty": 1,
|
||||||
"fieldname": "message_for_supplier",
|
"fieldname": "message_for_supplier",
|
||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@ -230,12 +239,45 @@
|
|||||||
"options": "Request for Quotation",
|
"options": "Request for Quotation",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "email_template.subject",
|
||||||
|
"fetch_if_empty": 1,
|
||||||
|
"fieldname": "subject",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subject",
|
||||||
|
"print_hide": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Select a greeting for the receiver. E.g. Mr., Ms., etc.",
|
||||||
|
"fieldname": "salutation",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Salutation",
|
||||||
|
"no_copy": 1,
|
||||||
|
"options": "Salutation",
|
||||||
|
"print_hide": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "col_break_email_1",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval:!doc.docstatus==1",
|
||||||
|
"fieldname": "preview",
|
||||||
|
"fieldtype": "Button",
|
||||||
|
"label": "Preview Email"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval:!doc.__islocal",
|
||||||
|
"fieldname": "sec_break_email_2",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hide_border": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-shopping-cart",
|
"icon": "fa fa-shopping-cart",
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-06-25 14:37:21.140194",
|
"modified": "2020-10-01 14:54:50.888729",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Request for Quotation",
|
"name": "Request for Quotation",
|
||||||
|
@ -51,7 +51,7 @@ class RequestforQuotation(BuyingController):
|
|||||||
|
|
||||||
def validate_email_id(self, args):
|
def validate_email_id(self, args):
|
||||||
if not args.email_id:
|
if not args.email_id:
|
||||||
frappe.throw(_("Row {0}: For Supplier {0}, Email Address is Required to Send Email").format(args.idx, args.supplier))
|
frappe.throw(_("Row {0}: For Supplier {1}, Email Address is Required to send an email").format(args.idx, frappe.bold(args.supplier)))
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
frappe.db.set(self, 'status', 'Submitted')
|
frappe.db.set(self, 'status', 'Submitted')
|
||||||
@ -62,17 +62,31 @@ class RequestforQuotation(BuyingController):
|
|||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
frappe.db.set(self, 'status', 'Cancelled')
|
frappe.db.set(self, 'status', 'Cancelled')
|
||||||
|
|
||||||
|
def get_supplier_email_preview(self, supplier):
|
||||||
|
"""Returns formatted email preview as string."""
|
||||||
|
rfq_suppliers = list(filter(lambda row: row.supplier == supplier, self.suppliers))
|
||||||
|
rfq_supplier = rfq_suppliers[0]
|
||||||
|
|
||||||
|
self.validate_email_id(rfq_supplier)
|
||||||
|
|
||||||
|
message = self.supplier_rfq_mail(rfq_supplier, '', self.get_link(), True)
|
||||||
|
|
||||||
|
return message
|
||||||
|
|
||||||
def send_to_supplier(self):
|
def send_to_supplier(self):
|
||||||
|
"""Sends RFQ mail to involved suppliers."""
|
||||||
for rfq_supplier in self.suppliers:
|
for rfq_supplier in self.suppliers:
|
||||||
if rfq_supplier.send_email:
|
if rfq_supplier.send_email:
|
||||||
self.validate_email_id(rfq_supplier)
|
self.validate_email_id(rfq_supplier)
|
||||||
|
|
||||||
# make new user if required
|
# make new user if required
|
||||||
update_password_link = self.update_supplier_contact(rfq_supplier, self.get_link())
|
update_password_link, contact = self.update_supplier_contact(rfq_supplier, self.get_link())
|
||||||
|
|
||||||
self.update_supplier_part_no(rfq_supplier)
|
self.update_supplier_part_no(rfq_supplier)
|
||||||
self.supplier_rfq_mail(rfq_supplier, update_password_link, self.get_link())
|
self.supplier_rfq_mail(rfq_supplier, update_password_link, self.get_link())
|
||||||
rfq_supplier.email_sent = 1
|
rfq_supplier.email_sent = 1
|
||||||
|
if not rfq_supplier.contact:
|
||||||
|
rfq_supplier.contact = contact
|
||||||
rfq_supplier.save()
|
rfq_supplier.save()
|
||||||
|
|
||||||
def get_link(self):
|
def get_link(self):
|
||||||
@ -87,18 +101,19 @@ class RequestforQuotation(BuyingController):
|
|||||||
|
|
||||||
def update_supplier_contact(self, rfq_supplier, link):
|
def update_supplier_contact(self, rfq_supplier, link):
|
||||||
'''Create a new user for the supplier if not set in contact'''
|
'''Create a new user for the supplier if not set in contact'''
|
||||||
update_password_link = ''
|
update_password_link, contact = '', ''
|
||||||
|
|
||||||
if frappe.db.exists("User", rfq_supplier.email_id):
|
if frappe.db.exists("User", rfq_supplier.email_id):
|
||||||
user = frappe.get_doc("User", rfq_supplier.email_id)
|
user = frappe.get_doc("User", rfq_supplier.email_id)
|
||||||
else:
|
else:
|
||||||
user, update_password_link = self.create_user(rfq_supplier, link)
|
user, update_password_link = self.create_user(rfq_supplier, link)
|
||||||
|
|
||||||
self.update_contact_of_supplier(rfq_supplier, user)
|
contact = self.link_supplier_contact(rfq_supplier, user)
|
||||||
|
|
||||||
return update_password_link
|
return update_password_link, contact
|
||||||
|
|
||||||
def update_contact_of_supplier(self, rfq_supplier, user):
|
def link_supplier_contact(self, rfq_supplier, user):
|
||||||
|
"""If no Contact, create a new contact against Supplier. If Contact exists, check if email and user id set."""
|
||||||
if rfq_supplier.contact:
|
if rfq_supplier.contact:
|
||||||
contact = frappe.get_doc("Contact", rfq_supplier.contact)
|
contact = frappe.get_doc("Contact", rfq_supplier.contact)
|
||||||
else:
|
else:
|
||||||
@ -115,6 +130,10 @@ class RequestforQuotation(BuyingController):
|
|||||||
|
|
||||||
contact.save(ignore_permissions=True)
|
contact.save(ignore_permissions=True)
|
||||||
|
|
||||||
|
if not rfq_supplier.contact:
|
||||||
|
# return contact to later update, RFQ supplier row's contact
|
||||||
|
return contact.name
|
||||||
|
|
||||||
def create_user(self, rfq_supplier, link):
|
def create_user(self, rfq_supplier, link):
|
||||||
user = frappe.get_doc({
|
user = frappe.get_doc({
|
||||||
'doctype': 'User',
|
'doctype': 'User',
|
||||||
@ -129,22 +148,36 @@ class RequestforQuotation(BuyingController):
|
|||||||
|
|
||||||
return user, update_password_link
|
return user, update_password_link
|
||||||
|
|
||||||
def supplier_rfq_mail(self, data, update_password_link, rfq_link):
|
def supplier_rfq_mail(self, data, update_password_link, rfq_link, preview=False):
|
||||||
full_name = get_user_fullname(frappe.session['user'])
|
full_name = get_user_fullname(frappe.session['user'])
|
||||||
if full_name == "Guest":
|
if full_name == "Guest":
|
||||||
full_name = "Administrator"
|
full_name = "Administrator"
|
||||||
|
|
||||||
|
# send document dict and some important data from suppliers row
|
||||||
|
# to render message_for_supplier from any template
|
||||||
|
doc_args = self.as_dict()
|
||||||
|
doc_args.update({
|
||||||
|
'supplier': data.get('supplier'),
|
||||||
|
'supplier_name': data.get('supplier_name')
|
||||||
|
})
|
||||||
|
|
||||||
args = {
|
args = {
|
||||||
'update_password_link': update_password_link,
|
'update_password_link': update_password_link,
|
||||||
'message': frappe.render_template(self.message_for_supplier, data.as_dict()),
|
'message': frappe.render_template(self.message_for_supplier, doc_args),
|
||||||
'rfq_link': rfq_link,
|
'rfq_link': rfq_link,
|
||||||
'user_fullname': full_name
|
'user_fullname': full_name,
|
||||||
|
'supplier_name' : data.get('supplier_name'),
|
||||||
|
'supplier_salutation' : self.salutation or 'Dear Mx.',
|
||||||
}
|
}
|
||||||
|
|
||||||
subject = _("Request for Quotation")
|
subject = self.subject or _("Request for Quotation")
|
||||||
template = "templates/emails/request_for_quotation.html"
|
template = "templates/emails/request_for_quotation.html"
|
||||||
sender = frappe.session.user not in STANDARD_USERS and frappe.session.user or None
|
sender = frappe.session.user not in STANDARD_USERS and frappe.session.user or None
|
||||||
message = frappe.get_template(template).render(args)
|
message = frappe.get_template(template).render(args)
|
||||||
|
|
||||||
|
if preview:
|
||||||
|
return message
|
||||||
|
|
||||||
attachments = self.get_attachments()
|
attachments = self.get_attachments()
|
||||||
|
|
||||||
self.send_email(data, sender, subject, message, attachments)
|
self.send_email(data, sender, subject, message, attachments)
|
||||||
|
@ -1,362 +1,112 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"actions": [],
|
||||||
"allow_guest_to_view": 0,
|
"creation": "2016-03-29 05:59:11.896885",
|
||||||
"allow_import": 0,
|
"doctype": "DocType",
|
||||||
"allow_rename": 0,
|
"editable_grid": 1,
|
||||||
"beta": 0,
|
"engine": "InnoDB",
|
||||||
"creation": "2016-03-29 05:59:11.896885",
|
"field_order": [
|
||||||
"custom": 0,
|
"send_email",
|
||||||
"docstatus": 0,
|
"email_sent",
|
||||||
"doctype": "DocType",
|
"supplier",
|
||||||
"document_type": "",
|
"contact",
|
||||||
"editable_grid": 1,
|
"no_quote",
|
||||||
"engine": "InnoDB",
|
"quote_status",
|
||||||
|
"column_break_3",
|
||||||
|
"supplier_name",
|
||||||
|
"email_id",
|
||||||
|
"download_pdf"
|
||||||
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_on_submit": 1,
|
||||||
"allow_on_submit": 1,
|
"default": "1",
|
||||||
"bold": 0,
|
"fieldname": "send_email",
|
||||||
"collapsible": 0,
|
"fieldtype": "Check",
|
||||||
"columns": 0,
|
"label": "Send Email"
|
||||||
"default": "1",
|
},
|
||||||
"fieldname": "send_email",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Send Email",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_on_submit": 1,
|
||||||
"allow_on_submit": 1,
|
"default": "0",
|
||||||
"bold": 0,
|
"depends_on": "eval:doc.docstatus >= 1",
|
||||||
"collapsible": 0,
|
"fieldname": "email_sent",
|
||||||
"columns": 0,
|
"fieldtype": "Check",
|
||||||
"default": "0",
|
"label": "Email Sent",
|
||||||
"depends_on": "eval:doc.docstatus >= 1",
|
"no_copy": 1,
|
||||||
"fieldname": "email_sent",
|
"read_only": 1
|
||||||
"fieldtype": "Check",
|
},
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Email Sent",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 1,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"columns": 4,
|
||||||
"allow_on_submit": 0,
|
"fieldname": "supplier",
|
||||||
"bold": 0,
|
"fieldtype": "Link",
|
||||||
"collapsible": 0,
|
"in_list_view": 1,
|
||||||
"columns": 4,
|
"label": "Supplier",
|
||||||
"fieldname": "supplier",
|
"options": "Supplier",
|
||||||
"fieldtype": "Link",
|
"reqd": 1
|
||||||
"hidden": 0,
|
},
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Supplier",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Supplier",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 1,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_on_submit": 1,
|
||||||
"allow_on_submit": 0,
|
"columns": 3,
|
||||||
"bold": 0,
|
"fieldname": "contact",
|
||||||
"collapsible": 0,
|
"fieldtype": "Link",
|
||||||
"columns": 3,
|
"in_list_view": 1,
|
||||||
"fieldname": "contact",
|
"label": "Contact",
|
||||||
"fieldtype": "Link",
|
"no_copy": 1,
|
||||||
"hidden": 0,
|
"options": "Contact"
|
||||||
"ignore_user_permissions": 0,
|
},
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Contact",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
|
||||||
"options": "Contact",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_on_submit": 1,
|
||||||
"allow_on_submit": 1,
|
"default": "0",
|
||||||
"bold": 0,
|
"depends_on": "eval:doc.docstatus >= 1 && doc.quote_status != 'Received'",
|
||||||
"collapsible": 0,
|
"fieldname": "no_quote",
|
||||||
"columns": 0,
|
"fieldtype": "Check",
|
||||||
"depends_on": "eval:doc.docstatus >= 1 && doc.quote_status != 'Received'",
|
"label": "No Quote"
|
||||||
"fieldname": "no_quote",
|
},
|
||||||
"fieldtype": "Check",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "No Quote",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_on_submit": 1,
|
||||||
"allow_on_submit": 1,
|
"depends_on": "eval:doc.docstatus >= 1 && !doc.no_quote",
|
||||||
"bold": 0,
|
"fieldname": "quote_status",
|
||||||
"collapsible": 0,
|
"fieldtype": "Select",
|
||||||
"columns": 0,
|
"label": "Quote Status",
|
||||||
"depends_on": "eval:doc.docstatus >= 1 && !doc.no_quote",
|
"options": "Pending\nReceived\nNo Quote",
|
||||||
"fieldname": "quote_status",
|
"read_only": 1
|
||||||
"fieldtype": "Select",
|
},
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Quote Status",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Pending\nReceived\nNo Quote",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 1,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"fieldname": "column_break_3",
|
||||||
"allow_on_submit": 0,
|
"fieldtype": "Column Break"
|
||||||
"bold": 0,
|
},
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "column_break_3",
|
|
||||||
"fieldtype": "Column Break",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"bold": 1,
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 1,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fetch_from": "supplier.supplier_name",
|
"fetch_from": "supplier.supplier_name",
|
||||||
"fieldname": "supplier_name",
|
"fieldname": "supplier_name",
|
||||||
"fieldtype": "Read Only",
|
"fieldtype": "Read Only",
|
||||||
"hidden": 0,
|
"in_global_search": 1,
|
||||||
"ignore_user_permissions": 0,
|
"label": "Supplier Name"
|
||||||
"ignore_xss_filter": 0,
|
},
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 1,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Supplier Name",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"columns": 3,
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 3,
|
|
||||||
"fetch_from": "contact.email_id",
|
"fetch_from": "contact.email_id",
|
||||||
"fieldname": "email_id",
|
"fieldname": "email_id",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"in_list_view": 1,
|
||||||
"ignore_user_permissions": 0,
|
"label": "Email Id",
|
||||||
"ignore_xss_filter": 0,
|
"no_copy": 1
|
||||||
"in_filter": 0,
|
},
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Email Id",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
|
||||||
"options": "",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_on_submit": 1,
|
||||||
"allow_on_submit": 1,
|
"fieldname": "download_pdf",
|
||||||
"bold": 0,
|
"fieldtype": "Button",
|
||||||
"collapsible": 0,
|
"label": "Download PDF"
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "download_pdf",
|
|
||||||
"fieldtype": "Button",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Download PDF",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"istable": 1,
|
||||||
"hide_heading": 0,
|
"links": [],
|
||||||
"hide_toolbar": 0,
|
"modified": "2020-09-28 19:31:11.855588",
|
||||||
"idx": 0,
|
"modified_by": "Administrator",
|
||||||
"image_view": 0,
|
"module": "Buying",
|
||||||
"in_create": 0,
|
"name": "Request for Quotation Supplier",
|
||||||
"is_submittable": 0,
|
"owner": "Administrator",
|
||||||
"issingle": 0,
|
"permissions": [],
|
||||||
"istable": 1,
|
"sort_field": "modified",
|
||||||
"max_attachments": 0,
|
"sort_order": "DESC",
|
||||||
"modified": "2018-05-16 22:43:30.212408",
|
"track_changes": 1
|
||||||
"modified_by": "Administrator",
|
|
||||||
"module": "Buying",
|
|
||||||
"name": "Request for Quotation Supplier",
|
|
||||||
"name_case": "",
|
|
||||||
"owner": "Administrator",
|
|
||||||
"permissions": [],
|
|
||||||
"quick_entry": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"read_only_onload": 0,
|
|
||||||
"show_name_in_global_search": 0,
|
|
||||||
"sort_field": "modified",
|
|
||||||
"sort_order": "DESC",
|
|
||||||
"track_changes": 1,
|
|
||||||
"track_seen": 0
|
|
||||||
}
|
}
|
@ -1,11 +1,24 @@
|
|||||||
<h3>{{_("Request for Quotation")}}</h3>
|
<h4>{{_("Request for Quotation")}}</h4>
|
||||||
|
<p>{{ supplier_salutation if supplier_salutation else ''}} {{ supplier_name }},</p>
|
||||||
<p>{{ message }}</p>
|
<p>{{ message }}</p>
|
||||||
|
|
||||||
|
<p>{{_("The Request for Quotation can be accessed by clicking on the following button")}}:</p>
|
||||||
|
<p>
|
||||||
|
<button style="border: 1px solid #15c; padding: 6px; border-radius: 5px; background-color: white;">
|
||||||
|
<a href="{{ rfq_link }}" style="color: #15c; text-decoration:none;" target="_blank">Submit your Quotation</a>
|
||||||
|
</button>
|
||||||
|
</p><br>
|
||||||
|
|
||||||
|
<p>{{_("Regards")}},<br>
|
||||||
|
{{ user_fullname }}</p><br>
|
||||||
|
|
||||||
{% if update_password_link %}
|
{% if update_password_link %}
|
||||||
<p>{{_("Please click on the following link to set your new password")}}:</p>
|
|
||||||
<p><a href="{{ update_password_link }}">{{ update_password_link }}</a></p>
|
<p>{{_("Please click on the following button to set your new password")}}:</p>
|
||||||
{% else %}
|
<p>
|
||||||
<p>{{_("The request for quotation can be accessed by clicking on the following link")}}:</p>
|
<button style="border: 1px solid #15c; padding: 4px; border-radius: 5px; background-color: white;">
|
||||||
<p><a href="{{ rfq_link }}">Submit your Quotation</a></p>
|
<a href="{{ update_password_link }}" style="color: #15c; font-size: 12px; text-decoration:none;" target="_blank">{{_("Update Password") }}</a>
|
||||||
{% endif %}
|
</button>
|
||||||
<p>{{_("Thank you")}},<br>
|
</p>
|
||||||
{{ user_fullname }}</p>
|
|
||||||
|
{% endif %}
|
Loading…
x
Reference in New Issue
Block a user