Commit graph

760 commits

Author SHA1 Message Date
phot0n
18d48ddeb8 refactor: cleanup peprared result render and old logs cleanup
* 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
2022-11-29 13:46:11 +05:30
mergify[bot]
939d926b91
feat: Added Subscription Banner for remotely logging into FrappeCloud dashboard from site (backport #18263) (#18281)
* 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>
2022-10-03 16:41:12 +05:30
phot0n
f4378220bf chore: remove event_streaming hooks 2022-08-26 00:39:41 +05:30
hrwx
b01929405d refactor: translatable doctypes 2022-08-05 21:38:10 +01:00
phot0n
090d0321a8 chore: fix linter 2022-07-26 23:17:04 +05:30
phot0n
83fe747f75 chore: remove payment utils and hooks 2022-07-26 15:11:56 +05:30
phot0n
5738676b46 fix: use on_update hook instead of after_save and after_insert
after_save hook doesn;t exist so using that triggers nothing
2022-07-15 19:24:56 +05:30
Ankush Menat
3fdd89a737
refactor!: remove old weekly cleanup for route history (#17493)
This is now configurable with log settings.

This also fixes circular import issue that occurs when restoring backup
2022-07-13 11:02:56 +05:30
Ankush Menat
9a5d11234c
fix: validate scheduler, hook method names (#17400)
* 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
2022-07-04 19:29:16 +05:30
Ankush Menat
a7f9c2a672 chore: remove migrate 2022-06-16 14:10:01 +05:30
Ankush Menat
ef1200d94b fix!: dont auto set old logs as "seen"
Not sure why this is ever required, also not configurable.
2022-06-15 12:30:38 +05:30
Gavin D'souza
5ec2690160 Merge branch 'develop' into refactor-file 2022-06-01 15:47:55 +05:30
Ankush Menat
8a1889301a chore!: remove dead hooks app_icon & app_color 2022-05-10 14:41:01 +05:30
Ankush Menat
a245cb51a2
feat: configurable auto email reports limit (#16684)
- 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 🤦
2022-04-22 08:02:31 +00:00
Gavin D'souza
97e911e069 Merge branch 'develop' of github.com:frappe/frappe into refactor-file 2022-04-13 10:49:26 +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
Gavin D'souza
081d3081bc fix!: Remove "K.I.S.S. Bot" functionality
The feature has been removed from Core since it doesn't add any value to
the system, is unmaintained, partially developed and undocumented.
2022-03-30 11:33:40 +05:30
Gavin D'souza
47cf46cd49 Merge branch 'develop' of github.com:frappe/frappe into refactor-file 2022-03-24 21:38:21 +05:30
Gavin D'souza
654f744e63 fix(File): Misc fixes
* Move checks into common methods
* Refactor to use latest APIs
* Remove seemingly unnecessary code
* Fix previously undhanled use cases
2022-03-24 21:27:21 +05:30
Raffael Meyer
f80a16ed14
feat: add translated search doctypes to hooks (#16197)
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
2022-03-23 10:43:04 +00:00
Gavin D'souza
59e45a2e2f refactor: File APIs
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
2022-03-15 19:39:47 +05:30
Jannat Patel
12ae7b9239
fix: User Account Auto Deletion in Hours (#16135)
* fix: data-deletion-in-hours

* test: process_auto_request function

* fix: import and comment

* fix: patch for auto account deletion hours

Co-authored-by: gavin <gavin18d@gmail.com>
2022-03-07 10:38:25 +05:30
Jannat Patel
d0c570ae02 fix: function name and comment 2021-12-17 15:00:56 +05:30
Jannat Patel
e57d2d0aa2 fix: removed sla and added auto deletion 2021-12-15 19:36:36 +05:30
Jannat Patel
3caa93c2c4 chore: sla tracking 2021-12-07 11:14:11 +05:30
codescientist703
ed13182573 chore: Remove Chat Module 2021-11-09 13:44:57 +05:30
Suraj Shetty
31d5d81e31
revert: "chore: Remove chat module" (#14922) 2021-11-09 10:30:00 +05:30
codescientist703
f1893b1c7b chore: remove chat module references and settings 2021-10-11 15:29:31 +05:30
Gavin D'souza
5c6ffd2b2a chore: Misc updates
* Updated hooks content
* Remove unnecessary multiple=True flag that breaks on click8
2021-09-15 16:31:24 +05:30
ahmadRagheb
c280671a7a
fix(event streaming): Notify consumers on document cancel (#14160)
* 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>
2021-09-10 04:17:02 +00:00
Suraj Shetty
b690374afe fix: Trigger worklow action on update_after_submit event 2021-07-16 21:58:20 +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
Faris Ansari
f8ca990a83 Merge remote-tracking branch 'upstream/develop' into esbuild 2021-05-16 11:26:43 +05:30
Gavin D'souza
393696fa4a chore: Drop dead code
* Don't create task-logs folder during site creation
* Remove old unused async code for tracking tasks
2021-05-06 19:24:12 +05:30
Faris Ansari
9a00ce43ea fix: Support bundled asset for email css 2021-04-29 14:40:15 +05:30
Faris Ansari
dd69f1ab43 fix: Hash based file naming
- 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
2021-04-29 13:30:07 +05:30
Faris Ansari
2f10daf562 Merge remote-tracking branch 'upstream/develop' into esbuild 2021-04-24 16:43:06 +05:30
Faris Ansari
34c6d099b1 fix: Update all /assets urls with new urls 2021-04-24 16:24:08 +05:30
Faris Ansari
c119f9ab3c fix: libs.bundle.js
- Separate file to import jquery and bootstrap
- Remove separate jquery bundle from app as well as web
- Load jquery from node_modules
2021-04-24 14:42:43 +05:30
Faris Ansari
63771417a2 fix: style, script, assets_url jinja helpers
Jinja helpers to load js, css assets
2021-04-23 08:07:47 +05:30
Faris Ansari
3c824bb92f refactor: Use hooks to load email css files
Previously email.css files were explicitly picked from hardcoded path
like public/css/email.css for all apps
2021-04-22 07:01:36 +05:30
Faris Ansari
226ad1d91a feat: New Build System based on esbuild
- 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
2021-04-22 07:01:36 +05:30
Faris Ansari
a78fed4ffc fix: Move standard filters to jinja hooks 2021-04-17 16:11:28 +05:30
Faris Ansari
1fd08d3960 refactor: Jinja hooks
- 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
2021-04-17 16:11:28 +05:30
Rohit Waghchaure
112784e7ae feat: custom user type with doctypes 2021-04-01 13:54:11 +05:30
Suraj Shetty
cf2eacbb3a
fix: Remove list.min.css from hook (#12606) 2021-03-18 12:24:29 +05:30
Gavin D'souza
43d3a5b1fa chore: Boolean over Int for user_data_fields 2021-03-16 12:02:34 +05:30
Gavin D'souza
48c0160b6a Merge branch 'develop' of github.com:frappe/frappe into refactor-personal-data-deletion 2021-03-15 16:07:17 +05:30
leela
de210260a7 refactor: allow callable limit arg for ratelimit deco
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.
2021-03-09 13:59:49 +05:30
Gavin D'souza
b8f962fd8f fix: Use site domain for deleted user name
* Use strict option for Comment
2021-03-04 12:36:57 +05:30