Commit graph

783 commits

Author SHA1 Message Date
Ankush Menat
af3213a445
fix: offset log cleanup to avoid deadlocks (#21105)
- Email queue is cleared at midnight
- Another worker at same time might be email Email

This causes random failures almost daily
2023-05-24 18:13:16 +05:30
Suraj Shetty
bd737d3616
Merge branch 'develop' into fix-note-2 2023-05-16 07:53:15 +05:30
Shadrak Gurupnor
d9b2d23ec3
feat: track skipped patch with traceback (#20931)
* feat: track skipped patch with traceback

* fix: dump all the patches in patch log

* fix: check non-skipped patches

* fix: print traceback if failed && reload patch_log before migrate

* chore: dont force patch log reload

* chore: remove unnecessary checks

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-05-10 18:44:40 +05:30
Ankush Menat
87a88195ec feat: telemetry using posthog 2023-04-25 10:33:28 +05:30
barredterra
bc287ab857 feat: permission query for Note 2023-04-24 16:18:38 +02:00
barredterra
150d677a28 Merge remote-tracking branch 'upstream/develop' into fix-note-2 2023-04-24 15:55:02 +02:00
Maharshi Patel
1bae6a2b0b
feat: hooks added for print formats / pdf. (#20734) 2023-04-17 19:03:53 +05:30
Suraj Shetty
3028918f98
Merge branch 'develop' into fix-note-2 2023-04-17 13:19:48 +05:30
Ritwik Puri
ac351166b2
fix: pull from email account every 10 mins instead of 4 mins (by default) (#20675) 2023-04-13 12:36:14 +05:30
Raffael Meyer
b84ab9de87
Merge branch 'develop' into fix-note-2 2023-02-24 12:13:58 +01:00
Ankush Menat
34beb65009
fix: link webhook logs with webhook document (#20155) 2023-02-24 16:30:29 +05:30
Ankush Menat
e7f604ef48 refactor: rename DocReminder -> Reminder 2023-02-24 13:47:58 +05:30
Ankush Menat
73cd823a0a feat: Document Reminders
There is `Notification` doctype but it doesn't work so well for small
one-off reminders. Imagine these scenarios:

1. Remind me to follow up on this lead in 5 days.
2. Remind me to revoke temporary access I am giving to this user.

For such scenarios, I am proposing a simple reminder system built into
framework. All it does is:

1. For any document you can set a reminder with time and message.
2. When time comes you'll get a system notification with message and
   link to the document.

Permissions:
1. Users can only see their own set reminders.
2023-02-24 12:40:54 +05:30
Raffael Meyer
97dde45067
Merge branch 'develop' into fix-note-2 2023-02-17 11:04:26 +01:00
Gavin D'souza
fe26c542b7 refactor: Move before/after tasks as hooks
Moved before/after tasks in Requests as hooks for:
- monitor
- rate_limiter
- recorder

Moved before/after tasks in Jobs as hooks for:
- monitor
- releasing document locks
2023-02-15 15:30:02 +05:30
Rutwik Hiwalkar
e9c57ee76e
revert: subscription management (#19998)
* chore: add namespaced subscription conf to boot info

* revert: https://github.com/frappe/frappe/pull/18263

* clean: remove daily hook for creating manage subscription btn
2023-02-14 12:04:28 +05:30
barredterra
df2b1ff456 Merge remote-tracking branch 'upstream/develop' into fix-note-2 2023-01-17 19:19:12 +01:00
Ankush Menat
3e715985c6
fix: ignore unhandled emails while deleting email account (#19534)
[skip ci]
2023-01-09 16:53:23 +05:30
gavin
c26b401140
chore: Remove duplicated Oauth2 whitelisted APIs (#19465)
Maintain routes via the `override_whitelisted_methods` hook
2023-01-05 11:46:53 +05:30
barredterra
fdafce9b63 fix: only System Manager can work with public Notes 2022-12-20 14:44:05 +01:00
Daizy Modi
d88ef967b9
feat: hook ignore_links_on_delete to skip doctypes on delete (#19347)
* feat: hook `ignore_links_on_delete` to skip doctypes on delete

* fix: helper comment

* fix: helper comment

* test: test case for `ignore_links_on_delete`

* test: fix test case
2022-12-20 11:17:28 +05:30
Ankush Menat
170b7c9b0f chore: correct devel version 2022-12-13 14:20:55 +05:30
Ankush Menat
a90fc27c75
refactor!: Remove activity feed (#19241) 2022-12-12 15:29:32 +05:30
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