Commit graph

2912 commits

Author SHA1 Message Date
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
Ankush Menat
c38815c60c
fix: limit join param to get_all (#37131) 2026-02-17 10:19:54 +00:00
Saqib Ansari
326406d139 fix: avoid false cache misses by ensuring string keys for linked fields 2026-02-17 12:21:19 +05:30
Akhil Narang
7c756aa811
Merge pull request #35872 from czarflix/fix/perf-bulk-link-validation
perf(validation): optimize link validation with bulk pre-fetching
2026-02-16 16:14:21 +05:30
Akhil Narang
ab577751f2
fix(sanitize_fields): strengthen field check
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2026-02-10 21:35:53 +05:30
Sagar Vora
93065e6af4 fix: handle extended class unpickling when frappe is not initialised
Store __bases__ in pickle for reconstructing extended classes during unpickling.
This avoids dependency on get_controller() which requires frappe to be initialised.

Uses functools.cache on _create_extended_class to avoid recreating the class
for each unpickled object.

fixes frappe#35371
2026-02-09 18:00:42 +05:30
Suraj Shetty
cefac6851e
Merge pull request #36621 from frappe/fix-empty-list-in-operator-behavior
fix!: Enhance IN/NOT IN operator handling for empty lists
2026-02-09 15:17:54 +05:30
barredterra
251189a1e2 fix: skip db changes while renaming virtual doctype 2026-02-08 17:44:04 +01:00
Safwan
1307ae33eb
fix: use system number format for currency precision (#36648)
* fix: use system number format for currency precision

* fix: remove default format
2026-02-07 06:30:00 +00:00
Sumit Jain
1d9eb802fc
feat: Enhance autoname functionality (#36827)
* feat: Enhance autoname functionality to support expression naming rules with and without dots before dashes

* style: Fix formatting issues

---------

Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2026-02-07 06:22:28 +00:00
Ayaan Ahmad
ddc757dcc8 refactor(model): extract repeated DB query logic into helper function
Address @akhilnarang's code review feedback:

1. Extract _fetch_link_values helper function
   - Encapsulates repeated DB query pattern (was duplicated 3 times)
   - Handles cache=True fallback and virtual doctype logic

2. Sort values_to_fetch for cache key consistency
   - Uses tuple(sorted({...})) to match prefetch sorting
   - Prevents cache misses due to field order differences
2026-02-04 00:32:46 +05:30
Sumit Jain
c6868b11c6 feat: Enhance IN/NOT IN operator handling for empty lists
Added logic to return appropriate criteria for empty lists in IN and NOT IN operators. An empty list with IN now returns 0 results (1=0), while NOT IN returns all results (1=1). Updated tests to verify this behavior.
2026-02-03 12:31:29 +05:30
Sagar Vora
f2a608c08d fix: allow default fields for users with select perms 2026-02-02 15:19:23 +05:30