Commit graph

47 commits

Author SHA1 Message Date
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
Saif
1bb4c6275f fix: Don't send attachment/download header with PDF files (#6881) 2019-02-06 12:48:41 +05:30
Aditya Hase
6b72faf44f style: Linting fixes (#6809)
* style: Remove unused imports

* style: Remove unused local variables
2019-01-23 16:39:55 +05:30
Faris Ansari
987a604749 fix: Use ImportError instead of ModuleNotFoundError (#6797)
- ModuleNotFoundError is available in python 3.6
2019-01-21 17:57:38 +05:30
Ameya Shenoy
8776376c13
multi fixes
- [fix] removed _ as a variable since it is used in translations
- linting fixes
- added error logging for permission errors
2018-08-23 10:47:01 +00:00
Ameya Shenoy
65e96ff7a4 added docstring to download multi pdf
- also made the PDF name as a parameter which is passed by the user
2018-08-21 14:59:47 +05:30
Ameya Shenoy
4504bc1ebc
[feature] print multiple docs from multiple doctypes 2018-08-20 18:57:59 +00:00
Ameya Shenoy
2d10c8e074
minor fixes
- [x] linting fixes
- [x] removed format as a parameter, instead used print_format
- [x] removed pycups as a requirement, user needs to manually install
- [x] moved import from global to inside a function to prevent errors
- [x] uncheck Enable Print Server is pycups is not installed
2018-07-24 11:03:11 +00:00
Mohammed R Abukhamseen
10a8946a18
Update print_format.py 2018-06-29 14:57:46 +03:00
sbco
d6ca2ceaee enable print server 2018-06-28 12:45:07 +03:00
rohitwaghchaure
0db18fdf91 [Fix] Letterhead appearing on PDF even when not selected (#4484) 2017-11-14 13:43:33 +05:30
Rushabh Mehta
5472f2c327 [fix] pypdf > pydf2 2017-08-11 16:22:55 +05:30
Rushabh Mehta
9c03e3aef7 [fix] pypdf > pydf2 2017-08-11 14:22:15 +05:30
Rushabh Mehta
62f0480117 [rename] frappe.www.print to frappe.www.printview 2017-05-03 15:59:24 +05:30
Nabin Hait
4cf123bd8f Fixed merge conflict 2016-11-28 14:25:11 +05:30
rohitwaghchaure
e03d56adb6 [Fix] Multiple letter head printing issue on print format (#2365) 2016-11-25 16:10:42 +05:30
Faris Ansari
81ef23ab0b pdf prompt for orientation (#2358) 2016-11-25 16:01:00 +05:30
Rushabh Mehta
7b69625cbe [fix] tests 2016-10-19 09:21:55 +05:30
Rohit Waghchaure
e275f1a7cb Moved download_multi_pdf, download_pdf, report_to_pdf to new file print_format.py 2016-07-01 13:14:18 +05:30