Commit graph

2246 commits

Author SHA1 Message Date
Gavin D'souza
4b51b72119 Merge branch 'develop' of github.com:frappe/frappe into refactor-file 2022-04-18 17:28:56 +05:30
Gavin D'souza
801874154d fix: Add return value for doc.delete 2022-04-18 12:02:19 +05:30
Ankush Menat
b409a7eeba fix: extend autoname validation to child items 2022-04-14 15:16:59 +05:30
Suraj Shetty
6b7fda495b Merge branch 'develop' of https://github.com/frappe/frappe into phone_field_control 2022-04-14 14:19:35 +05:30
Suraj Shetty
48cd1c2ad4 refactor: Fix naming and simpify code
- Ability to clear code, by hiting backspace
2022-04-14 14:14:00 +05:30
Gavin D'souza
66655eb8ed Merge branch 'develop' of github.com:frappe/frappe into bg-rename_doc 2022-04-14 13:41:56 +05:30
Shridhar Patil
39f8267a15
feat: added support for data type json (#16187)
> Please provide enough information so that others can review your pull request:

Added json support for postgres and mariadb



> Explain the **details** for making this change. What existing problem does the pull request solve?
https://github.com/frappe/frappe/projects/4#card-50160428


> Screenshots/GIFs
![json](https://user-images.githubusercontent.com/11792643/156367383-8f8492c2-3817-449d-a2dd-c983eeadbb48.gif)



---

**Previous attempts:** 

https://github.com/frappe/frappe/pull/8128
https://github.com/frappe/frappe/pull/7096


Docs: https://frappeframework.com/docs/v13/user/en/basics/doctypes/fieldtypes#json
2022-04-14 04:21:41 +00:00
mergify[bot]
5f0a95f8bd
Merge pull request #16449 from resilient-tech/refactor-_dict
refactor!: improved `frappe._dict`
2022-04-14 03:51:55 +00:00
Gavin D'souza
03d542edce fix!: Allow child table naming 2022-04-13 17:32:58 +05:30
Sagar Vora
77879933ce style: make changes as per linter 2022-04-13 13:21:01 +05:30
Sagar Vora
38959637e7
perf: move less expensive condition first
Co-authored-by: gavin <gavin18d@gmail.com>
2022-04-13 11:40:35 +05:30
Sagar Vora
93051389b1 fix: use isinstance instead of looping over __dict__ 2022-04-13 11:20:01 +05:30
Gavin D'souza
97e911e069 Merge branch 'develop' of github.com:frappe/frappe into refactor-file 2022-04-13 10:49:26 +05:30
Noah Jacob
c2f2fc10e7 Merge branch develop into phone_field_control 2022-04-12 20:40:29 +05:30
Gavin D'souza
20742e396f Merge branch 'develop' of github.com:frappe/frappe into test-nestedset 2022-04-12 18:09:22 +05:30
Gavin D'souza
01e101d4b8 chore: Add typing and and style conflicts 2022-04-12 15:40:37 +05:30
Nabin Hait
b4476e0257 feat: Ignore permlevel for specific fields 2022-04-12 12:24:23 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Noah Jacob
2d3c1053a0 refactor(ui): updated validation messages with fieldname 2022-04-11 15:25:27 +05:30
Suraj Shetty
2a994a3be4
Merge branch 'develop' into use-backticks 2022-04-10 07:50:53 +05:30
Noah Jacob
bf92b363e2
Merge branch 'develop' into phone_field_control 2022-04-07 15:04:47 +05:30
Sagar Vora
73fc2f1d59 fix: require key in doc.get 2022-04-04 11:18:46 +05:30
Sagar Vora
e9b1cdcdca refactor(BaseDocument)!: dont return __dict__ if key is falsy 2022-04-04 11:11:13 +05:30
Sagar Vora
aedd2fb2b6
Revert "perf: 80% faster doc.get for fields with None as value" (#16490) 2022-04-01 20:39:27 +05:30
gavin
4756efca91
Merge pull request #16477 from resilient-tech/perf-doc-get
perf: 80% faster `doc.get` for fields with `None` as value
2022-04-01 16:26:27 +05:30
gavin
3f6bbd6349
Merge pull request #16474 from resilient-tech/perf-get-doc-filters
perf: reduce query when calling `get_doc` with filters
2022-04-01 15:53:55 +05:30
Sagar Vora
428fc98fa7 chore: add comment to explain line 2022-04-01 14:28:13 +05:30
Sagar Vora
e73c552632 fix: implement for_update for Single documents 2022-04-01 14:15:35 +05:30
Ankush Menat
046f5d31af
fix: don't update autoname field when using Document.save (#16436) 2022-04-01 14:00:27 +05:30
Sagar Vora
811c213082 perf: 80% faster doc.get for fields with None as value 2022-04-01 04:35:19 +05:30
Sagar Vora
0ec26cee70 perf: use as_dict parameter 2022-04-01 01:57:09 +05:30
Sagar Vora
d3f8f676d4 fix: show parent in __repr__ only if available 2022-04-01 01:30:58 +05:30
Sagar Vora
e1cc626bd5 style: improve code readability 2022-04-01 01:18:25 +05:30
Sagar Vora
bd35734307 perf: reduce query when calling get_doc with filters 2022-04-01 00:03:54 +05:30
phot0n
8296d6e84a fix: use backticks for fieldname while preparing filters 2022-03-31 18:12:09 +05:30
Sagar Vora
76779e7452 fix: incorrect logic for parenttype parameter in get_all_children 2022-03-31 10:12:44 +05:30
Gavin D'souza
28f9802fd9 fix: rollback to savepoint to avoid partial commits
It's better to keep the validations in and out AND separate...this is a
humble attempt for the same :)
2022-03-28 18:47:26 +05:30
gavin
8dbb7bc71d
Merge branch 'develop' into refactor-file 2022-03-26 10:42:42 +05:30
Mohammad Hasnain Mohsin Rajan
fda544f424
refactor!: make automatically following documents optional (#16030)
* fix: make automatically following documents optional

* fix: optimize email triggers for document followed

* test: add tests for document follow settings

* test: sync global search before testing

* fix: extend pypika's cast function to mimic varchar cast in MariaDB

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Co-authored-by: phot0n <ritwikpuri5678@gmail.com>
2022-03-25 02:01:15 +05:30
Gavin D'souza
47cf46cd49 Merge branch 'develop' of github.com:frappe/frappe into refactor-file 2022-03-24 21:38:21 +05:30
Sagar Vora
4bb5ea609c
fix: get currency name from DB only if options are set and value is truthy (#16382)
* fix: call `frappe.db.exists` only if `options` are set and value is truthy

* fix: sider issue

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

* fix: use `get_value` instead of `exists`

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

* test: ensure currency formatting works without currency set in df options or param

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2022-03-23 19:28:01 +05:30
Gavin D'souza
f92f77dab7 fix(qb): Make Table importable 2022-03-22 20:31:37 +05:30
Gavin D'souza
3351cc9c80 refactor(rename_doc): Use QB notation inplace of raw SQLs
* Converted ~22 queries from raw SQL to use frappe.qb notation
* Made queries DRY-er
2022-03-22 20:31:10 +05:30
Gavin D'souza
1cb956d835 fix(rename_doc): Use sbool instead of cint
cint("false") returns True which is what is sent by frappe dialog. This
may be required to be fixed in the client alone but making this change
to make the API more "robust" as this has been working in this
particular way for far too long now :')
2022-03-22 17:33:51 +05:30
Gavin D'souza
0e87013421 chore: Add docstring for rename_doc 2022-03-22 16:12:36 +05:30
Noah Jacob
579d0643c4 Merge branch 'develop' into phone_field_control 2022-03-22 15:05:45 +05:30
Gavin D'souza
e2489f8377 fix: Validate title updates via update_document_title API 2022-03-22 14:55:10 +05:30
Gavin D'souza
d92a64e767 fix: validate before enqueuing rename_doc
* refactor validate_rename
* don't run before_rename hooks twice
* validate_rename kwarg in doc.rename
2022-03-22 14:53:22 +05:30
Gavin D'souza
448fb8a207 Merge branch 'develop' of github.com:frappe/frappe into bg-rename_doc 2022-03-22 12:29:43 +05:30
mergify[bot]
f47331cd1d
Merge pull request #16200 from alyf-de/refactor-db-exists
refactor: `frappe.db.exists`
2022-03-21 05:47:27 +00:00