I have copied the same Form Data from the erp creates when creating the sales return
and sending same data via postman rest api it is not working
it gives error
URL: http://127.0.0.1/api/method/frappe.desk.form.save.savedocs
Server Error
Traceback (most recent call last):
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/serverusername/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 12, in savedocs
doc = frappe.get_doc(json.loads(doc))
File “/usr/lib/python2.7/json/init.py”, line 339, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer