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
Ritwik Puri
27a2689678
fix: slug doctype when building url to report with filters ( #19581 )
2023-01-12 23:36:46 +05:30
Anand Baburajan
bc0abd9cfd
feat(util): add is_last_day_of_the_month ( #18835 )
...
* feat: add is_last_day_of_the_month
2022-11-10 15:18:49 +05:30
Ankush Menat
9c84d078fa
fix: remove mariadb specific comments from column
...
MariaDB has additional syntax for comments which are like python.
2022-09-26 11:09:39 +05:30
Shariq Ansari
5cfcc4a075
fix: Chart date format on x-axis is inaccurate ( #18191 )
2022-09-21 16:20:44 +05:30
Ankush Menat
9f31723555
refactor: directly map function over lambda call
2022-08-16 10:53:28 +05:30
Ankush Menat
53af10a064
refactor!: python pretty_date consistent with JS
...
Python pretty date was ceiling month and week instead of flooring them,
this is incorrect AND inconsistent with popular JS library pretty date
that we use on client side
2022-08-16 10:53:28 +05:30
Ankush Menat
9de31d03c1
refactor!: timespan utils consistent output
...
BREAKING CHANGE:
- `get_year_ending` returns datetime.date instead of str
- `get_timespan_date_range` will always return datetime.date ranges
2022-08-16 10:53:28 +05:30
Ankush Menat
a88819230a
refactor: convert get_timespan_date_range to use match
2022-08-16 10:53:28 +05:30
Shariq Ansari
c478673367
fix: allow to import time field ( #17677 )
2022-08-01 14:50:40 +05:30
Shariq Ansari
a50e0ffa08
refactor: Webform ( #17232 )
2022-07-19 15:52:15 +05:30
Ankush Menat
29c855b028
fix: db.get_value -> db.get_single_value ( #17531 )
...
db.get_value for singles returns string type always, this is confusing
behaviour, db.get_single_value should be used instead.
semgrep rule: https://github.com/frappe/semgrep-rules/pull/16
2022-07-18 15:10:49 +05:30
Suraj Shetty
34b1ea57f9
fix: Show "Queued" status on newsletter
...
Show "Queued" status on newsletter if emails are queued and "email sending" is not yet started.
2022-07-12 13:03:06 +05:30
Suraj Shetty
d4166dbe20
refactor: Replace html2text with markdownify
2022-07-06 08:23:14 +05:30
Ankush Menat
261fbfcd11
Revert "fix(doc)!: Always cast datetime, date and time fields"
...
Revert "fix(doc)!: Always cast datetime, date and time fields (#15891 )"
This reverts commit d7789ab6ff .
2022-07-05 13:43:32 +05:30
Himanshu
d7789ab6ff
fix(doc)!: Always cast datetime, date and time fields ( #15891 )
...
### BREAKING CHANGE
#### Datetime, Date and Time fields will always be cast to respective objects in `setattr`, this will ensure uniformity while accessing the values, no more `getdate`, `get_datetime`, `to_timedelta` wrapper.
- While importing data, the framework does check for `set_only_once`.
- In normal case scenarios, this will work flawlessly since most date fields might not be set_only_once.
- But in Subscription, the date field is set to `set_only_once` and in `after_insert`, `document.save` is called, and while doing so, `set_only_once` is checked [here](1944a547f9/frappe/model/document.py (L566) ).
-This works fine if the data imported is in the correct format.
- If the date's data is not in the correct format, the framework throws an error.
- for eg `06-02-2022 00:00:00 != 06-02-2022`
- fixes [Issue/#15370](https://github.com/frappe/frappe/issues/15370 )
> no-docs
2022-07-05 07:07:16 +00:00
Ankush Menat
054ad9c30c
feat: Allow showing currency symbol to the right
2022-07-05 11:21:23 +05:30
Ankush Menat
4e6ea5b554
fix: handle None as amount in fmt_money ( #17395 )
2022-07-04 16:27:57 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features ( #17367 )
...
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Ankush Menat
aad7ebc938
fix: extra notification triggered on value change ( #17364 )
...
Since value in DB and value on object can be in different type the
notification gets triggered unnecessarily
e.g. data(2012, 10, 10) != "2012-10-10"
2022-06-30 20:25:29 +05:30
Ankush Menat
d35d7ffbe2
fix: remove bare exception catching
...
A bare except catches lots of things (like generator iteration end) and should never be used.
2022-06-28 18:05:00 +05:30
Gavin D'souza
fc422f4a97
chore(deps): Bump Pillow from 9.0.1 to 9.1.1
...
Includes security fixes, API & constants deprecations
Changelog: https://pillow.readthedocs.io/en/stable/releasenotes/index.html
2022-06-10 13:12:35 +05:30
Gavin D'souza
b696fa6da5
perf: Pre-compile and re-use regexp pattern
...
Converted all possible usages of re.* that weren't compiling the regex
separately and re-using it. Separated out the compiled patterns as
global variables. Repetitive patterns could be made DRY-er.
Would be nicer to have all regexes in a single module so that we could
re-use better, keep track of outdated, and keep checks for possible
reDos' etc
2022-06-08 14:07:38 +05:30
Gavin D'souza
5ec2690160
Merge branch 'develop' into refactor-file
2022-06-01 15:47:55 +05:30
Shariq Ansari
8f245be460
fix: Strip all spacing characters from Message-ID & In-Reply-To ( #16999 )
2022-05-27 21:06:07 +05:30
gavin
7c77bedbf2
refactor: Simplify logic + Add typing hints
2022-05-18 16:57:54 +05:30
Ankush Menat
8c02971224
chore: misleading typehint
...
[skip ci]
2022-05-12 11:30:05 +05:30
Ankush Menat
c55c8e4f97
refactor(DX): add type hints for some utilities ( #16871 )
...
- Added type hints to majority of most used functions in `utils/data.py`
- added overloads for functions whose output depends on input type. This helps A LOT if your LSP supports type narrowing (like pyright)
Example:
Same function with 3 diff singatures narrowed by input value.
<img width="1270" alt="Screenshot 2022-05-10 at 8 02 02 PM" src="https://user-images.githubusercontent.com/9079960/167653595-2ab9441f-da40-4645-aa87-9ec0d96cbec9.png ">
2022-05-11 06:14: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