def test_make_supplier_quotation_with_special_characters(self):
        frappe.delete_doc_if_exists("Supplier", "_Test Supplier '1", force=1)
        supplier = frappe.new_doc("Supplier")
        supplier.supplier_name = "_Test Supplier '1"
        supplier.supplier_group = "_Test Supplier Group"
        supplier.insert()

        rfq = make_request_for_quotation(supplier_data=supplier_wt_appos)

        sq = make_supplier_quotation_from_rfq(
            rfq.name, for_supplier=supplier_wt_appos[0].get("supplier"))
        sq.submit()

        frappe.form_dict.name = rfq.name

        self.assertEqual(
            check_supplier_has_docname_access(
                supplier_wt_appos[0].get("supplier")), True)

        # reset form_dict
        frappe.form_dict.name = None
示例#2
0
    def test_make_supplier_quotation_with_special_characters(self):
        from erpnext.buying.doctype.request_for_quotation.request_for_quotation import make_supplier_quotation

        frappe.delete_doc_if_exists("Supplier", "_Test Supplier '1", force=1)
        supplier = frappe.new_doc("Supplier")
        supplier.supplier_name = "_Test Supplier '1"
        supplier.supplier_type = "_Test Supplier Type"
        supplier.insert()

        rfq = make_request_for_quotation(supplier_wt_appos)

        sq = make_supplier_quotation(rfq.name,
                                     supplier_wt_appos[0].get("supplier"))
        sq.submit()

        frappe.form_dict = frappe.local("form_dict")
        frappe.form_dict.name = rfq.name

        self.assertEqual(
            check_supplier_has_docname_access(
                supplier_wt_appos[0].get('supplier')), True)

        # reset form_dict
        frappe.form_dict.name = None
	def test_make_supplier_quotation_with_special_characters(self):
		from erpnext.buying.doctype.request_for_quotation.request_for_quotation import make_supplier_quotation

		frappe.delete_doc_if_exists("Supplier", "_Test Supplier '1", force=1)
		supplier = frappe.new_doc("Supplier")
		supplier.supplier_name = "_Test Supplier '1"
		supplier.supplier_type = "_Test Supplier Type"
		supplier.insert()

		rfq = make_request_for_quotation(supplier_wt_appos)

		sq = make_supplier_quotation(rfq.name, supplier_wt_appos[0].get("supplier"))
		sq.submit()

		frappe.form_dict = frappe.local("form_dict")
		frappe.form_dict.name = rfq.name

		self.assertEqual(
			check_supplier_has_docname_access(supplier_wt_appos[0].get('supplier')),
			True
		)

		# reset form_dict
		frappe.form_dict.name = None