Hi
I am trying to make a tool to make communications but I am unable to find a way to assign to make a communication as on clicking the button I am getting this error:
Traceback (innermost last):
File "/home/aditya/frappe-bench/apps/frappe/frappe/app.py", line 49, in application
response = frappe.handler.handle()
File "/home/aditya/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
execute_cmd(cmd)
File "/home/aditya/frappe-bench/apps/frappe/frappe/handler.py", line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 531, in call
return fn(*args, **newargs)
TypeError: runserverobj() takes at least 1 argument (1 given)
My python file has the following code:
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
from frappe.model.document import Document
import json
class SalesCall(Document):
def make_communication(self):
com = frappe.new_doc('Communication')
com.subject = 'Test'
return com.as_dict()