Closed crazy-explore-r closed 1 year ago
@crazy-explore-r Thanks a lot buddy for reporting this..
If you can, please provide more information on how to reproduce this error so I can fix it..
Best regards..
Hello @kid1194,
I can see that in Todo List
Now I am using the new option "Unassign From" in action menu from "Role" Doctype
@crazy-explore-r I think that the error is thrown when trying to notify the user who assigned the ToDo so I have stopped this part for now..
Please update and give it another try then let me know if it's working or not..
Best regards..
Hello @kid1194, Now it is working but, another issue is happening. PFB
In unassign popup, user select dropdown is not showing.
The below error is showing in console.
@crazy-explore-r Thanks a lot buddy for reporting this..
Now the users list error is fixed, the user notify that was disabled before is enabled and any thrown error will be posted to Frappe's error log doctype with the title "List Unassign From"..
Please update and give it another try then let me know if it's working or not..
Best regards..
@kid1194,
I'm facing 2 issues,
Also find the server error below,
{
"erpnext": "14.31.1",
"frappe": "14.41.0",
"frappe_list_unassign_from": "1.0.7",
"frappe_whatsapp": "0.0.2",
"hrms": "14.6.1",
"india_compliance": "14.12.0",
"payments": "0.0.1"
}
List/Leads/List
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 94, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 47, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1619, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/search.py", line 37, in search_link
search_widget(
File "apps/frappe/frappe/desk/search.py", line 108, in search_widget
raise e
File "apps/frappe/frappe/desk/search.py", line 84, in search_widget
is_whitelisted(frappe.get_attr(query))
File "apps/frappe/frappe/__init__.py", line 1609, in get_attr
return getattr(get_module(modulename), methodname)
File "apps/frappe/frappe/__init__.py", line 1339, in get_module
return importlib.import_module(modulename)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "apps/frappe_list_unassign_from/frappe_list_unassign_from/api/__init__.py", line 7, in <module>
from .unassign_from import *
File "apps/frappe_list_unassign_from/frappe_list_unassign_from/api/unassign_from.py", line 107
);
^
SyntaxError: invalid syntax
{
"type": "GET",
"args": {
"doctype": "Leads",
"txt": "",
"query": "frappe_list_unassign_from.api.search_link",
"filters": "{\"docname\":[\"LEADID00272099\"]}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.search.search_link"
}
{
"exception": "SyntaxError: invalid syntax"
}
@crazy-explore-r Sorry bro, it was a syntax mistake..
The above error alerts are because of this mistake. Thanks to you, it's fixed now..
Best regards..
Hello @kid1194, Thanks for the Attributionā¤
Still facing issue while unassigning. The dropdown is not showing. Also there is no error in the console.
@crazy-explore-r The attribution is the lest that I can do in return š
I have updated the plugin..
The changes are:
Please give it a try and let me know if it is still not working..
Best regards..
@kid1194 , Issue is still persist. In unassign popup, dropdown is not showing for user list.
@crazy-explore-r Can you please do the following..
Open the dialog and type anything in the users list field and finally open the browser console and check if there is any log that starts with [UnassignFrom][Dialog]..
If a log is found, please post a screenshot of the console..
Best regards..
While Assigning:
While unassigning: Dropdown is not showing, but if I manually type the email id it is removing. The only problem is user list dropdown.
Thank You
@crazy-explore-r Previously I misunderstood the issue..
Thank you for clearing that out for me..
I will try to fix the dropdown issue and get back to you..
Best regards..
@crazy-explore-r I think that the dropdown was not showing or was taking some time to show is because the field query is done using a custom method..
Now I have made the code call the custom search method directly so it should be faster than before..
Best regards..
{
"erpnext": "14.31.1",
"frappe": "14.41.0",
"frappe_list_unassign_from": "1.0.8",
"hrms": "14.6.1",
"india_compliance": "14.12.0",
"payments": "0.0.1"
}
List/User/List
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 94, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 47, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1619, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/search.py", line 37, in search_link
search_widget(
File "apps/frappe/frappe/desk/search.py", line 108, in search_widget
raise e
File "apps/frappe/frappe/desk/search.py", line 85, in search_widget
frappe.response["values"] = frappe.call(
File "apps/frappe/frappe/__init__.py", line 1619, in call
return fn(*args, **newargs)
TypeError: search_link() takes 3 positional arguments but 6 were given
{
"type": "GET",
"args": {
"doctype": "User",
"txt": "",
"query": "frappe_list_unassign_from.api.search_link",
"filters": "{\"docnames\":[\"developer.ragul@gmail.com\"]}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.search.search_link"
}
{
"exception": "TypeError: search_link() takes 3 positional arguments but 6 were given"
}
@crazy-explore-r Bro, did you update the plugin?
I think that the error is cache related since the plugin now doesn't rely on "api/method/frappe.desk.search.search_link"..
It sends the request directly to the custom method..
This is the old request..
{
"type": "GET",
"args": {
"doctype": "User",
"txt": "",
"query": "frappe_list_unassign_from.api.search_link",
"filters": "{\"docnames\":[\"developer.ragul@gmail.com\"]}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.search.search_link"
}
This is the new request..
{
"type": "POST",
"args": {
"doctype": "User",
"txt": "",
"filters": "{\"docnames\":[\"developer.ragul@gmail.com\"]}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe_list_unassign_from.api.search_link"
}
Best regards..
Hello @kid1194, Now the error is not showing. Also the dropdown is not showing.
@crazy-explore-r There is something wrong going with the request, so for now I used frappe's code which fetches all users..
Please give it a try..
Best regards..
Awesome Bro it is working as expected. Thanks A Lotā¤
@crazy-explore-r I'm glad that it finally worked..
Thanks a lot brother for your patience and help..
Best regards..
The below message is showing.
Screenshots