Rushabh Mehta
087ee41ea1
feat(design): espresso style sidebar
2024-08-23 22:15:33 +05:30
Ankush Menat
63a13d0aff
fix: Skip letter heads if no permission ( #26689 )
2024-06-05 15:56:56 +00:00
barredterra
bb7e1eb4ec
fix: apply user permissions on letter head
2024-05-24 16:03:15 +02:00
Ankush Menat
445e1dbd6b
perf: num2words, babel, gettext, sentry imports ( #26475 )
...
num2words - 260KB - Used frequently on ERPNext sites.
babel - 1.1MB Gets imported because of dates, localization
sentry - 2.8MB should be loaded only if envvar is set
gettext - required for reading translations
2024-05-18 07:20:41 +00:00
Ankush Menat
a234e79790
refactor: misc changes
...
- Move sys setting check to server side
- tomli import handling
2024-05-04 15:08:34 +05:30
Ankush Menat
5ca14bb171
feat: FC specific update notifications
2024-05-04 15:08:34 +05:30
Ankush Menat
330a1b2044
fix: update notifier never running
2024-05-04 12:28:19 +05:30
Ankush Menat
3e64e60389
chore!: drop sid from boot ( #26299 )
2024-05-02 10:10:34 +00:00
Akhil Narang
26012aceb5
fix: allow accessing reports without roles
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-05-02 14:20:12 +05:30
Ankush Menat
6873eab7b4
refactor: move to boot
...
- Remove API call
- Remove notification setting, don't think we need this
2024-04-08 18:40:03 +05:30
Akhil Narang
886d4ffc25
refactor(boot): frappe.cache() -> frappe.cache
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-19 14:28:35 +05:30
Ankush Menat
de9ac89748
style: re-format with ruff
2024-02-05 18:53:33 +05:30
Ankush Menat
447f02e8d3
fix!: Remove misleading "raise_exception" ( #24266 )
...
frappe.permission.has_permission won't accept raise_exception anymore,
it was extremely misleading argument and actual purpose of the argument
was to print perm check logs.
2024-01-11 08:24:18 +00:00
Rushabh Mehta
eb0e8262a7
fix(minor): Don't load user_info for Administrator twice. fixes #22211 ( #24160 )
2024-01-08 12:51:32 +05:30
Ankush Menat
28d05c41c3
fix: correct max file size in boot
2023-11-22 10:55:52 +05:30
Ankush Menat
018ed845bd
refactor: defer unnecessary json-dumping of messages
...
Also avoid accessing locals where interface is present like for popping last message.
2023-10-16 18:13:50 +05:30
Ankush Menat
4fe0a21d6b
chore: limit markteplace search to prod sites
2023-09-02 16:00:17 +05:30
Rutwik Hiwalkar
3393e6d1c5
feat: search frappecloud marketplace apps from awesomebar ( #22185 )
...
* 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>
2023-09-02 15:57:34 +05:30
Ankush Menat
8a37d6d278
perf: reduce memory usage of background processes ( #21467 )
...
* perf: defer translation.py imports
This indirectly imports babel which isn't really required most of the
time.
* perf: defer gzip import
* perf: move validate_and_sanitize_search_inputs
This causes all sorts of indirect imports and increases memory usage
* perf: defer requests module imports
* perf: defer system settings import
* perf: defer LOG_DOCTYPES import
Causes many indirect imports
* perf: defer update_site_config
* perf: defer notifications import
* perf: remove unused import
* perf: defer safe exec import
* test: memory usage overhead
2023-06-23 12:51:45 +05:30
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache ( #21282 )
2023-06-08 11:47:17 +05:30
Ankush Menat
81c103a741
refactor: remove form tour settings
2023-05-25 15:04:38 +05:30
Maharshi Patel
f612d84247
fix: change onboarding_status fieldtype
...
change onboarding_status to small text and handle null cases.
2023-05-24 15:42:16 +05:30
Maharshi Patel
05b1793fcd
fix: load onboarding_tours async
...
loads onboarding_tours if enable_onboarding is checked and form tours are available for user.
2023-05-23 12:42:12 +05:30
Maharshi Patel
10628b9b06
feat: add onboarding and status on boot
...
Add List of all onboarding tours to frappe.boot and onboarding status on frappe.boot.user
2023-05-18 02:33:40 +05:30
Ankush Menat
c5f36a4979
fix(UX): workspace breadcrumbs based on history ( #20529 )
...
* 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
2023-04-12 10:56:05 +05:30
barredterra
b2e36634d6
refactor: rename get_time_zone to get_system_timezone
2023-03-04 19:30:03 +01:00
Ankush Menat
0219eab820
fix: Dont fetch report if not permitted
2023-02-20 18:19:12 +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
Ankush Menat
6dcf12d509
fix: Apply permissions on Report sidebar
...
Alternate to https://github.com/frappe/frappe/pull/19588
Co-Authored-By: marination <maricadsouza221197@gmail.com>
2023-02-03 18:07:21 +05:30
Ankush Menat
75d092ef7d
Revert "fix: Report sidebar must consider Permission Query" ( #19921 )
2023-02-03 15:13:18 +05:30
Ankush Menat
13162d8fbd
fix: Only apply perm query to non-admin users
2023-01-30 11:24:16 +05:30
Gavin D'souza
81d6b282a3
chore: Remove errprint triggered by passing Query object to db.sql
2023-01-24 11:26:31 +05:30
marination
f6a68062d9
chore: Add comments to avoid incompatible queries with _run_with_permission_query
2023-01-16 19:15:16 +05:30
marination
8bd1b7b019
fix: Remove unnecessary get_sql
2023-01-16 17:09:21 +05:30
marination
2702bf60aa
refactor: Use Query instead of MySQLQueryBuilder
...
- 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>
2023-01-16 16:51:11 +05:30
marination
0ba158979d
fix: Make run_with_permission_query private (not a general util)
...
- Also switch query and doctype parameter positions in `_run_with_permission_query`
2023-01-13 21:30:54 +05:30
marination
c41b5e9511
fix: Report sidebar must consider Permission Query
...
- 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>
2023-01-13 21:23:47 +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
Ankush Menat
2eec621e95
chore: db.get_all -> get_all
...
Reduces 1 pointless function call.
Function calls are also not "super cheap" in python.
2022-08-22 11:35:14 +05:30
hrwx
db2e898397
chore: linter fixes
2022-08-06 10:52:59 +01:00
hrwx
b01929405d
refactor: translatable doctypes
2022-08-05 21:38:10 +01:00
Ankush Menat
ec8f20c097
fix: send all messages on boot instead of scanning
...
close https://github.com/frappe/frappe/issues/17684
2022-08-04 15:33:03 +05:30
Sagar Vora
6102c1be4e
chore: remove obsolete whitelisting from get_link_title_doctypes ( #17664 )
2022-07-29 12:03:06 +05:30
Suraj Shetty
6bbd8fcb32
fix: Filter notes with notify_on_login and not notify_on_every_login
2022-07-20 13:16:51 +05:30
Suraj Shetty
d5bf9b60e0
fix: Query for unseen notification
2022-07-20 10:36:40 +05:30
Ankush Menat
bea2df6dcc
perf: drop country_info from boot ( #17431 )
...
* fix: unknown function call
* perf: drop country_info from boot
This is ~50kb of data that is sent with every boot.
2022-07-07 14:41:13 +05:30
Ankush Menat
b5128a35fd
refactor: simplify fetching of readable records ( #17417 )
...
- remove encoding, use cstr directly
- remove falsy values by default None, empty string.
2022-07-07 14:40:59 +05:30
Ankush Menat
faf0d15c51
refactor: load country and currency info in boot
...
Previously this was done in ERPNext but all currency formatting
functionality depends on this, hence moved to framework. Largely
rewritten from scratch.
2022-07-04 20:29:38 +05:30
gavin
e92ead1257
refactor: Re-write queries using SubQuery
2022-05-27 17:32:37 +05:30
Himanshu
70409a3c7b
fix: set translated text to link field ( #15451 )
...
- Fixes [Issue/15324](https://github.com/frappe/frappe/issues/15324 )
- When selecting a value for Link Field, the English text was set as link field value.
- This PR aims to fix it by setting the translated text as link field value on selection.
Todo:
- [x] Show translated text in the select dropdown
- [x] Set translated value to Link field on select
- [x] Show original value when link field is in focus
- [x] Add option to toggle this behaviour
### Behaviour
- Link field loses focus: show the translated name.
- Link field is focused
- If old value is present
- If options **are** one of [Role, DocType]: show the translated name
- Else: show the name (untranslated) to enable search in untranslated values
- Else: show what the user typed (untranslated) to enable search in untranslated values
- Value is selected: link field loses focus
## Demo
### Link to UOM in a custom Item DocType
The UOM names are in english, so the search needs to happen in english. When possible, the translation is displayed.
#### Before
https://user-images.githubusercontent.com/14891507/156415248-e5e80d05-53dc-4ca8-89c7-998986ff6e99.mov
#### After
https://user-images.githubusercontent.com/14891507/156410386-a874430c-f340-43ed-9c3a-92e8d4d50fc9.mov
### Link to DocType in Customize Form
The DocType names get translated before being searched. This is a preexisting hack in the framework for DocType and Role. In this case, we can search in the translations.
#### Before
https://user-images.githubusercontent.com/14891507/156414648-8e505f8c-9dee-4358-8182-3b358c28bb62.mov
#### After
https://user-images.githubusercontent.com/14891507/156411881-c4ca22e1-1397-4e13-9768-5e16b72f8d6d.mov
https://docs.erpnext.com/docs/v13/user/manual/en/customize-erpnext/customize-form/edit?wiki_page_patch=fdafee2715
2022-05-16 13:21:42 +00:00