* directly fetch columns from result file rather than storing it in db
* remove prepared report settings from system settings
* remove disable_prepared_report from report doctype
* feat: Added Subscription Banner for remotely logging into FrappeCloud dashboard from site (#18263)
* feat: added Subscription Banner and Manage Subscription button
* feat[patch]: added a patch for adding `Manage Subscription` button in
navbar_settings
* chore: removed console ;)
* refactor: make the `Manage Subscription` navbar item optional
* keep it hidden by default, only show when the site configs are present
* style: prettier, isort and stuff
* chore: handling null responses, translation and refactored patch
* fix: correct index reset
* perf: reduce network/db calls
If not sys manager then why make a request?
* fix: removed network call and added subscription_expiry to boot process
* chore: added enable_manage_susbcriptions as daily background job and refactored patch
* chore: added hook to hooks.py
* this looks clean enough, also don't have insert for child tables ;)
Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 68f315d372cc8c6e41f2aabda61eba0d42dcf6e4)
# Conflicts:
# frappe/patches.txt
* chore: conflicts
* style: format
[skip ci]
Co-authored-by: Rutwik Hiwalkar <50401596+rutwikhdev@users.noreply.github.com>
* chore: warn about missing scheduler / doc events
* fix: pass list instead of filter
filter can only be iterated upon once
* refactor: many typehints in __init__.py
- The previous limit was 3 per user which is way too less, no known reason to
restrict this other than hogging of system with too many reports. Bumped
default limit to 20.
- site config is not easily discoverable or editable, added config in
system settings.
- Moved auto email report background job form daily queue to `daily_long` queue.
closes https://github.com/frappe/frappe/issues/16681
<img width="1049" alt="Screenshot 2022-04-20 at 12 33 06 PM" src="https://user-images.githubusercontent.com/9079960/164170117-5612d9df-da91-441b-a4f6-acd89d30336e.png">
`no-docs` (error message is sufficient to explain to user what to do without referring docs)
ref:
ISS-21-22-10245
ISS-21-22-07742
ISS-20-21-10850
ISS-20-21-10112
and many more times. This is such a stupid validation 🤦
In `search.py` it was hardcoded that **DocType** and **Role** get translated before matching against the search text. This way, a user can type in his local language and still see correct results.
This feature is useful for other DocTypes as well. The criterion would be: there is a small, fairly static number of records, so that the performance impact of translating all names first is not too bad.
This PR adds a hook `translated_search_doctypes` that determines which DocType names get translated before search.
I also added **Country** to `translated_search_doctypes` for frappe. The link to **Country** is frequently used in **Address**, but until now there was no way to use it in the local language. There are ~70% less Countries than DocTypes (including ERPNext), so the performance should be fine.
ERPNext could, for example, add the **Gender** DocType to this hook. As there are very few genders, translating them is fast and improves the UX.
Docs: https://frappeframework.com/docs/v13/user/en/python-api/hooks/edit?wiki_page_patch=b4d7c8d6fc
Restructured and moved most APIs under frappe.core.api.file namespace.
Changed some obvious security gaps (like using get_list instead of
get_all for an endpoint), styled, added type hints and made minor performance
enhancements.
Changes
* download_file API
* Move API to handler.py
* Check for permissions via File.is_downloadable instead
* Moved APIs to new namespace: `frappe.core.api.file`
* Backwards compatibility
* Added APIs to override_whitelisted_methods to maintain existing
client endpoints
* Imported APIs to controller's namespace to avoid breaking external
app usages
* event streaming not working on cancel
fix for https://github.com/frappe/frappe/issues/14141
event streaming not working on cancel
* style: Remove extra line
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
* 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
- For better HTTP caching and cache busting
- assets.json is created under [app]/dist folder which contains the map
of input file and output file name, this is used to get the correct path for
bundled assets
- Deprecate use of build.json
- *.bundle.js files placed anywhere in the public folder are bundled
- Built files are created in public/build folder which is gitignored
WIP
- Rename hook from "jenv" to "jinja"
- You can now pass the path to the module and all of the methods in that
module will be added as methods
- You can also pass module path of a method
BREAKING CHANGE: Previous use of "jenv" hook won't work anymore
As we make all configurations editable through dashboard(ex: password_reset_limit), it makes sense
to provide limit as a callable so that it can be accessed dynamically.