diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index 4defbbb8f67..5972f464a80 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -18,6 +18,7 @@ class RequestforQuotation(BuyingController): def validate(self): self.validate_duplicate_supplier() self.validate_common() + self.update_email_id() def validate_duplicate_supplier(self): supplier_list = [d.supplier for d in self.suppliers] @@ -28,6 +29,11 @@ class RequestforQuotation(BuyingController): pc = frappe.get_doc('Purchase Common') pc.validate_for_items(self) + def update_email_id(self): + for rfq_supplier in self.suppliers: + if not rfq_supplier.email_id: + rfq_supplier.email_id = frappe.db.get_value("Contact", rfq_supplier.contact, "email_id") + def on_submit(self): frappe.db.set(self, 'status', 'Submitted') @@ -37,12 +43,14 @@ class RequestforQuotation(BuyingController): def send_to_supplier(self): link = get_url("/rfq/" + self.name) for rfq_supplier in self.suppliers: - if rfq_supplier.email_id and rfq_supplier.send_email_to_supplier: + if rfq_supplier.email_id: # make new user if required update_password_link = self.create_supplier_user(rfq_supplier, link) self.supplier_rfq_mail(rfq_supplier, update_password_link, link) + else: + frappe.throw(_("For supplier {0} email id is required to send email").format(rfq_supplier.supplier)) def create_supplier_user(self, rfq_supplier, link): '''Create a new user for the supplier if not set in contact''' diff --git a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json index f78e5e24cb3..d9b34eb556f 100644 --- a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json +++ b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json @@ -2,6 +2,7 @@ "allow_copy": 0, "allow_import": 0, "allow_rename": 0, + "beta": 0, "creation": "2016-03-29 05:59:11.896885", "custom": 0, "docstatus": 0, @@ -60,33 +61,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "default": "1", - "description": "", - "fieldname": "send_email_to_supplier", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Send Email to Supplier", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_on_submit": 0, "bold": 0, @@ -142,7 +116,7 @@ "bold": 0, "collapsible": 0, "fieldname": "email_id", - "fieldtype": "Read Only", + "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -173,13 +147,14 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-04-06 05:39:47.516470", + "modified": "2016-05-10 11:36:04.171180", "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, "sort_field": "modified", diff --git a/erpnext/docs/assets/img/buying/make-supplier-quotation-from-rfq.png b/erpnext/docs/assets/img/buying/make-supplier-quotation-from-rfq.png index 135e9fc62db..5a189bfe076 100644 Binary files a/erpnext/docs/assets/img/buying/make-supplier-quotation-from-rfq.png and b/erpnext/docs/assets/img/buying/make-supplier-quotation-from-rfq.png differ diff --git a/erpnext/docs/assets/img/buying/request-for-quotation.gif b/erpnext/docs/assets/img/buying/request-for-quotation.gif new file mode 100644 index 00000000000..96c69172e9b Binary files /dev/null and b/erpnext/docs/assets/img/buying/request-for-quotation.gif differ diff --git a/erpnext/docs/assets/img/buying/send-rfq-link.png b/erpnext/docs/assets/img/buying/send-rfq-link.png new file mode 100644 index 00000000000..835aca32609 Binary files /dev/null and b/erpnext/docs/assets/img/buying/send-rfq-link.png differ diff --git a/erpnext/docs/assets/img/buying/send-supplier-emails.png b/erpnext/docs/assets/img/buying/send-supplier-emails.png new file mode 100644 index 00000000000..e8cfadff43a Binary files /dev/null and b/erpnext/docs/assets/img/buying/send-supplier-emails.png differ diff --git a/erpnext/docs/assets/img/buying/set-email-id.png b/erpnext/docs/assets/img/buying/set-email-id.png new file mode 100644 index 00000000000..14974f2a8ad Binary files /dev/null and b/erpnext/docs/assets/img/buying/set-email-id.png differ diff --git a/erpnext/docs/assets/img/buying/supplier-password-update-link.png b/erpnext/docs/assets/img/buying/supplier-password-update-link.png new file mode 100644 index 00000000000..6fe13ca0cb2 Binary files /dev/null and b/erpnext/docs/assets/img/buying/supplier-password-update-link.png differ diff --git a/erpnext/docs/assets/img/buying/supplier-portal-rfq.png b/erpnext/docs/assets/img/buying/supplier-portal-rfq.png new file mode 100644 index 00000000000..c271862f02c Binary files /dev/null and b/erpnext/docs/assets/img/buying/supplier-portal-rfq.png differ diff --git a/erpnext/docs/assets/img/buying/supplier-quotation-from-rfq.png b/erpnext/docs/assets/img/buying/supplier-quotation-from-rfq.png new file mode 100644 index 00000000000..a57764e89d0 Binary files /dev/null and b/erpnext/docs/assets/img/buying/supplier-quotation-from-rfq.png differ diff --git a/erpnext/docs/assets/img/buying/supplier-selection-from-rfq.png b/erpnext/docs/assets/img/buying/supplier-selection-from-rfq.png new file mode 100644 index 00000000000..e0c7819b5c5 Binary files /dev/null and b/erpnext/docs/assets/img/buying/supplier-selection-from-rfq.png differ diff --git a/erpnext/docs/user/manual/en/buying/request-for-quotation.md b/erpnext/docs/user/manual/en/buying/request-for-quotation.md index 379cdb543ee..c27895f3e82 100644 --- a/erpnext/docs/user/manual/en/buying/request-for-quotation.md +++ b/erpnext/docs/user/manual/en/buying/request-for-quotation.md @@ -2,13 +2,51 @@ A Request for Quotation is a document that an organization submits to one or mor In ERPNext, You can create request for quotation directly by going to: -`Buying > Documents > Request for Quotation > New Request for Quotation` - -Create Request for Quotation: +> Buying > Documents > Request for Quotation > New Request for Quotation ![Request For Quotation]({{docs_base_url}}/assets/img/buying/request-for-quotation.png) -Create Supplier Quotation from Request for Quotation form: +After creation of request for quotation, there are two ways to generate supplier quotation from request for quotation. + +#### For User + +__Step 1:__ Open request for quotation and click on make supplier quotation. ![Request For Quotation]({{docs_base_url}}/assets/img/buying/make-supplier-quotation-from-rfq.png) - \ No newline at end of file + +__Step 2:__ Select supplier and click on make supplier quotation. + +![Request For Quotation]({{docs_base_url}}/assets/img/buying/supplier-selection-from-rfq.png) + +__Step 3:__ System will open the supplier quotation, user has to enter the rate and submit it. + +![Request For Quotation]({{docs_base_url}}/assets/img/buying/supplier-quotation-from-rfq.png) + +#### For Supplier + +__Step 1:__ User has to create contact or enter email id against the supplier on request for quotation. + +![Request For Quotation]({{docs_base_url}}/assets/img/buying/set-email-id.png) + +__Step 2:__ User has to click on send supplier emails button. + +![Request For Quotation]({{docs_base_url}}/assets/img/buying/send-supplier-emails.png) + +* If supplier's user not available: system will create supplier's user and send details to the supplier, supplier will need to click on the link(Password Update) present in the email. After password update supplier can access his portal with the request for quotation form. + +![Request For Quotation]({{docs_base_url}}/assets/img/buying/supplier-password-update-link.png) + +* If supplier's user available: system will send request for quotation link to supplier, supplier has to login using his credentials to view request for quotation form on portal. + +![Request For Quotation]({{docs_base_url}}/assets/img/buying/send-rfq-link.png) + +__Step 3:__ Supplier has to enter amount and notes(payment terms) on the form and click on submit + +![Request For Quotation]({{docs_base_url}}/assets/img/buying/supplier-portal-rfq.png) + +__Step 4:__ On submission, system will create supplier quotation(draft mode) against the supplier. User has to review the supplier quotation + and submit it. + +More details:- + +![Request For Quotation]({{docs_base_url}}/assets/img/buying/request-for-quotation.gif) \ No newline at end of file diff --git a/erpnext/templates/pages/rfq.html b/erpnext/templates/pages/rfq.html index e4dc4e6f351..cef93a55e10 100644 --- a/erpnext/templates/pages/rfq.html +++ b/erpnext/templates/pages/rfq.html @@ -12,12 +12,6 @@ {% include "templates/includes/breadcrumbs.html" %} {% endblock %} -{% block style %} - -{% endblock %} - {% block header_actions %} {% if doc.items %}