Commit graph

1290 commits

Author SHA1 Message Date
Ankush Menat
95f67b8de8
fix: ignore empty part in naming series (#17508)
on v13 doc.get("") returns entire doc dictionary, this gets strigified
and becomes a problem for naming.
2022-07-14 13:14:58 +05:30
Ankush Menat
0164a87ac9
Merge pull request #17350 from Aradhya-Tripathi/get-all-mod
feat: Adding support to Query engine
2022-07-13 18:36:04 +05:30
Aradhya
64463791a1 feat: Added support for multiple functions in string fields & fixed aliasing 2022-07-12 22:07:11 +05:30
Aradhya
dbbd9e9095 fix: removing functions from strings when alias is same as function name 2022-07-12 17:59:37 +05:30
Ankush Menat
0a73a3c708 refactor: stringify all non-excel types
style: incorrect EOF

test: excel export types
2022-07-12 15:53:55 +05:30
Aradhya
613065fa2e feat: Added support for aliasing in function objects 2022-07-09 22:27:29 +05:30
Aradhya
2fac4f8074 test: Added tests for timestamp 2022-07-08 21:33:58 +05:30
ruthra kumar
abd8f2c2c4 test: excel export with composite cell value 2022-07-06 12:52:47 +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
9a03c53572
Merge pull request #17405 from ankush/feat/currency_symbol_loc
feat: configurable location of currency symbol
2022-07-05 11:22:02 +05:30
Ankush Menat
054ad9c30c feat: Allow showing currency symbol to the right 2022-07-05 11:21:23 +05:30
Ankush Menat
9a5d11234c
fix: validate scheduler, hook method names (#17400)
* chore: warn about missing scheduler / doc events

* fix: pass list instead of filter

filter can only be iterated upon once

* refactor: many typehints in __init__.py
2022-07-04 19:29:16 +05:30
Ankush Menat
4e6ea5b554
fix: handle None as amount in fmt_money (#17395) 2022-07-04 16:27:57 +05:30
Aradhya Tripathi
ebd1d5b48c
Merge branch 'develop' into get-all-mod 2022-07-01 13:25:32 +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
813dcc1848
Revert "feat: Adding support to Query engine" 2022-06-29 23:30:23 +05:30
Aradhya
4da5fdcd02 fix: fixed spaces in args
fix: lint
2022-06-29 17:37:49 +05:30
Gavin D'souza
ee18694b1b test(fix): Import Max for test_functions_fields 2022-06-29 10:40:21 +05:30
gavin
91e76ff874
Merge branch 'develop' into get-all-mod 2022-06-28 19:47:20 +05:30
Aradhya
6db6be1f3c refactor: frappe.qb.engine
* Small fixes in set_fields and clean code
* Optimize casefolds
* Fixed functions passed in List
* get_sql => get_query - more expressive, less confusion
* Updated tests
2022-06-28 19:43:57 +05:30
Aradhya
4af2e1e886 refactor: replaced frappe.db.query with frappe.qb.engine 2022-06-28 19:43:50 +05:30
Aradhya
960952cfc3 feat(qb-engine): Added Aggregation function support
* Added Min, Max
* Added tests
2022-06-28 19:41:39 +05:30
Ankush Menat
c8ac3f922e Revert "fix: extra column in excel after exporting report with group by (#17126)"
This reverts commit 971b8160a3.
2022-06-28 18:40:27 +05:30
Shariq Ansari
971b8160a3
fix: extra column in excel after exporting report with group by (#17126)
Co-authored-by: gavin <gavin18d@gmail.com>
2022-06-28 12:39:45 +05:30
gavin
6a91c2cf14
Merge pull request #17141 from vishdha/_format_naming
fix: Use date/time field in document naming
2022-06-23 16:35:16 +05:30
Ritwik Puri
09229029da
Merge pull request #17234 from phot0n/fix-parameterized-list-pg
fix: cast list to tuple when using parameterized query for postgres
2022-06-22 13:59:26 +05:30
mergify[bot]
c6ada3d186
Merge pull request #17266 from adityahase/fix-oauth-id-token
fix(oauth): Send id_token of the authorized user instead of Guest
2022-06-22 08:24:10 +00:00
Aditya Hase
23cad54802
test(oauth): Send id_token of the authorized user instead of Guest
This only affects OAuth clients that use `id_token` obtained from `frappe.integrations.oauth2.get_token`.

Doesn't affect OAuth clients that ignore id_token and explicitly use `frappe.integrations.oauth2.openid_profile` endpoint for getting user details. e.g. Frappe OAuth client.

A simple way to replicate this is to setup Frappe-Frappe OAuth client-server pair and use `login_via_oauth2_id_token` instead of `login_via_oauth2` in `login_via_frappe`.
2022-06-21 21:50:16 +05:30
barredterra
ef3777badb test: refactor date naming test 2022-06-21 16:22:22 +02:00
Ankush Menat
69cb144b06 refactor!: move plyr from default bundle 2022-06-20 20:46:57 +05:30
Himanshu
a4861b2cb9
Merge branch 'develop' into _format_naming 2022-06-20 16:09:23 +05:30
Ankush Menat
f40c82d4d8
test(meta): control JS bundle sizes (#17244)
Any drastic increase in production bundle sizes should fail in CI.
2022-06-20 15:34:11 +05:30
phot0n
5e1007940c refactor(minor): move test_modify_query and test_modify_values to TestDB class 2022-06-18 10:55:40 +05:30
phot0n
215507a742 test: add list value in test_modify_values 2022-06-18 10:45:40 +05:30
vishdha
80de434984 chore: Test case added for datetime, date and time field 2022-06-17 20:07:14 +05:30
vishdha
754de9a56b fix: minor change added 2022-06-17 14:03:29 +05:30
vishdha
a9e222a706 chore: test case added for _auto_name format for date field 2022-06-17 13:59:21 +05:30
Ankush Menat
1c385826ef test: make sure all patches are in patch.txt 2022-06-16 14:10:01 +05:30
Ankush Menat
f1271b78de test: ensure temp tables are removed exist 2022-06-15 12:30:38 +05:30
Ankush Menat
8b8552b0e4 feat: clear-log-table to clear large log tables 2022-06-15 12:30:38 +05:30
gavin
f12a61feab
Merge pull request #17063 from gavindsouza/regex-refactor
perf!: Pages & APIs
2022-06-14 14:24:31 +05:30
Rushabh Mehta
f626464572
Merge pull request #16983 from alyf-de/select-user
fix: allow All to select a User
2022-06-14 14:21:56 +05:30
Gavin D'souza
52359a0ad9 test: Scheduler tests cleanup 2022-06-14 12:22:12 +05:30
Ankush Menat
21442f5cba perf: disable creating version for new docs
Each new doc inserts a version, this contains nothing but creator and
creation time.. which is already immutable information on the original
document.

This was added for cases like data import to track from where document
got created, ref: b7dfe7969d

Fix: only add a version on creation IF creation info is present on flags
2022-06-12 18:07:55 +05:30
barredterra
cdc850f12e test: user permissions affecting User 2022-06-10 16:30:20 +02:00
Gavin D'souza
ef0a92c849 chore(deps): Bump PyPDF2 from 1.26.0 to 2.1.0
* Updated changes in API usages
* changelog: https://github.com/py-pdf/PyPDF2/blob/main/CHANGELOG
2022-06-10 12:08:10 +05:30
gavin
9ce74fb6c4
Merge branch 'develop' into request-cache 2022-06-09 12:32:03 +05:30
Ankush Menat
59a9be4caf refactor: simplify timegrain conditions
All special handling for timegrains is same as general handling, no idea why it's done
like this.
2022-06-08 11:53:14 +05:30
Gavin D'souza
9afe5e9490 test: Added tests for site_cache, request_cache 2022-06-07 15:56:26 +05:30