Commit graph

82 commits

Author SHA1 Message Date
Maharshi Patel
1bae6a2b0b
feat: hooks added for print formats / pdf. (#20734) 2023-04-17 19:03:53 +05:30
Sagar Vora
a56ea73b7d fix: escape HTML instead of sanitizing 2023-03-30 06:27:07 +00:00
Suraj Shetty
09ea38e96f fix: Set link title in PDF
Co-authored-by: Saqib Ansari <nextchamp.saqib@gmail.com>
2023-03-15 14:14:41 +05:30
Raffael Meyer
ed30a6d59f
refactor(minor): use DocStatus (#19545) 2023-01-10 17:38:11 +05:30
Gavin D'souza
06cf18d0aa chore: Add optional typing hints for params with default None 2022-12-15 13:47:05 +05:30
Gavin D'souza
cff0567faf fix(print): Check doc permission before checking related info 2022-12-15 13:47:05 +05:30
Gavin D'souza
d3250f6504 refactor(whitelisted): Add typing hints to APIs
* Refactor type checks defined in APIs
* Remove dead/deprecated kwargs usages
* Added appropriate hints to APIs and consecutive utils defined in the following modules:
 - frappe.realtime
 - frappe.translate
 - frappe.utils.global_search
 - frappe.www.third_party_apps
 - frappe.www.search
 - frappe.www.printview
2022-12-15 13:47:05 +05:30
Sagar Vora
8cc504709b fix: only accept string values for key 2022-11-23 23:00:48 +05:30
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
Suraj Shetty
a4f2912fdf fix: Handle case where document title can be NONE
(cherry picked from commit 9b67fc24bc290789158f37a8f2ce10b505878792)
2022-06-13 06:16:56 +00:00
Suraj Shetty
121fb49fb5 refactor: Remove unnecessary code 2022-06-01 18:10:30 +05:30
Suraj Shetty
8f7d8bf1ff refactor: Update exception names 2022-06-01 17:59:19 +05:30
Suraj Shetty
f7db085db5 perf: Simplify code to avoid unnecessary DB calls 2022-06-01 17:56:46 +05:30
Suraj Shetty
af287a04a9 refactor: Remove unnecessary exception handling 2022-06-01 17:50:07 +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
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
af67849928 feat: Option to Print or download PDF in print view 2022-02-18 14:26:33 +05:30
Suraj Shetty
0388398133 Merge branch 'develop' of https://github.com/frappe/frappe into fix-document-signature 2022-02-17 10:49:55 +05:30
mergify[bot]
4d18546a9b
Merge pull request #15953 from resilient-tech/optimize-print
fix: pass `print_heading_template` directly in render args
2022-02-16 03:47:53 +00:00
Pruthvi Patel
97bab50a58 fix: pass print_heading_template as render args 2022-02-11 18:51:10 +05:30
Suraj Shetty
7b69497841 fix: Add setting "allow_older_web_view_links" in System Settings 2022-02-07 16:25:17 +05:30
Suraj Shetty
e0e12d43f1 Merge branch 'develop' of https://github.com/frappe/frappe into fix-document-signature 2022-02-07 13:26:57 +05:30
Suraj Shetty
b7f156f580 fix: Rename "Document Key" to "Document Share Key" 2022-02-07 13:25:39 +05:30
Saqib Ansari
b42cc400b9 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-02-01 15:08:57 +05:30
Suraj Shetty
4aab56edfc refactor: Permission validation for print view
- Show UI based on the status of the key/permission
- Respond with proper http_code according to the permission validation
2022-01-19 12:38:37 +05:30
Suraj Shetty
afeddbb96d fix: Document key expiry logic 2022-01-18 19:27:33 +05:30
Suraj Shetty
abaa2dc35e
style: Fix formatting issue 2022-01-18 11:57:38 +05:30
Suraj Shetty
f0ebd13c84 fix: Logic to show link expired message 2022-01-13 12:16:36 +05:30
Suraj Shetty
4ee99ce7e1 feat: Set expiry to document link 2022-01-13 11:45:45 +05:30
Suraj Shetty
499625a85f fix: Allow old signature as well 2021-12-27 23:45:21 +05:30
Don-Leopardo
c9ce941554 fix: Unused imports 2021-12-22 14:38:13 -03:00
Don-Leopardo
0b1821b10a fix: Module path for external print formats 2021-12-22 14:38:03 -03:00
Suraj Shetty
3c1db7881a fix: Maintain document signature in Document Key table 2021-12-21 15:43:10 +05:30
Saqib Ansari
ab9700d947 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2021-12-15 19:32:16 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
hrwx
1b3d202eb6 fix: do not modify doc for print formats 2021-08-06 11:31:08 +05:30
hrwx
d056beb0ef feat: show title links in Link Fields 2021-08-03 15:55:32 +05:30
Suraj Shetty
6960a19208 fix: RTL for print views 2021-06-28 12:03:31 +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
68e2dfa499 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-05-20 12:57:23 +05:30
Gavin D'souza
fc86458d3e fix: Increase timeout for window close
On mobile view, window.close would block rendering the print view.
Increasing the timeout to 10s from 1s helps

(cherry picked from commit b341167ffc37b1b93bdf1d712406c1d730746fd6)
2021-05-20 04:16:21 +00:00
Suraj Shetty
51a072bbf8 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-05-18 17:02:44 +05:30
Joseph Marie Alba
a13d208a28
fix: DeprecationWarning: invalid escape sequence \(
Python 3 interprets string literals as Unicode strings, and therefore \( is treated as an escaped Unicode character.

Declare RegEx pattern as a raw string instead by prepending r
2021-05-16 06:20:44 +08:00
Suraj Shetty
d961bda492 fix: Base template path 2021-04-29 12:43:58 +05:30
Shakirullah Waseeb
9bb0c85d3f
fix: added 'ps' to the right-to-left languages list (#12812)
* Added Pashto language to the rtl list.

Pashto (ps) writing is based on Arabic script, so it is a right to left language.  Therefore, added the "ps" to the rtl languages list in the following line of code.
is_rtl(lang=null) {
		return ["ar", "he", "fa", "ps"].includes(lang || frappe.boot.lang);
}

* fix: ps to rtl languages list in printview.py
2021-04-12 06:40:01 +00:00
prssanna
5bbc330c45 fix: printview context 2020-12-18 14:26:04 +05:30
Suraj Shetty
25dc9ee222 Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2020-12-11 13:02:36 +05:30
Saqib Ansari
3296097df6 feat: show absolute value in print format 2020-11-30 15:46:29 +05:30
prssanna
4719209312 fix: remove unused method 2020-11-05 11:28:05 +05:30