Commit graph

68 commits

Author SHA1 Message Date
Akhil Narang
5a4239fbe3
chore(printview): change error message
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-23 13:29:44 +05:30
Corentin Forler
ee73ed8c02
fix: Make background print status translatable 2024-10-16 12:13:55 +02:00
David Arnold
8cfeb156df
devx: add deprecation dumpster (#27887)
* feat: Add deprecation_dumpster.py file

* docs: add jovial and jocose docstring for frappe/deprecation_dumpster.py

* refactor: fill the dumpster with its own kind

* refactor: move to the deprecation dumpster

* chore: color coding class

* fix: only check import error when import errors
2024-10-08 18:56:10 +02:00
Akash
aba2b7808f fix: add missing arg while invoking _download_multi_pdf
(cherry picked from commit f82ed9fe11831d78e612ccd5db189f61439f1026)
2024-03-26 05:41:02 +00:00
Akhil Narang
6a5af14049
fix: unsubscribe from task after completion
Also update event name to be more logical

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
0ec3e4a683
refactor: add in a new endpoint for background printing
Let the original one stay as-is for backward compatibility

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
5e37ac740e
refactor(bulk_print): choose queue dynamically
Update docstrings and type hints a bit

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
508e4d9ae3
fix: make filename more user-friendly
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
5a6bff9de7
fix: let backend generate task ID
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
9bf22b79e4
fix: update message
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
bf6cb1a49f
feat: move bulk print operation to the background
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 16:38:55 +05:30
Akhil Narang
26ae0f3460
fix: ruff fixes
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Hussain Nagaria
8d2137c265 docs: consistent doc strings 2023-12-18 18:27:39 +05:30
Ankush Menat
daca4dd31c chore: keep deprecated function slated for removal in future
This is used in ERPNext.
2023-10-30 17:31:25 +05:30
Ankush Menat
d3225a6df9
refactor: Writing multi-pdf (#22981)
- rename variables, output -> pdf_writer
- write to in memory stream instead of disk


[skip ci]
2023-10-30 17:26:01 +05:30
Ankush Menat
18e791a353 build(deps): PyPDF2 -> pypdf
closes https://github.com/frappe/frappe/issues/19861
2023-06-10 20:47:27 +05:30
Dany Robert
8d03f51dbe fix(multi-pdf): change response type to pdf 2023-04-26 14:05:54 +00:00
Shariq Ansari
06c3ce09f6 fix: letterhead not working for multiple doc print 2023-04-19 16:00:07 +05:30
Suraj Shetty
bc13f909fb
fix: Argument name should be letterhead instead of letter_head (#19627)
fixes https://github.com/frappe/frappe/issues/19515
2023-01-17 18:10:23 +05:30
barredterra
67ede5d533 feat: add parameters language and letter_head to download_pdf 2022-12-14 13:59:46 +01:00
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Gavin D'souza
ef0a92c849 chore(deps): Bump PyPDF2 from 1.26.0 to 2.1.0
* Updated changes in API usages
* changelog: https://github.com/py-pdf/PyPDF2/blob/main/CHANGELOG
2022-06-10 12:08:10 +05:30
Suraj Shetty
af287a04a9 refactor: Remove unnecessary exception handling 2022-06-01 17:50:07 +05:30
Suraj Shetty
a5f19d372a fix: Exception handling for PDF 2022-05-31 10:43:15 +05:30
Suraj Shetty
0fab4de3b8 Merge branch 'develop' of https://github.com/frappe/frappe into fix-document-signature 2022-05-25 14:18:10 +05:30
chillaranand
25f82e966c refactor: Remove unused imports & code 2022-05-19 15:34:35 +05:30
chillaranand
1d763a6659 refactor: Fix flake8 issues 2022-05-19 15:34:35 +05:30
Suraj Shetty
0d10624ce5 Merge branch 'develop' of https://github.com/frappe/frappe into fix-document-signature 2022-05-05 14:20:29 +05:30
Rushabh Mehta
6e6fe9521e fix(linting): no single quotes :'| 2022-04-18 17:29:03 +05:30
Rushabh Mehta
57a55e4225 feat(minor): Add document reference to Error Log and doc.log_error 2022-04-18 17:29:03 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Suraj Shetty
54b6bbce96 wip 2022-02-19 10:57:58 +05:30
Suraj Shetty
af67849928 feat: Option to Print or download PDF in print view 2022-02-18 14:26:33 +05:30
Rohan Bansal
64c18a3187 feat: allow more print page size options 2021-10-26 17:04:41 +05:30
KrithiRamani
ad89c1fcd8
Update frappe/utils/print_format.py
As suggested, moved new args to the end for supporting non-kwarg function calls.

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2021-10-01 09:43:59 +05:30
Krithi Ramani
78a89fdb99 renamed argument to file_path. Added pycups to requirements.txt 2021-09-30 22:20:42 +05:30
Krithi Ramani
2d018a8591 passed filename as argument 2021-09-30 21:59:29 +05:30
Anupam
cfe4dc41c0 review changes 2021-09-27 10:21:19 +05:30
Anupam
ec938c960e feat: provision to add multiple network printers 2021-09-27 10:21:19 +05:30
Suraj Shetty
2d8c6c1710 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-06-03 11:43:28 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Suraj Shetty
d961bda492 fix: Base template path 2021-04-29 12:43:58 +05:30
mergify[bot]
4a79ffd6bb
Merge pull request #8272 from deepeshgarg007/multi_print
fix: Error while printing multiple docs
2019-08-28 09:52:00 +00:00
deepeshgarg007
fb98887cd4 fix: Error while pritning mutiple docs 2019-08-27 12:31:52 +05:30
Sahil Khan
9b65a7c4a1 Merge branch 'version-12-hotfix' into merge_v12_hotfix_1 2019-08-20 16:09:39 +05:30
Faris Ansari
e960255b7b fix: Pass no_letterhead to download_multi_pdf 2019-08-08 22:27:58 +05:30
gavin
b5ab59ad6e feat: Access log (#8014)
* feat: Access log doctype for logging information about private file
downloads, backups downloads, printing and exporting data

* updated: access log

* updated: formattted access_log.js

* access logging: print/pdf/pvt files/export/backup

client side implementation: treeview, query_report
server side implementation on the rest

* fixes: codacy errors

* Update response.py

* Update response.py

* Update response.py

* codacy: please

* travis fixes

* changes:filters=>_filters(lol this works @ times?)

added: tests for access_log, make_access_log formatting, form ui added
buttons

* this hopefully fixes em tests

* changes: fixed indents, session.user, formatting

* fixes: tests, refactor, permissions

emerging from exporter.py => reference doctype in export_data (check
format!)

* fixes: convert dict to json

* changes: added more tests, wrote lesser code?

switched js to display depends on

* fixes: codacy and hopefully travis

* fix: tests? and polishing up

* added column field, removed tracked views

changed access log in exporter.py > export_data
added access log in reportview.py > export_query

* style: Fix indentation

* style: Fix indentation

* fix: Remove problematic string replace

It may replace quotes in the actual filter values which can result in invalid JSON

* fix: Remove filter string conversion

* fix: Error due to quote escapes

TODO: Check for a better way
2019-08-06 10:24:55 +05:30
Anurag Mishra
570fd44248 fix: Translating Errors and Messages 2019-07-03 11:52:47 +05:30
Faris Ansari
467bd8a8ad fix: Remove no_sitemap flag 2019-03-19 20:34:19 +05:30