Merge pull request #23416 from anupamvs/quotation-portal

feat: provision to draft quotation from portal
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index 315d298..99fa703 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -27,9 +27,6 @@
 
 	def after_insert(self):
 		self.update_links()
-		# after the address and contact are created, flush the field values
-		# to avoid inconsistent reporting in case the documents are changed
-		self.flush_address_and_contact_fields()
 
 	def validate(self):
 		self.set_lead_name()
@@ -210,14 +207,6 @@
 			})
 			self.contact_doc.save()
 
-	def flush_address_and_contact_fields(self):
-		fields = ['address_type', 'address_line1', 'address_line2', 'address_title',
-			'city', 'county', 'country', 'fax', 'pincode', 'state']
-
-		for field in fields:
-			self.set(field, None)
-
-
 @frappe.whitelist()
 def make_customer(source_name, target_doc=None):
 	return _make_customer(source_name, target_doc)
@@ -376,3 +365,8 @@
 	lead = leads[0].name if leads else None
 
 	return lead
+
+def daily_open_lead():
+	leads = frappe.get_all("Lead", filters = [["contact_date", "Between", [nowdate(), nowdate()]]])
+	for lead in leads:
+		frappe.db.set_value("Lead", lead.name, "status", "Open")
\ No newline at end of file
diff --git a/erpnext/education/doctype/question/question.json b/erpnext/education/doctype/question/question.json
index b3a161d..e396760 100644
--- a/erpnext/education/doctype/question/question.json
+++ b/erpnext/education/doctype/question/question.json
@@ -13,7 +13,7 @@
  "fields": [
   {
    "fieldname": "question",
-   "fieldtype": "Small Text",
+   "fieldtype": "Text Editor",
    "in_list_view": 1,
    "label": "Question",
    "reqd": 1
@@ -34,7 +34,7 @@
    "read_only": 1
   }
  ],
- "modified": "2019-05-30 18:39:21.880974",
+ "modified": "2020-09-24 18:39:21.880974",
  "modified_by": "Administrator",
  "module": "Education",
  "name": "Question",
@@ -77,4 +77,4 @@
  "quick_entry": 1,
  "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/education/doctype/quiz_question/quiz_question.json b/erpnext/education/doctype/quiz_question/quiz_question.json
index 0564482..aab07a3 100644
--- a/erpnext/education/doctype/quiz_question/quiz_question.json
+++ b/erpnext/education/doctype/quiz_question/quiz_question.json
@@ -20,14 +20,14 @@
   {
    "fetch_from": "question_link.question",
    "fieldname": "question",
-   "fieldtype": "Data",
+   "fieldtype": "Text Editor",
    "in_list_view": 1,
    "label": "Question",
    "read_only": 1
   }
  ],
  "istable": 1,
- "modified": "2019-06-12 12:24:02.312577",
+ "modified": "2020-09-24 12:24:02.312577",
  "modified_by": "Administrator",
  "module": "Education",
  "name": "Quiz Question",
@@ -37,4 +37,4 @@
  "sort_field": "modified",
  "sort_order": "DESC",
  "track_changes": 1
-}
\ No newline at end of file
+}
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index f8b6be7..4e05076 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -336,7 +336,8 @@
 		"erpnext.hr.doctype.leave_ledger_entry.leave_ledger_entry.process_expired_allocation",
 		"erpnext.hr.utils.generate_leave_encashment",
 		"erpnext.loan_management.doctype.loan_security_shortfall.loan_security_shortfall.create_process_loan_security_shortfall",
-		"erpnext.loan_management.doctype.loan_interest_accrual.loan_interest_accrual.process_loan_interest_accrual_for_term_loans"
+		"erpnext.loan_management.doctype.loan_interest_accrual.loan_interest_accrual.process_loan_interest_accrual_for_term_loans",
+		"erpnext.crm.doctype.lead.lead.daily_open_lead"
 	],
 	"monthly_long": [
 		"erpnext.accounts.deferred_revenue.process_deferred_accounting",
diff --git a/erpnext/public/js/education/lms/quiz.js b/erpnext/public/js/education/lms/quiz.js
index 91cbbf4..4a9d1e3 100644
--- a/erpnext/public/js/education/lms/quiz.js
+++ b/erpnext/public/js/education/lms/quiz.js
@@ -140,7 +140,7 @@
 	make_question() {
 		let question_wrapper = document.createElement('h5');
 		question_wrapper.classList.add('mt-3');
-		question_wrapper.innerText = this.question;
+		question_wrapper.innerHTML = this.question;
 		this.wrapper.appendChild(question_wrapper);
 	}
 
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 87982f1..9ed5009 100755
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -480,7 +480,7 @@
 				callback: r => {
 					if(!r.exc) {
 						if (this.doc.conversion_factor == r.message.conversion_factor) return;
-						
+
 						const docname = this.doc.docname;
 						dialog.fields_dict.trans_items.df.data.some(doc => {
 							if (doc.docname == docname) {
@@ -677,6 +677,7 @@
 			date_field: opts.date_field || undefined,
 			setters: opts.setters,
 			get_query: opts.get_query,
+			add_filters_group: 1,
 			action: function(selections, args) {
 				let values = selections;
 				if(values.length === 0){
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 1f95447..39fd029 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -156,6 +156,7 @@
 						mr_item.item_code = item.item_code;
 						mr_item.item_name = item.item_name;
 						mr_item.uom = item.uom;
+						mr_item.stock_uom = item.stock_uom;
 						mr_item.conversion_factor = item.conversion_factor;
 						mr_item.item_group = item.item_group;
 						mr_item.description = item.description;