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
* feat: set image as footer in letter head
* fix: do not hide footer section
* fix: hide footer source
* style: black
* fix: reduce code for setting image as html
* fix: Force system admin role only if active
* fix(ui): tab refresh was not implemented
* fix(minor): Onboarding: add option to view list view in create action
* fix(minor): js lint
* fix: allow All to select a User
* test: user permissions affecting User
* refactor: filter_dynamic_link_doctypes API
* Added typing, better variable naming
* Remove unnecessary re-iterations
* Optimize queries and membership processing
* perf: Check query type via is_query_type
* chore: Drop duplicate get_frontmatter definition
* perf: Login Page
Improves performance 3x - from 0.047s to 0.017s
* Use frappe.get_*_settings to query table once
* Use cached LDAP Settings' document via get_ldap_client_settings
* Use single get_all to query all Social Login providers and related
data
* Skip provider if client_secret doesn't exist
* perf: About Us Settings
Use cached document for building /about page
* perf: App Page
Reduced time taken for get_context to execute from 0.035s to 0.02s (75%
reduction)
* perf: Patch qb only once - not on every init
* perf: Fetch and cache entire settings' dicts
* refactor!: frappe.db.get_singles_dict
* Cast single's values as their fieldtypes before returning
* Support previously dead debug parameter
* Consider single with no meta as non-existent; skip query
Decided to go ahead with the breaking change given the nature of the
existing usages of get_singles_dict :crie:
* ci: Run tests bypassing roulette with labels "Run UI Tests", "Run Server Tests"
* test: Scheduler tests cleanup
* chore: linter changes
* chore: linter changes
* chore: linter changes
* fix: set HTML as default
to keep existing formats working
* refactor: no **kwargs
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Rushabh Mehta <rmehta@gmail.com>
Co-authored-by: Gavin D'souza <gavin18d@gmail.com>
- standard field templates for rendering custom templates for fields for e.g., taxes in invoice
- ability to create user defined reusable templates that show up in print format builder
- Letterhead editing
- Edit Header and Footer
- Margin Text
- PrintFormatGenerator class handles generation of HTML and PDF and repeating of Header/Footer
- Simplify /printpreview
- Separate renderer files for each fieldtype
Currently system managers can only customize the print formats even though
the other roles has a permissions to do so. Fixed it to show
customize button based on permissions.
(cherry picked from commit f9486fce5fb24402fce31e3d36370120c4524a9b)
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.
* 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