Commit graph

406 commits

Author SHA1 Message Date
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
barredterra
c35476256f refactor: simplify conditional logic
Command: `sourcery review --fix --enable de-morgan .`
2023-12-05 11:14:41 +01:00
Ankush Menat
f526054ae2
refactor: Remove usage of utcnow (#23369) 2023-11-23 13:21:27 +05:30
Bernd Oliver Sünderhauf
67376e26d4
fix: Set system timezone for Administrator and Guest users. (#22440)
* fix: Set system timezone for Administrator and Guest users.

* refactor: use constant instead of duplicating

[skip ci]

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-20 15:26:00 +05:30
0xsaif
aa7ee1c6b9
refactor: force ipv4 localhost (#22394)
* reafctor: force ipv4 localhost

Replacing "localhost" with "127.0.0.1" in the codebase; sometimes the name localhost force-resolves to ipv6

* revert: leave localhost usage in oauth tests

Change not required.

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-13 16:23:23 +05:30
Ankush Menat
7a5a0c27a2 fix: Support SQL like LIKE filter
Other changes:
- Ignore empty doctype in filter creator
- Simplified recorder filter evals
2023-08-11 21:24:38 +05:30
Gursheen Anand
b019a1163c feat: implement like & not like in compare util 2023-08-11 15:34:07 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
barredterra
b553ed98d8 refactor: inline immediately returned variable
Inline a variable to a return in the case when the
variable being declared is immediately returned
2023-08-08 18:09:49 +02:00
Abdo
35c929afdb
refactor(money in words): translatable currency Name (#21672) 2023-07-27 17:21:57 +05:30
Ankush Menat
af03b76c88 perf: Preload and share common python modules 2023-06-24 21:24:02 +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
Smit Vora
db6a06d204
fix: make sure number is not zero for bankers_rounding (#21431)
* fix: make sure num is not zero for bankers_rounding

* test: rounding near zero

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-20 12:00:22 +05:30
Ankush Menat
3005e66e45 refactor!: Drop previously deprecated code 2023-06-13 16:00:43 +05:30
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache (#21282) 2023-06-08 11:47:17 +05:30
Ankush Menat
3df13ca392 feat: new operator - descendants of (inclusive)
Co-Authored-By: Faris Ansari <netchamp.faris@gmail.com>
2023-05-29 16:59:57 +05:30
barredterra
fcb705b41d chore: docstring for pretty_date 2023-04-11 15:50:17 +02:00
barredterra
9f1feaab02 refactor: pretty_date 2023-04-11 15:44:03 +02:00
Bread Genie
6248d8f062
fix(pretty-date): plural form when the value is 1 (#20619) 2023-04-11 10:56:52 +05:30
Suraj Shetty
ed7d6931ca fix: Update code to update links with campaign and medium 2023-03-20 23:42:50 +05:30
Ankush Menat
dd2ac72a9a fix: skip 0 for rounding 2023-03-13 14:16:39 +05:30
Ankush Menat
139d4a87b4 fix: corrected banker's rounding
closes https://github.com/frappe/frappe/issues/19570
2023-03-13 12:30:48 +05:30
Ankush Menat
97ca92e3d1
refactor: change rounding method names (#20299)
These are easy to understand.

Added third method for corrected banker's rounding.
2023-03-10 14:57:15 +05:30
Ankush Menat
9f6a6d74fb refactor: split rounding methods in functions 2023-03-08 14:09:50 +05:30
Ankush Menat
86b9ff4266 feat: Allow specifying rounding method in flt 2023-03-08 10:59:02 +05:30
Ankush Menat
48f63f53ab feat: configurable rounding methods 2023-03-08 10:44:44 +05:30
Raffael Meyer
036e1c94cd
feat!: remove deprecated timezone utils (#20255) 2023-03-06 19:56:57 +05:30
barredterra
c2c5449947 chore: deprecate timezone utils in v15 2023-03-05 15:58:13 +01:00
barredterra
b2e36634d6 refactor: rename get_time_zone to get_system_timezone 2023-03-04 19:30:03 +01:00
barredterra
3694e654a1 refactor: rename convert_utc_to_user_timezone to convert_utc_to_system_timezone 2023-03-04 19:02:25 +01:00
Suraj Shetty
1daa78d0a0
Merge pull request #20179 from surajshetty3416/newsletter-analytics 2023-02-28 19:42:56 +05:30
Ritwik Puri
e7f28b08c9
fix: cast primary value in compare util if fieldtype is present (#20092)
* fix: cast primary value in compare util if fieldtype is present

* test: add test for date & datetime filters when using evaluate_filters
2023-02-28 16:50:52 +05:30
Suraj Shetty
6c8f88b8cd refactor: Remove UTM references just set source in web page view to simplify things 2023-02-28 14:17:16 +05:30
Suraj Shetty
afd55a97fb fix: Web page view creation
- Set path from backend via "Referer" to avoid bad data
- Add visitor_id to improve unique visit detection
2023-02-28 14:15:41 +05:30
Suraj Shetty
7d5c98c206 feat: Add UTM tracking parameters to internal links in newsletters
- Also, extend web page view to store UTM tracking data.
2023-02-23 16:19:07 +05:30
Suraj Shetty
b397ec3858 feat: Track count of views on newsletter emails 2023-02-23 13:45:53 +05:30
Gavin D'souza
d357af1533 refactor: Add a maxsplit limit to string splits 2023-01-24 19:22:51 +05:30
Ankush Menat
e31db5d502
fix: handle tel: links in emails (#19635) 2023-01-17 20:31:06 +05:30