Merge pull request #5321 from rohitwaghchaure/rfq_fixes
[Fixes] RFQ minor fixes
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 4defbbb..5972f46 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 @@
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 @@
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 @@
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 f78e5e2..d9b34eb 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,
@@ -64,33 +65,6 @@
"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,
- "collapsible": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 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 135e9fc..5a189bf 100644
--- a/erpnext/docs/assets/img/buying/make-supplier-quotation-from-rfq.png
+++ b/erpnext/docs/assets/img/buying/make-supplier-quotation-from-rfq.png
Binary files 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 0000000..96c6917
--- /dev/null
+++ b/erpnext/docs/assets/img/buying/request-for-quotation.gif
Binary files 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 0000000..835aca3
--- /dev/null
+++ b/erpnext/docs/assets/img/buying/send-rfq-link.png
Binary files 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 0000000..e8cfadf
--- /dev/null
+++ b/erpnext/docs/assets/img/buying/send-supplier-emails.png
Binary files 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 0000000..14974f2
--- /dev/null
+++ b/erpnext/docs/assets/img/buying/set-email-id.png
Binary files 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 0000000..6fe13ca
--- /dev/null
+++ b/erpnext/docs/assets/img/buying/supplier-password-update-link.png
Binary files 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 0000000..c271862
--- /dev/null
+++ b/erpnext/docs/assets/img/buying/supplier-portal-rfq.png
Binary files 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 0000000..a57764e
--- /dev/null
+++ b/erpnext/docs/assets/img/buying/supplier-quotation-from-rfq.png
Binary files 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 0000000..e0c7819
--- /dev/null
+++ b/erpnext/docs/assets/img/buying/supplier-selection-from-rfq.png
Binary files 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 379cdb5..c27895f 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 @@
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 e4dc4e6..cef93a5 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 %}
-<style>
- {% include "templates/includes/order/order.css" %}
-</style>
-{% endblock %}
-
{% block header_actions %}
{% if doc.items %}
<button class="btn btn-primary btn-sm"
@@ -35,8 +29,7 @@
{{ doc.get_formatted("transaction_date") }}
</div>
</div>
-
-<div class="rfq-content">
+<div class="rfq-content" style="margin-top:15px">
<div id="order-container">
<div id="rfq-items">
<div class="row cart-item-header">