You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the webservice "get_last_membership" is called, the argument "member" is undefined. This is because the object value frm.doc.member just does not exist in the JavaScript object frm.
Solution
In erpnext/non_profit/doctype/member/member.js replace
@deepeshgarg007 thank you for moving that issue. In fact, this is not a problem anymore in v14. It only affects the non-profit module of erpnext v13. So I think it should be moved back again. Or if you don't fix the issue for v13 then close it as a won't fix.
Information about bug
When the webservice "get_last_membership" is called, the argument "member" is undefined. This is because the object value frm.doc.member just does not exist in the JavaScript object frm.
Solution
In erpnext/non_profit/doctype/member/member.js replace
frm.doc.member with
frm.doc.name
Git diff
Other mentions of this bug
I am not the only one who encountered this bug. It is also mentioned there:
https://discuss.frappe.io/t/back-dating-memberships/61738/2
It has also been reported there:
#10
Link to the line to be changed:
https://github.com/frappe/erpnext/blob/6a9660de65c4ef7d39debc72bee9b7419831f482/erpnext/non_profit/doctype/member/member.js#L56
The non_profit has apparently been remove in v14:
The 'frappe/erpnext' repository doesn't contain the 'erpnext/non_profit/doctype/member/member.js' path in 'version-14'.
Module
non-profit
Version
ERPNext: v13.39.1 (HEAD)
Frappe Framework: v13.41.2 (HEAD)
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
### App Versions
{
"erpnext": "13.39.1",
"erpnextswiss": "1.19.0",
"frappe": "13.41.2"
}
Form/Member/GEN-MTGLD-00082
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 69, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 38, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1457, in call
return fn(*args, **newargs)
TypeError: get_last_membership() missing 1 required positional argument: 'member'
{
"type": "POST",
"args": {},
"headers": {},
"error_handlers": {},
"url": "/api/method/erpnext.get_last_membership"
}
{
"exception": "TypeError: get_last_membership() missing 1 required positional argument: 'member'"
}
The text was updated successfully, but these errors were encountered: