If wkhtmltopdf throws a ContentNotFoundError exception (even though there is content) or other catchable exceptions the output keyword is not updated properly as it is in the try: section if no exception is thrown. This causes the PDF being returned to be empty, empty PdfFileWriter() created in print_format.py line 26. This causes issues like https://github.com/frappe/erpnext/issues/13124 to occur where the viewer.js throws an error due to a bad pdf file. The ContentNotFoundError exception is happening due to no header image in the letterhead or its a bad link being used when multi printing.
The whole get_pdf() function should be rebuilt to test for ContentNotFoundError and other errors from wkhtmltopdf and then use a secondary try/catch to check for any other IOErrors related to being able to read the PDF back in from the file. Right now this is not DRY since I basically copy and pasted lines 18 - 22 under line 31 so that if there is an error but the file exists the output will still be appended properly.
- Publish realtime message when notifications are cleared
- Refresh notifications on client on clear_notifications event
- refresh_notfications will be called only once in a 1 second window
- No more 30 sec polling
* Moving after_install to occur after fixtures and customizations install
"after_install" was being called prior to fixtures that a module depends on gets installed, which makes after_install incapable of working with those doctypes. This is particularly frustrating because there is not an "after_install_with_fixtures_and_customizations" hook...
* fixing trailing whitespace
* Fix for notifications using "from_module".
Notifications using "from_module" designation previously did not work. There's two reasons for this. First, the calculation for summing notifications was exclusively choosing the notifications counts from doctype, and not using the total sum to include modules. Second, the default "_id" for a module was being automatically set to the "link" of a module. This is an issue because module links can actually contain JS (which allow them to open there pages in the same window, for example). Because of this, they do not make for good identifiers. This fix uses the toLowerCase of the module_name as the default module _id.
* fixing double declaration of count
* contending with "core is already defined" codacy error.
* Adding after_sync hook per @rmehta request.
* trying to force travis-CI to rebuild
* set default value on field change
also if default value is not set, a value from options is used as default
* fix
since hide_toolbar was enabled there was no need to toggle footer view
* Sync childtables data, handle submin/cancel fail and fixed incorrect form dirty
* minor fix
* Ignore microseconds while making a form dirty based on time field's value