shridarpatil / frappe_whatsapp

WhatsApp cloud integration for frappe
https://www.youtube.com/watch?v=nq5Kcc5e1oc
Other
162 stars 151 forks source link

Whatsapp Notification #80

Closed nilpatel42 closed 1 week ago

nilpatel42 commented 1 month ago

In Whatsapp Notification, option to send notification like shown in image

image

it is helpful in payments or other reminder

wepe17 commented 1 month ago

Please fixing this issue. Thankyou

cc @shridarpatil

App Versions

{
    "erpnext": "15.16.2",
    "frappe": "15.17.1",
    "frappe_whatsapp": "v1.0.7",
    "healthcare": "16.0.0-dev"
}

Route

Workspaces/POS KASIR

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, 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 1716, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/handler.py", line 114, in logout
    frappe.local.login_manager.logout()
  File "apps/frappe/frappe/auth.py", line 343, in logout
    delete_session(frappe.session.sid, user=user, reason="User Manually Logged Out")
  File "apps/frappe/frappe/sessions.py", line 93, in delete_session
    logout_feed(user, reason)
  File "apps/frappe/frappe/core/doctype/activity_log/feed.py", line 20, in logout_feed
    add_authentication_log(subject, user, operation="Logout")
  File "apps/frappe/frappe/core/doctype/activity_log/activity_log.py", line 73, in add_authentication_log
    frappe.get_doc(
  File "apps/frappe/frappe/model/document.py", line 283, in insert
    self.run_method("before_insert")
  File "apps/frappe/frappe/model/document.py", line 959, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1319, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1303, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 17, in run_server_script_for_doc_event
    notification = get_notifications_map().get(
  File "apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 36, in get_notifications_map
    enabled_whatsapp_notifications = frappe.get_all(
  File "apps/frappe/frappe/__init__.py", line 2005, in get_all
    return get_list(doctype, *args, **kwargs)
  File "apps/frappe/frappe/__init__.py", line 1980, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
  File "apps/frappe/frappe/model/db_query.py", line 186, in execute
    self.columns = self.get_table_columns()
  File "apps/frappe/frappe/model/db_query.py", line 545, in get_table_columns
    return get_table_columns(self.doctype)
  File "apps/frappe/frappe/model/meta.py", line 73, in get_table_columns
    return frappe.db.get_table_columns(doctype)
  File "apps/frappe/frappe/database/database.py", line 1197, in get_table_columns
    raise self.TableMissingError("DocType", doctype)
pymysql.err.ProgrammingError: ('DocType', 'WhatsApp Notification')

Request Data

{
    "type": "POST",
    "args": {},
    "headers": {},
    "error_handlers": {},
    "url": "/api/method/logout",
    "request_id": null
}

Response Data

{
    "exception": "pymysql.err.ProgrammingError: ('DocType', 'WhatsApp Notification')",
    "exc_type": "ProgrammingError",
    "_exc_source": "frappe_whatsapp (app)"
}

image

nilpatel42 commented 4 weeks ago

for Whatsapp Notification Improvement add function here like frappe telegram, it can help to get feature faster

Screencast from 29-07-24 02:16:02 PM IST.webm

shridarpatil commented 1 week ago

https://github.com/shridarpatil/frappe_whatsapp/pull/90 add a feature for this.