Create RFQ from a custom doctype

Dear all
I have a custom doctype named “Special Order”, what I want is; creating Request for Quotation from this doctype
I have tried the below code but that gives me this error
Server Error: Please check your server logs or contact tech support.


i think you should check the path for the function

1 Like

You mean methode: “erpnext.buying.doctype.request_for_quotation”

yes, you stoped on the folder not the py file
and you need to implement a function which create the doc or redirect you location to new doc .

example : this function make_request_for_quotation located in
and the call is

make_request_for_quotation: function() {
method: “erpnext.stock.doctype.material_request.material_request.make_request_for_quotation”,
frm: cur_frm,
run_link_triggers: true

1 Like

Dear Mr. @ahmad I tried the bellow code to get the result but when I refresh the page a popup error tells “SyntaxError: Invalid or unexpected token”

the way which call a function is wrong?

I followed the code in github which they make RFQ from Material Request

could you share the js file and your py file code ?

expnext is in production mode and I have not access to py code
the above code which I have written is in custom script (client-side)

mmmmmm ,
so basically you can not add new python function.
let me try out a solution and share it with you .

1 Like

can you share you custom doctype Spicial Order ?

1 Like

created in selling module

Special Order

Special Order items