Commit graph

739 commits

Author SHA1 Message Date
Ritvik Sardana
b3afe4f4f1 chore: rename email account field 2025-07-19 12:26:36 +05:30
Ritvik Sardana
daf8f55458 feat: auto append email account to the document 2025-07-19 11:59:10 +05:30
Ankush Menat
8088bd3891
chore: Drop empty UnitTestCases (#32867)
Next to zero adoption after introduction, just noise in codebase.

I don't see any point in arguing about purity of test cases when
existence and quality of test cases is usually the bigger problem.

Dropped using semgrep
2025-06-10 05:28:53 +00:00
barredterra
30eb14a7dd fix: add param is_system_generated=True to make_property_setter
Defaults to True so that it behaves the same way as `make_custom_field`.
2025-04-21 23:43:48 +02:00
Akhil Narang
94e575b5d0
fix(ci): pin smtp4dev (#32035)
* fix(ci): pin smtp4dev

New version seems to break something.
2025-04-08 13:55:46 +00:00
Sandeep Kakde
8fcd5d1cfa
feat: Adding option to trim custom tables (#31180)
* feat: Adding option to trim custom tables

* refactor: extracting trim_table to index.js from doctype.js & customize_form.js

* refactor: running pre-commit
2025-04-06 15:48:23 +00:00
Raffael Meyer
3f5da98b27
feat: protect attached files (#31855)
* feat: protect attached files

* fix: protection does not apply to draft documents

* chore: update descriptions

* feat: hide delete button when file is protected
2025-03-31 16:00:26 +02:00
Sagar Vora
9a0636bf91 perf: fetch existing fields beforehand 2025-03-08 14:28:19 +05:30
Sagar Vora
7503db4160 perf: restrict doctypes to update when creating custom fields 2025-03-08 14:13:23 +05:30
git-avc
17ea9e2a1c fix: let's customize grid_page_length 2025-02-21 20:21:37 +01:00
Ankush Menat
241eb095ce
perf: skip perm checking on property setters (#29031)
These are internal and never "back linked"
2025-01-02 16:39:21 +00:00
Ankush Menat
60bc472ab6
revert: restore JSON files (#28717)
* Revert: bring back JSON files

* chore: re-apply changes to new files

* chore: remove old TOML files

* chore: delete empty files
2024-12-09 08:41:56 +00:00
Akhil Narang
a073984926
Merge pull request #28660 from akurungadam/tab-ms-events
feat: add, before_remove and remove event triggers for Table MultiSelect
2024-12-04 16:06:43 +05:30
Anoop Kurungadam
07944b7181 feat: add option to add cscript for Table MultiSelect 2024-12-04 13:35:49 +05:30
Akhil Narang
84ef6ec677
refactor: fixup with ruff 0.8.1
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-04 13:18:04 +05:30
David Arnold
0204db6547
chore: move to use new test record api (#28105) 2024-10-12 23:13:41 +00:00
David Arnold
443c38daa9
refactor: toml test records for readability (#28065)
* refactor: toml test records for readability

* fix: maintain backwards compatibility

* refactor: transform in-tree records

* chore: don't use deprecated functions (treewide)

* chore: revert migration of tests which depend on old test records list

* feat: add cls.globalTestRecords on IntegrationTestCase
2024-10-10 13:24:02 +02:00
David Arnold
83bc1f09e9
refactor: clarify test record dep management in test modules (#28060) 2024-10-09 13:44:27 +00:00
David Arnold
c2c9d9062a
Testing Improvements 3 (#27995)
* feat: set doctype on test classes

* refactor: Transform `make_test_records` into a generator

* feat: lazy create doctype records on first use

* perf: improve file walker

* fix: submission queue test

* refactor: improve logging a bit

* fix: global records install for app (semifix)
2024-10-06 15:04:47 +00:00
David Arnold
c114e5fae8
refactor: unit vs integration treewide (#27992)
* refactor: constitute unit test case

* fix: docs and type hints

* refactor: mark presumed integration test cases explicitly

At time of writing, we now have at least two base test classes:

- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase

They load in their perspective priority queue during execution.

Probably more to come for more efficient queing and scheduling.

In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.

* feat: Move test-related functions from test_runner.py to tests/utils.py

* refactor: add bare UnitTestCase to all doctype tests

This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
2024-10-06 09:43:36 +00:00
David Arnold
6ab44a883b
Merge pull request #27870 from blaggacao/feat/custom-section-and-column-placement
feat: improve placement for custom field sections and columns
2024-09-30 13:11:11 +02:00
David
40025ec64f
fix: property setter for field ordering 2024-09-30 12:57:32 +02:00
Sumit Bhanushali
392a212b19
Merge pull request #27899 from frappe/perm_log
feat: perm log
2024-09-30 15:10:43 +05:30
Sumit Bhanushali
847dd62ec0 feat: permission log 2024-09-30 14:54:32 +05:30
Shariq Ansari
6aa37db9f4 feat: Added placeholder docfield, customize form field, and custom field 2024-09-28 21:11:46 +05:30
David
2de43f7797
feat: improve placement for custom field sections and columns 2024-09-26 12:54:30 +02:00
Kunhi
2596fb7a2f
fix: Unable to save JSON field type in the customize form. (#27472)
* fix: Unable to save JSON field type in the customize form

* fix: run pre-commit

* precommit, fix

* precommit, linter issue
2024-08-22 12:49:01 +05:30
Nabin Hait
e54274f290
chore: Deleted all the form tours (#27403) 2024-08-20 10:39:40 +05:30
Rushabh Mehta
37b7fa59b1 fix(styles): various styles and updates to workspaces 2024-08-19 12:06:55 +05:30
mergify[bot]
65ce529a04
fix: front-end bug in 'customize_form.js', triggered by delete actions on child-tables (#26344) (#26644)
* fix: Doctype Links not updating #26041
https://github.com/frappe/frappe/issues/26041

In refresh_field(fieldname, txt) function of grid_row.js, added the comments :-
    // the below if statement is added to factor in the exception when this.doc is undefined -
    // - after row removals via customize_form.js on links, actions and states child-tables
    if (this.doc)
            field.docname = this.doc.name;

* fix: Doctype Links not updating frappe#26041

In customize_form.js :-
defined parent and parenttype as local variables in the event functions for child tables links, actions and states

* Revert "In customize_form.js :-"

This reverts commit 6732f0aec4733490da46d7bd5cbedf239d13ec89.

* fix: Doctype Links not updating #26041

* style: amended spacing as per 'prettier' in precommit

* style: added comma after last event definitions in child doctype, as per 'prettier' in precommit

(cherry picked from commit b9f48455be10b40ab53375d7aef9fbaac644aea6)

Co-authored-by: Karan Wilson <48678570+karanwilson@users.noreply.github.com>
2024-06-03 12:25:14 +05:30
David Arnold
a99c4ff2b0
fix: don't sanitize defaults and options (#25939) 2024-04-15 17:39:48 +05:30
Ankush Menat
a0268f126f fix: Dry run and confirm before trimming tables 2024-04-12 10:55:47 +05:30
barredterra
9238f4649f feat(Customize Form): add "Trim Table" action 2024-04-11 19:07:32 +02:00
Ankush Menat
12a8e9e666 fix(DX): Warn about custom docperm behaviour 2024-04-11 18:26:30 +05:30
Akhil Narang
2bf0ab079a
feat(customize_form): allow setting creation as a default sort field (#25760)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-01 19:08:11 +05:30
Ankush Menat
dbcf7ad30c refactor: update usage of modified everywhere 2024-03-27 11:23:13 +05:30
Ankush Menat
3896296c6f fix: update sort order in doctypes 2024-03-27 11:18:28 +05:30
Ankush Menat
02fd017204 fix: allow transitioning to long text 2024-03-15 15:00:07 +05:30
Ankush Menat
166d28a4d3 fix: handle invalid fetch from split
Some users have manged to write fetch expr with 2 dots 🤷
2024-03-12 22:30:00 +05:30
Raffael Meyer
eecb31e8e8
Merge pull request #25285 from barredterra/custom-field-translatable-default 2024-03-11 11:39:50 +01:00
Ankush Menat
4f4a387b7e
fix(patch): Remove obviously invalid fetch from expressions (#25284) 2024-03-10 07:36:12 +00:00
barredterra
b26dcdc14f fix: do not mark custom field as translatable by default
This is a special feature that should be enabled explicitly. In DocField, it's already disabled by default.
2024-03-07 17:37:40 +01:00
Ankush Menat
b1a8bc9312
fix: Export None as type if select as no options (#25211)
Select options can be dynamic, in that case we should at least the
default value `None` as a value `DF.Literal` otherwise is invalid type
annotation.
2024-03-04 06:42:41 +00:00
Ankush Menat
af69dab130
fix(UX): reload form after renaming field (#25159) 2024-02-29 04:26:52 +00:00
Ankush Menat
dab06f33b1
fix: add show_dashboard field on custom fields (#24984)
closes https://github.com/frappe/frappe/issues/23637
2024-02-21 12:58:34 +00:00
Raffael Meyer
fc64e8a0fb
feat: pass doctype as context when translating label (#24903) 2024-02-18 19:42:15 +05:30
Ankush Menat
72c2207e0f refactor: useless use of dict in frappe.get_doc 2024-02-10 12:52:38 +05:30
Akhil Narang
26ae0f3460
fix: ruff fixes
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Indrajith.vs
0314502742
fix(Custom Field): Button Rename Fieldname visible before saving (#24712) 2024-02-03 12:40:50 +05:30