Commit graph

44526 commits

Author SHA1 Message Date
Hussain Nagaria
0b95e8fcc2 chore: get_year_ending to safe_exec 2023-12-17 15:35:55 +05:30
Hussain Nagaria
45c491228b docs: get_year_ending 2023-12-17 15:34:07 +05:30
Hussain Nagaria
10d34da769 docs: get_quarter_ending 2023-12-17 15:28:54 +05:30
Hussain Nagaria
20f99819d5 docs: typing overloads for get_year_start 2023-12-17 15:21:10 +05:30
Hussain Nagaria
3899c14b67 refactor: get_quarter_start returns current when dt is None 2023-12-17 14:54:59 +05:30
Hussain Nagaria
d0d78f65e9 docs: typing overloads for get_first_day_of_week/last_day_of_week 2023-12-17 14:48:45 +05:30
Hussain Nagaria
cdbe3555f6 fix: type hint 2023-12-17 14:43:30 +05:30
Hussain Nagaria
5e619db45a fix: words 2023-12-17 14:42:39 +05:30
Hussain Nagaria
3de84281a0 refactor: get_last_day_of_week supports as_str + docs 2023-12-17 14:41:47 +05:30
Hussain Nagaria
b42bcd5325 docs: get_first_day_of_week 2023-12-17 14:40:33 +05:30
Hussain Nagaria
73b7339163 doc: get_weekdays, get_weekday 2023-12-17 14:17:28 +05:30
Hussain Nagaria
6ffde4647b refactor: support str in get_weekday 2023-12-17 14:16:47 +05:30
Hussain Nagaria
d578c98b50 doc: get_datetime_str, get_date_str, get_time_str 2023-12-17 14:07:53 +05:30
Hussain Nagaria
b3d5db60fe docs: get_datetime_in_timezone and convert_utc_to_system_timezone 2023-12-17 13:17:05 +05:30
Hussain Nagaria
967755cb77 docs: nowtime 2023-12-17 12:52:09 +05:30
Hussain Nagaria
38fdf2d7cb docs: get_time 2023-12-17 12:47:39 +05:30
Hussain Nagaria
24c8b0fb6c docs: make_*_request utils 2023-12-17 11:59:27 +05:30
Hussain Nagaria
cf28fe2da4 fix: consistency 2023-12-17 00:29:48 +05:30
Hussain Nagaria
8156d24ec9 docs: get_abbr 2023-12-17 00:24:01 +05:30
Hussain Nagaria
ed36873af4 docs: get_system_timezone 2023-12-17 00:19:34 +05:30
Hussain Nagaria
d3cde6f743 chore: add type hints to get_eta 2023-12-17 00:17:18 +05:30
Hussain Nagaria
318e3a14e9 docs: today 2023-12-16 23:10:34 +05:30
Hussain Nagaria
a2fd4905b5 refactor(get_timestamp): return current timestamp if date is none 2023-12-16 23:08:09 +05:30
Hussain Nagaria
4992bdf937 docs: now_datetime, get_timestamp 2023-12-16 23:05:46 +05:30
Hussain Nagaria
23b7f4c4ff docs: time_diff_in_seconds and time_diff_in_hours 2023-12-16 22:57:40 +05:30
Hussain Nagaria
394af95c31 docs: month_diff and time_diff 2023-12-16 22:53:10 +05:30
Hussain Nagaria
9be9da49b3 fix: add missing type hints 2023-12-16 22:49:54 +05:30
Hussain Nagaria
d1131db2a7 docs: days diff + new days_diff util function 2023-12-16 22:48:25 +05:30
Hussain Nagaria
40b8956652 docs: add_days, add_months, add_years 2023-12-16 22:42:46 +05:30
Hussain Nagaria
015627464b docs: get_datetime and to_timedelta 2023-12-16 22:35:25 +05:30
Hussain Nagaria
d16683a699 docs: is_invalid_data_string 2023-12-16 22:21:44 +05:30
Hussain Nagaria
1a2d8fe78a docs: get_system_settings
* IMO this should be renamed to something like `get_from_system_settings`
2023-12-16 22:18:31 +05:30
Hussain Nagaria
51a03c52f1 docs: safe_exec get_hooks 2023-12-16 22:13:55 +05:30
Hussain Nagaria
49a4663228 docs: html2text 2023-12-16 16:49:35 +05:30
Hussain Nagaria
0fa0d1ff0e docs: frappe.bold 2023-12-16 16:48:11 +05:30
Hussain Nagaria
d5ccb51251 docs: frappe.as_json 2023-12-16 14:25:39 +05:30
Ankush Menat
3adc83e7c6
perf(migrate): update only affected users via role profile (#23821)
This is same as https://github.com/frappe/frappe/pull/23820 but for role
profile
2023-12-16 08:29:26 +00:00
Ankush Menat
c38e842646
perf(migrate): Only re-evaluate users which are potentially changed (#23820)
When roles are added in fixture `desk_access` always appears to be
"changed" because of how fixtures work.

This causes all users with the said role to be re-evaluated. This is
unnecessary computation because desk_access rarely changes in most apps.

Fix: See if role's desk access is same as user's desk access and don't
re-evalute them.

E.g. If role fixture without desk access is being migrated then it will
skip all users who are already website users. Likewise role with desk
access will skip all users who are already system users.
2023-12-16 08:18:46 +00:00
Ankush Menat
40e48c9ac4
feat: describe-database-table to get stats about a table (#23813)
* feat: `describe-database-table` to get stats about a table

This provides description of table, indexes, total row count in machine
parseable format.

Towards https://github.com/frappe/press/issues/1265

* Update test_commands.py
2023-12-15 17:53:11 +05:30
Ankush Menat
d39ecd3932
fix: Consider user and sender both for "system user" (#23806)
Email is "sender" which might not be linked with any user.
2023-12-15 12:51:29 +05:30
Shariq Ansari
254e22f5ab
Merge pull request #23804 from shariquerik/load-100-for-larger-screen
fix: load 100 records for larger screen
2023-12-15 12:36:06 +05:30
Shariq Ansari
2fa1120b0f fix: consider height istead of width 2023-12-15 11:45:14 +05:30
Shariq Ansari
87e0ccd555 fix: load 100 records for larger screen 2023-12-15 11:31:25 +05:30
Niraj Gautam
eb5448209e
fix(jinja): Update error message in validate_template function (#23783)
[skip ci]
2023-12-14 21:10:47 +05:30
Ankush Menat
b7c2989823
feat: add-database-index command to add and persist custom indexes (#23787) 2023-12-14 15:16:49 +00:00
Ankush Menat
687752359d
perf: Primary key is never nullable (#23788)
People ususally write queries like these...

```
frappe.get_all(doctype, {"name": ("in", list_of_docs))
```

Ocassionally, the `list_of_docs` is empty because it's dynamically
generated and in this case we end up doing full table scan to find... nothing!
2023-12-14 15:01:19 +00:00
Akhil Narang
cd7be151f7
fix(rq_job): resolve deprecation warning (#23784)
env/lib/python3.11/site-packages/rq/job.py:796: DeprecationWarning: job.exc_info is deprecated, use job.latest_result() instead.
warnings.warn("job.exc_info is deprecated, use job.latest_result() instead.", DeprecationWarning)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-14 15:22:26 +05:30
Gursheen Kaur Anand
9ec54feff9
fix: skip using frm object for routing to audit trail (#23603)
[skip ci[
2023-12-14 11:03:59 +05:30
Ankush Menat
174e24f159 fix: validate custom portal menu entries during sync 2023-12-13 17:55:05 +05:30
Ankush Menat
119a4bdbc1
fix: remove delay from numeric field selection (#23759) 2023-12-13 16:16:27 +05:30