On my hosted erpnext instance when I try to generate the gross profit report I get this error. and if I press submit to send the issue to the technical support team, it does nothing so this is why I’m posting this here…
Traceback (most recent call last):
File "/home/frappe/benches/bench-2017-03-30/apps/frappe/frappe/app.py", line 55, in application
response = frappe.handler.handle()
File "/home/frappe/benches/bench-2017-03-30/apps/frappe/frappe/handler.py", line 19, in handle
execute_cmd(cmd)
File "/home/frappe/benches/bench-2017-03-30/apps/frappe/frappe/handler.py", line 40, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/frappe/benches/bench-2017-03-30/apps/frappe/frappe/__init__.py", line 901, in call
return fn(*args, **newargs)
File "/home/frappe/benches/bench-2017-03-30/apps/frappe/frappe/desk/query_report.py", line 93, in run
res = frappe.get_attr(method_name)(frappe._dict(filters))
File "/home/frappe/benches/bench-2017-03-30/apps/erpnext/erpnext/accounts/report/gross_profit/gross_profit.py", line 16, in execute
gross_profit_data = GrossProfitGenerator(filters)
File "/home/frappe/benches/bench-2017-03-30/apps/erpnext/erpnext/accounts/report/gross_profit/gross_profit.py", line 105, in __init__
self.process()
File "/home/frappe/benches/bench-2017-03-30/apps/erpnext/erpnext/accounts/report/gross_profit/gross_profit.py", line 128, in process
row.buying_amount = self.get_buying_amount(row, row.item_code)
File "/home/frappe/benches/bench-2017-03-30/apps/erpnext/erpnext/accounts/report/gross_profit/gross_profit.py", line 213, in get_buying_amount
return flt(row.qty) * self.get_average_buying_rate(row, item_code)
File "/home/frappe/benches/bench-2017-03-30/apps/erpnext/erpnext/accounts/report/gross_profit/gross_profit.py", line 226, in get_average_buying_rate
average_buying_rate = get_valuation_rate(item_code, row.warehouse, allow_zero_rate=True)
TypeError: get_valuation_rate() takes at least 4 arguments (3 given)