* chore: remove unused import
* feat: search frappecloud marketplace apps from awesomebar
* chore: cache results and add tracking url
* refactor: get_marketplace_apps
- use generator for setting cache
- drop expiry. No need to keep this updated as of now. Site updates and
ram usage anyways drops cache.
- Timeout if not able to respond
- Rank results lower than everything else
* chore: update request url
* fix: avoid excessive retries
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix(UX): Resolve breadcrumb conflicts from history
Same report can be part of 2 workspace, in which case use breadcrumbs
from last workspace.
* fix: make sure last workspace belongs to same module at least
- Use `Query` from database/utils which will consider postgres query type as well
- Reduce LOC where unnecessary
Co-authored-by: Gavin D'souza <gavin18d@gmail.com>
- On boot cache permissible reports, filter out reports blocked by Permission Query
- Sidebar report selector uses boot cache to get allowed reports, which now respects Permission Query
- Convert qb query to str and append permission query and then execute
Co-authored-by: Gavin D'souza <gavin18d@gmail.com>
* 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>
Previously this was done in ERPNext but all currency formatting
functionality depends on this, hence moved to framework. Largely
rewritten from scratch.
# Changes
- Introduces `subqry` class to use in where clause when there is a non-column condition. eg.
> .where(subqry(no_of_roles) == 0)
- Convert SQL queries to frappe.qb
# Testing
Functions with query refactors
- frappe.boot.get_user_pages_or_reports() -> Same output of `get_bootinfo()` as develop
- frappe.boot.get_unseen_notes() -> Forms the same query as develop
```sql
SELECT `name`,`title`,`content`,`notify_on_every_login`
FROM `tabNote` WHERE `notify_on_every_login`=1
AND `expire_notification_on`>'2022-03-30 01:10:53.393874'
AND (SELECT `nsb`.`user` FROM `tabNote Seen By` `nsb` WHERE `nsb`.`parent`=`tabNote`.`name`) NOT IN ('Administrator')
```
- frappe.installer._delete_doctypes() -> installed and uninsalled a dummy app to drop tables
### Not tested
- frappe.make_property_setter()
- frappe.realtime.get_pending_tasks_for_doc() [whitelist method]
- frappe.sessions.Session.start()
- frappe.twofactor.cache_2fa_data()