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

Include archives stored in Nextcloud as attachments to the email #12

Closed
doloresjuliana opened this issue Feb 17, 2019 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@doloresjuliana
Copy link
Owner

When an email is sent from a Frappe transaction, the user can select attachments that are stored in Nextcloud.
Automatically the system will download the files from Nextcloud and include them in the email as attached files.

@doloresjuliana
Copy link
Owner Author

doloresjuliana commented Feb 20, 2019

A hook in frappe has not been found that allows us to include the necessary change to implement this functionality.

To activate the new functionality it is necessary that you invade the Frappe code in the "get_content" function of "frappe / core / doctype / file / file.py"

Enter the lines of code in bold:

def get_content(self):
_method = frappe.get_hooks('doc_events', app_name="pibiapp").get('File').get('get_content')
_if method:
__method = frappe.get_attr(method[0])
__return method(self)

_"""Returns [file_name, content] for given file name fname"""
_if self.get('content'):
__return self.content

@doloresjuliana
Copy link
Owner Author

See commit 6104a48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant