Commit graph

2720 commits

Author SHA1 Message Date
Sagar Vora
bdcd7c8eed
Merge pull request #33956 from sagarvora/extend_doctype_class
fix: minor improvements to extended class logic
2025-09-09 06:18:52 +00:00
Sagar Vora
c5bc3875df fix: minor improvements to extended class logic 2025-09-09 11:15:17 +05:30
Sagar Vora
d81cf3856c
Merge pull request #33943 from sagarvora/extend_doctype_class
feat: new `extend_doctype_class` hook
2025-09-08 13:54:41 +00:00
Sagar Vora
b4bd4f756d fix: set __module__ in extended class 2025-09-08 18:37:41 +05:30
Sagar Vora
18e2e61cad feat: support pickling extended class 2025-09-08 18:25:18 +05:30
Sagar Vora
1ff85611ff feat: new extend_doctype_class hook 2025-09-08 17:02:34 +05:30
Akhil Narang
f7d4f272ad
fix(db_query): raw string was broken
Add another function to blacklist

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-09-03 16:13:16 +05:30
Akhil Narang
06afd9b073
Merge pull request #33865 from akhilnarang/fix-order-group-by-check
fix(db_query): check for some more functions
2025-09-02 11:49:07 +05:30
Akhil Narang
5b26db7265
Merge pull request #33685 from AMR-Mannesmann/fix(document)-is_child_table_same-for-new-docs
fix(document): is_child_table_same for new docs
2025-09-02 11:37:06 +05:30
Akhil Narang
9a9f7e1d91
fix(db_query): check for some more functions
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-09-01 16:11:04 +05:30
barredterra
b1c7821911 feat: validate IBAN in backend 2025-08-29 15:21:56 +02:00
Akhil Narang
fab5581a9b
Merge pull request #33812 from barredterra/format-ibans
feat: format IBANs in Data field
2025-08-29 11:18:59 +05:30
Akhil Narang
719af6e722
Merge pull request #33815 from raizasafeel/fix/translation-trailing-spaces
fix: remove trailing spaces in translatable strings
2025-08-28 16:31:45 +05:30
Ejaaz Khan
86c719ec6d
Merge pull request #33809 from mihir-kandoi/33758
feat: enable non negative validation for Percent type fields
2025-08-28 15:06:48 +05:30
Raizaaa
aa3bb0e4d7 fix: remove trailing spaces in translatable strings 2025-08-27 13:23:17 +03:00
barredterra
dbc6870be0 feat: format IBANs in Data field 2025-08-26 23:41:00 +02:00
Mihir Kandoi
c24bda0481 feat: enable non negative validation for Percent type fields 2025-08-26 22:12:23 +05:30
PUGAZHENDHI V
4c1a61f085
fix: validate dot in numeric placeholders (#33739)
* fix: validate dot in numeric placeholders

* fix: failed test cases
2025-08-25 11:58:43 +05:30
Daniel Radl
99d6e1b381 fix(document): is_child_table_same for new docs 2025-08-20 09:30:26 +00:00
Ejaaz Khan
42c5c41628
fix: remove default value from time field (#33515) 2025-08-04 12:59:25 +05:30
Akhil Narang
6461592b5d
Merge pull request #32192 from henriquefalconer/fix/field-level-permissions-filtering
fix: Field Level Permissions Not Applied Correctly in frappe.get_list
2025-08-01 16:35:08 +05:30
Akhil Narang
40e6241c1f
Merge pull request #28786 from gbm001/virtual_custom_link_fields
fix: Allow cancellation/rename of doctypes linked by a virtual custom field
2025-08-01 13:44:46 +05:30
Ejaaz Khan
20315bf030
Merge pull request #33446 from maverjk/patch-3
Update base_document.py to resolve error "AttributeError: 'NoneType' object has no attribute 'fieldtype'"
2025-07-31 12:19:53 +05:30
Maverjk Carter
a9562f6182 fix: check if df exist before accessing its properties 2025-07-31 12:04:15 +05:30
Ayush Chaudhari
761751f269
feat: App-Defined Workflow Tasks and Server Scripts on Transition (#33255)
* feat: add workflow task doctypes

* chore: add Workflow Task to Script Type of Server Scripts

* chore: add description for Workflow Tasks

* feat: fetch dotted paths and corresponding names from hooks

* fix: use Select field instead of Autocomplete

* feat: execute tasks in the background on state transition

* fix: throw error when task not found

* fix: naming for transition task set by user

* fix: child table views

* feat: support for server scripts

* chore: comments and description

* fix: change the casing of docevent options

* fix: change test casing

* feat: Add Workflow Transition field to webhooks

* fix: temporarily remove filter

* feat: add webhooks as workflow actions

* test: test execution of synchronous app-defined methods and server scripts

* chore: shorten the description and change the fieldname of the field 'execute_asynchronously' to 'asynchronous'

* test: server script executipn

* fix: add field to UI

* test: change customer to domain

* test: change Customer to Domain

* fix: patch for change in webhook fields

* chore: fetch only used fields in get_all

* fix: don't run test logic in application code 🙂

* test: separate tests for workflow tasks

* Revert "fix: patch for change in webhook fields"

This reverts commit 2e9c51c43ca2b3698991fbe75cc4032368ab174c.

* chore: break into smaller functions

* test: webhooks with workflow tasks

isolate mock responses to test_sync_tasks

* Revert "fix: change test casing"

This reverts commit e2bad96ed01dea0a26d002ea44a1e0175525ed31.

* Revert "fix: change the casing of docevent options"

This reverts commit ddfc81bf775fad74225f25815b8e3e7b255dc9eb.

* fix: webhook casing

* fix: type hint for doc
2025-07-29 11:01:44 +05:30
Raffael Meyer
93b4700899
fix: make labels in error message translatable (#33166) 2025-07-23 18:11:51 +05:30
Akhil Narang
ce4f7f7418
chore: extend function blacklist
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-07-15 17:05:08 +05:30
Akhil Narang
0934d5117d
fix: strengthen subquery check
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-07-15 17:05:08 +05:30
Akhil Narang
8d62e4de01
Revert "fix(db_query): don't allow unclosed quotes"
This reverts commit 6e6150d193.
2025-07-15 17:05:08 +05:30
P-Froggy
00a5fde3ad
feat: Enable _doc_before_save for child documents (#33279)
* Initial Commit

* Apply suggestion from @ankush

* refactor: move unrelated code out of try-except block

* test: child table level value change detection

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-07-11 12:33:00 +00:00
zeel prajapati
2afc1582f6
fix: update delete or cancel popup doc links to handle edge cases (#33261) 2025-07-11 17:57:51 +05:30
Ankush Menat
b74b8f16b7
refactor: slim down init.py further (#33284)
* refactor: move document utils

* test: rewrite init.py test

The LOC is 1000 less than what it used to be.
2025-07-11 15:34:50 +05:30
Sagar Vora
71428b7dcb
feat: utility to commit certain queries after sending response (#32978)
* feat: utility to commit certain queries after sending response

* fix: add error handling

* refactor: subclass CallbackManager
2025-07-08 05:02:27 +00:00
Akhil Narang
6e6150d193
fix(db_query): don't allow unclosed quotes
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-07-07 17:37:06 +05:30
Akhil Narang
41a13a0b07
fix: tighten function check in validate_order_by_and_group_by
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-07-07 17:37:06 +05:30
Akhil Narang
ad948c9b98
Revert "Merge pull request #32327 from akhilnarang/allow-passing-name-in-api"
This reverts commit 1e30db26dc, reversing
changes made to 8da72e91e3.
2025-07-03 17:23:48 +05:30
Sagar Vora
406aae7432 chore: fix typo 2025-07-01 19:43:04 +05:30
Sagar Vora
56c7295b8c
perf: commit only if file is imported (#33114) 2025-06-26 15:51:03 +05:30
Faris Ansari
d584b8691d
Merge pull request #32381 from netchampfaris/api-v2-fixes
feat!: Apply permissions in frappe.qb.get_query

Enhancements:
- Supports applying permissions
- Strict input parsing

BREAKING CHANGE:
```py
# Before
frappe.qb.get_query("Task", fields=["sum(is_completed) as count"])

# After
frappe.qb.get_query("Task", fields=[{"SUM": "is_completed", "as": "count"}])
```
2025-06-23 15:50:25 +05:30
Sagar Vora
18dde69ab0 perf: dont serialize caches 2025-06-21 20:54:11 +05:30
Sagar Vora
d9fc9f21f9 perf: faster meta serialisation 2025-06-21 20:12:39 +05:30
Faris Ansari
09ae9ad086 fix: rename method typing 2025-06-18 15:51:13 +05:30
Sagar Vora
b3e1eda4c8
feat: global frappe.in_test flag (#32960)
* feat: global `frappe.in_test` flag

* feat: helper utility to toggle `frappe.in_test`

* fix: use `toggle_test_mode` util

* fix: use `frappe.in_test`

* chore: add comment explaining global `in_test`

* chore: ignore commit replacing flag usage

* test: temporarily disable `frappe.in_test`

this worked earlier because flag was set in werkzeug.local which was separate for API test client

* test: add comment explaining change
2025-06-17 19:19:31 +05:30
Sagar Vora
5210348322 perf: assume key to be table fieldname 2025-06-14 01:49:07 +05:30
Sagar Vora
d79ca9560b chore: revert _init_* methods of document 2025-06-13 22:24:03 +05:30
Ankush Menat
b162c0d6ec
fix!: Don't update document from keyword args (#32898)
Right now if you do this:

`get_doc(doctype, name, field=value)` then it loads document from DB and
then updates field to value.

This is absurd API and I don't think it was ever done intentionally.
2025-06-11 10:15:35 +00:00
Ankush Menat
44681433c9
fix: for_update for lazy loaded documents (#32897)
* fix: Support for_update on lazy documents

* fix: Pop for_update from arguments

* fix: Don't init empty child tables
2025-06-11 10:02:36 +00:00
Sagar Vora
a6b2f7c991
perf: dont override doc.extend (#32890) 2025-06-11 07:26:46 +00:00
Ankush Menat
893a87df86 fix: append and extend without touching attributes 2025-06-11 10:07:48 +05:30
Ankush Menat
10c3c9ea9b fix: Limit getattr to lazy loaded child tables only 2025-06-11 09:55:45 +05:30