Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass empty string email content of pos invoice #40514

Merged

Conversation

mmdanny89
Copy link
Contributor

When complete order in point of sale (Order Summary). When we send invoice email frappe send this error:

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 95, 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 1622, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/core/doctype/communication/email.py", line 79, in make
return _make(
File "apps/frappe/frappe/core/doctype/communication/email.py", line 173, in _make
comm.send_email(
File "apps/frappe/frappe/core/doctype/communication/mixins.py", line 305, in send_email
if input_dict := self.sendmail_input_dict(
File "apps/frappe/frappe/core/doctype/communication/mixins.py", line 284, in sendmail_input_dict
"content": self.get_content(print_format=print_format),
File "apps/frappe/frappe/core/doctype/communication/mixins.py", line 142, in get_content
return self.content + self.get_attach_link(print_format)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Request Data

{
"type": "POST",
"args": {
"recipients": "mmdanny89@gmail.com",
"subject": "POS Invoice: ACC-PSINV-2024-00035",
"doctype": "POS Invoice",
"name": "ACC-PSINV-2024-00035",
"send_email": 1,
"print_format": "Invoice Print POS",
"sender_full_name": "Danny Molina",
"_lang": "es"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.core.doctype.communication.email.make"
}

In view i added empty content for this email.make call this slove the error

@deepeshgarg007 deepeshgarg007 merged commit 03eb4d7 into frappe:version-14-hotfix Mar 23, 2024
6 checks passed
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.66.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

deepeshgarg007 added a commit that referenced this pull request Apr 10, 2024
…-40514

fix: pass empty string email content of pos invoice (#40514)
nabinhait added a commit that referenced this pull request Apr 11, 2024
…-15-hotfix/pr-40514

Revert "fix: pass empty string email content of pos invoice (backport #40514)"
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants