Commit graph

2253 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
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
Rahul Agrawal
c52e5157b4
feat: allow users to export report in background (#33861)
* feat: allow users to email prepared report

* fix: add export in background checkbox in export dialog

* chore: use a common function to send report email

* feat: delete generated files from system after user defined duration

* feat: add exported reports in a folder and periodically clean it

* test: add test for export via report

* fix: add exported folder path as constant

* chore: un-edit report.json

* refactor: for readability

* chore: type hint

* refactor: let the BG job fail if email fails

* refactor: consistent `report_name`

* it reads better now, e.g. attached_to_name=report_name instead of attached_to_name=title

* refactor: `return_file` to its inverse `populate_response`

* chore: more specific error message

---------

Co-authored-by: Rahul Agrawal <deathstarconsole@Rahuls-MacBook-Air.local>
Co-authored-by: Hussain Nagaria <hussainbhaitech@gmail.com>
2025-09-05 14:34:55 +00:00
Raffael Meyer
3c0a378a41
refactor: prefer list patterns provided by babel (#33857)
* feat: prefer list patterns provided by babel

* test: comma_and, comma_or
2025-09-04 15:17:56 +05:30
barredterra
b1c7821911 feat: validate IBAN in backend 2025-08-29 15:21:56 +02:00
Akhil Narang
7f7405788c
chore: temporarily increase __init__.py length allowance. (#33803)
So I can merge #33730 before fixing #33750

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-08-26 12:20:58 +00:00
Ejaaz Khan
435b6d0144
Merge pull request #32143 from marination/list-view-buttons
fix: Render List row buttons as columns
2025-07-31 12:13:20 +05:30
Faris Ansari
2676c9c2ec
feat: SQLite FTS5 search framework for Frappe apps (#33359)
- Abstract SQLiteSearch base class with full-text search
- Spelling correction, recency boosting, and custom scoring
- Supports search filtering and configurable document indexing
- hooks for auto-indexing
  - build index after migrate
  - build index (if not exists) every 15 mins
  - update doc index on_update
  - remove doc index on_trash
2025-07-29 11:18:56 +05:30
Soham Kulkarni
64db88228f
refactor: seperate blogs into a seperate app (#32737)
* fix: remove doctypes,workspace blocks, files

* fix: minor python tests and UI tests

* fix: remove blog post from tests

* fix: remove blogger as role for tests

* fix: add check for if doctype exists

* fix: ui test

* fix: more cleanup

* fix: cleanup comments and fix test_query

* fix: resolve conflicts

* fix: add warning and handle comments
2025-07-28 14:35:02 +05:30
marination
723a95c955 Merge branch 'develop' into list-view-buttons 2025-07-24 11:16:10 +02:00
Shadrak Gurupnor
68246a73fb
fix: add order_by params to Frappeclient get_list (#33324)
* fix: add order_by params to client getlist

* fix(test): Test for groupby and orderby

* chore: pre-commit

* fix(test): Add test for group_by

* fix(test): Use dbapi for testing

* linter fix

* chore(test): linter
2025-07-21 19:23:32 +05:30
Ankush Menat
b443851ce1
test: fix test data generation code (#33314)
This never worked, it was just silently ignored till now.
2025-07-14 09:19:53 +00:00
sokumon
4b3e256045 fix(test): insert translation 2025-07-14 12:49:26 +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
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
Ankush Menat
1ed2447f6b
fix!: Always cast db.get_value for singles (#33276) 2025-07-11 07:32:41 +00:00
Ankush Menat
afb720e003
refactor: move stuff away from init.py (#33283)
* chore: Drop unused imports

* refactor: split translation utils from init.py

* refactor: move sendmail from init.py

* refactor: move prints to attach_print
2025-07-11 07:18:16 +00:00
Ankush Menat
a6b716acaa
test: reduce sanity test time (#33277)
Takes too long. Unlikely to break soon as this code is hardly modified.
2025-07-10 13:16:58 +00:00
Sagar Vora
406aae7432 chore: fix typo 2025-07-01 19:43:04 +05:30
Soham Kulkarni
0e46eb6228
fix: handle fraction units being zero (#33137)
* fix: handle fraction units being zero

* Revert "fix: handle fraction units being zero"

This reverts commit 912a031b16fb1e1951093d5b384976f4dc2968e6.

* fix: remove bad fallbacks from money_in_words

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-07-01 11:56:42 +05:30
Sagar Vora
8b13971ab2 test: use contextmanager to set user 2025-06-27 14:51:26 +05:30
Sagar Vora
547bc6b7f5 test: fix test_if_owner_permission_on_delete 2025-06-27 14:47:03 +05:30
Sagar Vora
35581eb50b test: fix test for nested permission 2025-06-27 14:44:09 +05:30
Soham Kulkarni
e1aa789acf
Merge pull request #32971 from sokumon/newsletter-removal
refactor: seperate newsletter into app
2025-06-27 11:59:02 +05:30
Ankush Menat
1a1dc0a62c
fix: more bad migrations and sanity test (#33112)
* test: prevent unnecessary migrations

* fix: Avoid resyncing JSON repeatedly

* fix: Varchar not nullable defaults should be casted

* fix: force cast to float before

Bad default values cause it to break.
2025-06-26 10:31:55 +00:00
sokumon
2b8d21d483 fix: add utm utils back 2025-06-24 18:43:28 +05:30
sokumon
793bd6387f fix: global search text, remove hooks 2025-06-18 16:23:36 +05:30
sokumon
6be013804d fix: remove tests utils and workspace card 2025-06-18 16:23:36 +05:30
Faris Ansari
e6c939c606 fix: revert get_all change
get_all doesn't use get_query
2025-06-18 16:15:25 +05:30
Faris Ansari
ae3f216255 chore: update sql function usage 2025-06-18 16:15:25 +05:30
Faris Ansari
b2e081d076 chore: update sql function usage 2025-06-18 16:15:25 +05:30
Faris Ansari
f2a0724f9a feat: add back sql functions support with json syntax
```
fields=['user_type', {'COUNT': 'name', 'as': 'total'}]
fields=[{"IFNULL": ["first_name", "'Unknown'"], "as": "safe_name"}]
```
2025-06-18 16:15:25 +05:30
Faris Ansari
840e7991ce fix: dont allow partial backticks
- add tests
2025-06-18 16:14:32 +05:30
Faris Ansari
3f65806a0b fix: harden group by and order by inputs
- only field, link_field.field, child_field.field allowed
- dont allow backticks
- add permlevel check
- add tests
2025-06-18 16:10:52 +05:30
Faris Ansari
420e891d96 feat: remove support for sql functions in fields 2025-06-18 16:10:52 +05:30
Faris Ansari
9a84f20436 feat: add support for nested AND and OR conditions 2025-06-18 16:10:52 +05:30
Faris Ansari
b2a37f86b3 fix: filtering should only be allowed on permitted fields 2025-06-18 16:00:22 +05:30
Faris Ansari
f77a940582 fix: check permlevel for fields like "link_field.fieldname" 2025-06-18 16:00:22 +05:30
Faris Ansari
63afc0601b fix: restrict child table access if user has only "select" on parent 2025-06-18 16:00:22 +05:30
Faris Ansari
a9fb29fb8e test: test for invalid inputs in fields, filters, group_by, order_by
- comment out invalid tests
2025-06-18 16:00:22 +05:30
Faris Ansari
39a65a1300 test: enable server script temporarily 2025-06-18 15:56:11 +05:30
Faris Ansari
601df8268f test: simpler assertions 2025-06-18 15:56:11 +05:30
Faris Ansari
a94c143314 fix: add support for permission query conditions 2025-06-18 15:56:11 +05:30
Faris Ansari
3ab0e8756f test: mandatory field 2025-06-18 15:56:11 +05:30
Faris Ansari
f3af0c582c test: fix test_api_v2 2025-06-18 15:56:11 +05:30
Faris Ansari
ccca6bffab test: add permissions tests for qb.get_query 2025-06-18 15:56:11 +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