Commit graph

2927 commits

Author SHA1 Message Date
Ankush Menat
27712f3c76
perf: Avoid ordering for link field checks (#38928) 2026-04-27 15:06:30 +05:30
Aarol D'Souza
f10abb4e06
Merge pull request #38750 from pratikb64/fix/delete-utils
fix: add get_dynamic_linked_docs & get_linked_docs utils
2026-04-23 20:27:35 +05:30
AarDG10
1257e0db42 refactor(delete_doc): minor refactor in qb usage 2026-04-23 20:13:42 +05:30
Pratik
05532b3697 refactor: remove for loop while raising exception 2026-04-23 18:52:54 +05:30
Shrihari Mahabal
07dd2fd9dc fix: prevent persistence of virtual single doctypes 2026-04-21 19:04:11 +05:30
Shllokkk
44b5228598
feat: introduce standard and letter_head_for fields in letter head doctype (#38417)
* feat: introduce standard and letter_head_for fields in letter head doctype

* feat: introduce a module link field to letterhead doctype to support json creation

* feat: make Letter Head importable via sync

* test(Letter Head): fix the test_auto_image test case for letter head doctype

* fix: make module field depend on standard field value

* feat: introduce letter heads for standard reports

* fix: letter heads for non-standard reports

* fix: letter_head validation in report and letter head doctype edit access based on users

* fix: correct validation for standard letter head creation
2026-04-17 12:34:33 +05:30
Shrihari Mahabal
16440d71e9
Merge pull request #37861 from ShrihariMahabal/get-docs
feat: get_docs to fetch instantiated document objects from db
2026-04-15 11:24:21 +05:30
Ejaaz Khan
93bec95024
Merge pull request #36615 from GursheenK/virtual-df-value-in-document-getter
fix: title for link field in virtual docfield titles
2026-04-14 19:51:34 +05:30
Pratik
f0ef9295bd fix: add get_dynamic_linked_docs & get_linked_docs utils 2026-04-13 15:37:01 +05:30
Ankush Menat
9c77848b81 refactor: Simpler iterator implementation using itertools 2026-04-09 10:02:57 +05:30
Ankush Menat
02510e506a fix: get_docs - Always use iterator internally
When `get_docs` output is unknown, we might end up generating queries
for child table with `in (...)` containing thousands of doc names.

This doesn't fare well with databases, so it's better to chunk it to
1000 by default. This is an acceptable tradeoff IMO.
2026-04-08 21:59:44 +05:30
Ankush Menat
2364216fb1 fix: Avoid masking in get_docs
get_doc, so far doesn't do perm checks by default. Masking is part of
permissions.
2026-04-08 21:41:45 +05:30
Ankush Menat
b1a723f514 refactor: remove redundant lock_rows 2026-04-08 21:36:07 +05:30
Ankush Menat
a303fbc3ea refactor: Consistent API for list/generator
Returning chunks is not expected API. Why? Because we should always be
able to do:

```python
for doc in frappe.get_docs(...):
    ...
```
2026-04-08 21:31:02 +05:30
Ankush Menat
0d833d658e refactor: use as_iterator instead of as_generator
Because it's already used in `db.sql`. So use consistent naming.
2026-04-08 21:17:25 +05:30
Ankush Menat
0d8ddb5958 Merge branch 'develop' into get-docs 2026-04-08 10:50:31 +05:30
Rohit Waghchaure
1c47e262ae feat: do not round fields 2026-04-07 17:01:51 +05:30
Aarol D'Souza
118cb4490f
Merge pull request #38215 from AarDG10/val-path
fix: validate path in render_include
2026-04-06 10:14:49 +05:30
AarDG10
b5ab941788 fix: validate path in render_include
Validate the parsed path in render_include by canonicalizing the path
2026-04-06 10:03:01 +05:30
Shrihari Mahabal
377cc70d8b feat: enqueue cancellation in submission queue 2026-03-25 15:27:20 +05:30
Rucha Mahabal
7e6c9def71
fix: get_list calls fail sometimes due to permlevel TypeError (#38214) 2026-03-24 18:15:30 +05:30
Kaushal Shriwas
c18cdfa732 fix(filter): remove redundant TypeError from except clause 2026-03-21 14:46:16 +05:30
mergify[bot]
1907293ba7
Merge branch 'develop' into get-docs 2026-03-19 11:48:31 +00:00
Kaushal Shriwas
0d1f8992bc fix(filter): use JSON encoding for in filter values containing commas 2026-03-19 17:17:33 +05:30
Akhil Narang
e2fe249706
Merge pull request #37903 from akhilnarang/qb-fixes
fix: some follow up fixes for query builder
2026-03-13 13:36:48 +05:30
Akhil Narang
f9af4d2ff9
fix: check shared documents as well
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2026-03-13 10:23:28 +05:30
Shubh Doshi
5092225cbc
fix!: prevent submission of non-submittable doctype (#37009)
* fix: prevent submission of non-submittable doctype

* fix: updated failing test cases to use submittable doctype as required

* refactor: corrected to_docstatus and from_docstatus use

* fix: inherit submittability from parent for child tables

* Revert "fix: inherit submittability from parent for child tables"

This reverts commit ee83ee59b4f0596e2d402a1547e92b131ae49579.

* feat: introduce skip_docstatus_validation flag

* test: add test cases for skip_docstatus_validation flag and docstatus transition of non-submittable doctype
2026-03-12 17:24:21 +05:30
Sagar Vora
7a113c0aee
fix: use correct core doctypes set in _get_filterable_fields (#37932) 2026-03-11 17:19:48 +05:30
Shrihari Mahabal
7ff564c227 refactor: add support for distinct in get_docs 2026-03-10 14:00:08 +05:30
Shrihari Mahabal
16efc5fa45 chore: add docstring for get_docs 2026-03-09 12:39:56 +05:30
Shrihari Mahabal
1f96971622 feat: get_docs to get multiple instantiated document objects 2026-03-09 12:30:27 +05:30
Akhil Narang
3e4f139ff3
fix: use string representation of exceptions in translated strings (#37756)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2026-03-06 13:02:16 +05:30
Safwan
05854a5803
fix: rename autoincrement sequence on doctype rename (#37578)
* fix: rename sequence on doctype rename

* fix: only rename sequence for autoincrement doctypes
2026-02-27 17:08:30 +05:30
mergify[bot]
0a08245968
Merge branch 'develop' into fix-currency-precision-js 2026-02-26 09:47:48 +00:00
Suraj Shetty
9a170c505b
Merge pull request #37396 from krantheman/fix-new-linked-document 2026-02-25 17:12:55 +05:30
Suraj Shetty
4fc20ccdfd
Merge pull request #37527 from safwansamsudeen/delete-doc-auth 2026-02-25 17:07:00 +05:30
mergify[bot]
f384f5df5e
Merge branch 'develop' into fix-new-linked-document 2026-02-25 11:33:22 +00:00
Safwan Samsudeen
90b974f794 fix: delete passwords after before_trash 2026-02-25 16:21:37 +05:30
Suraj Shetty
0c9a55f4e5
Merge pull request #37180 from frappe/32475-attached_to_field-and-folder-fields-not-copied-by-copy_attachments_from_amended_from-function 2026-02-24 15:54:40 +05:30
sokumon
68a8b9fa4a fix: check if app value exists 2026-02-24 14:44:51 +05:30
Soham Kulkarni
23b17de20a
Merge pull request #37446 from sokumon/robust-patch 2026-02-24 12:59:23 +05:30
sokumon
204fb51bb9 fix: make removal of orphan entities robust 2026-02-24 12:35:21 +05:30
Luis Mendoza
8e97332029 fix: resolve currency precision for child table rows in unsaved documents 2026-02-23 20:19:42 +00:00
Priyal208
e86df0f9cc
fix: skip _validate_update_after_submit() for virtual fields (#37390) 2026-02-23 12:59:57 +00:00
Akash Tom
20a946d7f5 fix(linked documents): pass link specific fieldname to button so that only that field gets populated while creating a new doc 2026-02-23 15:21:48 +05:30
diptanilsaha
57f6734255 fix(sync): remove is_standard notifications records on deletion 2026-02-23 12:59:57 +05:30
Akhil Narang
04b2a433b6
fix(db_query): relax some restrictions (#37314)
Allow valid identifiers

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2026-02-23 12:21:26 +05:30
Aarol D'Souza
c55ff193a6
fix: add type hints to whitelisted methods 3 (#37149)
* fix(apps): add type hints to whitelisted methods

* fix(recorder): add type hints to whitelisted methods

* fix(comments): add type hints to whitelisted methods

* fix(oauth2): add type hints to whitelisted methods

* fix(google_calendar): add type hints to whitelisted methods

* fix(print): add type hints to whitelisted methods

* fix(print_format_builder): add type hints to whitelisted methods

* refactor(network_printer_settings): remove unused args

* fix(document): add type hints to whitelisted methods

* fix(user_settings): add type hints to whitelisted methods

* fix(mapper): add type hints to whitelisted methods

* fix(connected_app): add type hints to whitelisted methods

* fix(google_contacts): add type hints to whitelisted methods

* fix(frappecloud_billing): add type hints to whitelisted methods

* test: rewrite test to fit the strict type check

* fix(social_login_key): add type hints to whitelisted methods

* fix(share): add type hints to whitelisted methods

* fix(webhook): add type hints to whitelisted methods

* fix(workflow): add type hints to whitelisted methods

* fix(workflow main): add type hints to whitelisted methods

* fix(workflow_action): add type hints to whitelisted methods

* fix: flexible type hint

* fix(client): add type hints to whitelisted methods

* fix: fix some of the tighter types

* fix(frappecloud_billing): add str typehint to whitelisted endpoint

* fix: target_doc can be dict/json string

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2026-02-20 06:50:19 +00:00
Sumit Jain
b781fa4ee3 fix: Copy attached_to_field and folder when amending documents 2026-02-18 14:04:58 +05:30
Aarol D'Souza
a043c26709
Merge pull request #35318 from AarDG10/add-custom-hook
feat(server script): parse child table list onto server script for customizations
2026-02-17 23:05:32 +05:30