Commit graph

101 commits

Author SHA1 Message Date
Ankush Menat
5deabdde21 fix: skip virtual fields in perm level checks during DB Query
DB Query can't access virtual fields so it should ignore all virtual
fields.
2023-12-20 12:00:08 +05:30
Ankush Menat
730e906dfd
refactor!: remove implicit primary key from logs (#22209) 2023-08-26 16:01:47 +05:30
Raffael Meyer
5fce1a57c0
fix: validate fieldname in get_group_by_count (#21932)
* fix: validate fieldname in get_group_by_count

* test: call get_group_by_count with invalid field

* test: is_default_field
2023-08-06 17:33:34 +05:30
Gavin D'souza
a22cbe8ae5 fix: Setup permission_map & use get_permitted_fields 2023-04-22 14:58:28 +05:30
Gavin D'souza
36ee97a8f8 fix: Dont assume user & permission_type in get_permitted_fileds 2023-04-21 17:40:00 +05:30
gavin
3da5a84d7c
fix(meta): get_permitted_fields with no field-columns (#20401) 2023-03-20 21:00:03 +05:30
Gavin D'souza
5829dabf74 fix: Add DefaultValue to core_doctypes_list 2023-02-06 12:45:02 +05:30
Gavin D'souza
4648c287f9 fix(meta): get_permitted_fields
Don't return any fields if user doesn't have permission for at least one
field
2023-02-04 11:55:02 +05:30
Gavin D'souza
4c1b2ae67c refactor: get_valid_dict
* Util get_permitted_fields checks for valid columns instead of planned logic
* Remove virtual field from dict if not in permitted fields
* Remove reliance on sentinel object _DOC_DELETED_ATTR
2023-01-25 12:04:34 +05:30
phot0n
bca63f8e46 chore: remove unused update_log_for_doc_creation flag
* chore: add note/warning for log_types
2022-08-26 18:51:18 +05:30
Suraj Shetty
ccc82e2c4c
Merge pull request #15538 from noahjacob/phone_field_control
feat: Phone Control Type
2022-04-28 10:27:52 +05:30
Sagar Vora
fa7ea4bce8
perf(BaseDocument): ~50% faster as_dict (#16549)
Co-authored-by: Pruthvi Patel <pruthvipatel145@gmail.com>
2022-04-23 09:01:20 +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
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
Noah Jacob
c2f2fc10e7 Merge branch develop into phone_field_control 2022-04-12 20:40:29 +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
579d0643c4 Merge branch 'develop' into phone_field_control 2022-03-22 15:05:45 +05:30
Saqib Ansari
8f277a247e Merge branch 'develop' of https://github.com/frappe/frappe into autocomplete-control 2022-02-12 16:27:27 +05:30
phot0n
266e1f95ed chore: adding back idx column
This is needed for ordering in display of links as it keeps
track of the clicks on a particular link item
2022-02-07 16:40:01 +05:30
phot0n
b31f3c24f6 refactor: remove parent, parenttype, parentfield, idx columns from non-child table doctypes
* feat: add parent, parenttype, idx, parentfield columns to doctypes when transitioning from normal -> child table

* fix: remove parent, parenttype, parentfield, idx from DocType DocType
2022-02-07 15:12:37 +05:30
Saqib Ansari
51dcf8fd47 feat: add autocomplete option in custom fields 2022-01-29 19:16:03 +05:30
Saqib Ansari
10edae6524 feat: new autocomplete control 2022-01-24 17:21:15 +05:30
Noah Jacob
e86378f26f
Merge branch 'develop' into phone_field_control 2022-01-07 13:12:33 +05:30
Noah Jacob
d08a332a85 feat: Phone Field Control Type 2022-01-04 12:58:36 +05:30
Ankush Menat
2f6b57cc0a fix(ux): validate max_attachment on doctype controller 2021-12-01 17:07:37 +05:30
Suraj Shetty
ed806c2c74 Merge branch 'develop' of https://github.com/frappe/frappe into form-tab-break 2021-09-04 15:37:58 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Suraj Shetty
4eb21aaeb2
Merge branch 'develop' into form-tab-break 2021-08-13 09:39:16 +05:30
Saqib Ansari
51e45de747 feat: Barcode option for data fields 2021-08-09 17:55:47 +05:30
Shariq Ansari
fd99f4bb61
Merge branch 'frappe:develop' into icon-picker 2021-08-03 12:47:44 +05:30
saxenabhishek
7671e78487 style: minor fixes and improvements 2021-07-30 11:29:41 +05:30
saxenabhishek
45d1afe739 refactor: move rename, change_column_type, DESC to db 2021-07-30 11:00:35 +05:30
saxenabhishek
43b0d31cf8 refactor: qb in delete_fields 2021-07-30 11:00:34 +05:30
Gavin D'souza
01d275f667 style: Format code for better readability
* Remove trailing whitespaces
* Format code to fit module conventions
* Add appropriate new lines between imports, classes, fn defs, etc
* Added comments, docstrings & module headers
2021-07-28 18:55:27 +05:30
Aradhya-Tripathi
84ff1d0af9 style: removed frappe.db.sql comments 2021-07-28 13:48:01 +05:30
Aradhya-Tripathi
538ef2168b fix: removed wrong queries 2021-07-24 22:58:12 +05:30
Aradhya-Tripathi
8feb430371 refactor: Moved raw queries to frappe orm 2021-07-21 23:32:18 +05:30
Aradhya-Tripathi
eb7e95ae26 refactor: using frappe orm 2021-07-21 19:19:06 +05:30
shariquerik
b6c71251a3 feat: Icon Picker 2021-07-10 21:58:57 +05:30
Suraj Shetty
2463f3a237
Merge branch 'develop' into form-tab-break 2021-06-17 20:48:27 +05:30
Gavin D'souza
c489846547 Merge branch 'develop' into unnecessary_comprehensions 2021-06-11 19:30:23 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
prssanna
ea3ca571ad fix: add Tab Break to no value fields 2021-05-18 17:21:00 +05:30
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
Hussain Nagaria
82b98330fd feat: Add URL option for data type fields 2021-04-14 20:16:44 +05:30
Gavin D'souza
79cb3f0596 feat: Rename "Custom Script" to "Client Script"
* Remove postfix "-Client" from ClientScript.autoname
2021-02-04 14:06:09 +05:30
Rushabh Mehta
1b73602a17 feat(system console): Added a System Console to help in debugging and Console Log 2020-08-31 11:29:18 +05:30
Rushabh Mehta
aad2375cf3 fix(major): make document events more efficient, fix bug in cache_manager.get_doctype_map 2020-08-17 09:41:54 +05:30
Rucha Mahabal
58b90e72f3 feat: duration control 2020-05-04 13:20:27 +05:30
Chinmay D. Pai
1dfa8ccbc4
feat: add name validation to data fieldtype
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-04-21 15:49:55 +05:30