Commit graph

686 commits

Author SHA1 Message Date
Ankush Menat
c7e5afee6a refactor: Use arr.includes(item) instead of in_list(arr, item) 2023-12-27 19:33:13 +05:30
Akhil Narang
178b699466
Merge pull request #23432 from marination/doc-connections
fix: Treat Document Links entries as all non-std fields
2023-12-19 16:05:58 +05:30
Akhil Narang
e38b5e04f8
fix(test_customize_form): drop checking of flags.update_db
The value changed is being checked directly
Checking the flag breaks if this or a similar test is run multiple times on the same database

Also extract 255 into a separate variable

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-12-19 15:50:13 +05:30
Corentin Flr
4f809630c5
fix: Set sort_order to DESC if sort_field is modified (#23697)
Global search and replace operation, including single doctypes where it does not really matter.
2023-12-13 09:52:14 +05:30
Ankush Menat
7edb80bf5c
fix: correct error message (#23746)
[skip ci]
2023-12-12 14:49:37 +05:30
barredterra
35d6e70382 feat: add sender_name_field 2023-12-01 18:39:39 +01:00
Raffael Meyer
7e08f003b3
fix: translate customize form (german) (#23497)
* fix: show translated doctype names

* fix: german translations for customize form
2023-11-30 00:18:52 +05:30
Corentin Flr
82623e5977
chore(translations): Remove extra space at end of line
When editing translation CSV manually in a text editor, one does not always disable the "trim trailing whitespace" feature. This can lead to mis-translations and duplications (when using `bench get-untranslated`).
2023-11-27 12:17:27 +01:00
Shariq Ansari
584d43aea5 fix: change tab to form if doctype is set in customize form 2023-11-16 11:40:40 +05:30
Shariq Ansari
3341333a3a fix: combined details and settings tab in customize form 2023-11-16 11:40:04 +05:30
RitvikSardana
0c4245634f
feat: Apply Filters to Link Fields Via Form Builder (#22844)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2023-11-15 11:34:19 +05:30
Shariq Ansari
bce95096f6 chore: show fields table in customize form 2023-11-07 19:28:00 +05:30
Shariq Ansari
441e115493 chore: hide fields table in customize form 2023-10-31 02:05:55 +05:30
Sagar Vora
f08f128b1c fix: improve label and description for fetch_if_empty 2023-10-26 15:02:03 +05:30
Maharshi Patel
bbf91b8afc
fix: sync doctype layout on update standard field (#22699)
* fix: sync doctype layout on update standard field

When standard field is deleted & it is not updated in the doctype layout,
Error occurs as it will try to render fields that doesn't exist
and layout won't render.

to fix this, sync doctype layout on update standard field

* refactor: use savepoint decorator

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-10-16 12:19:17 +05:30
Ankush Menat
0d5f28d569 feat: rename custom field 2023-09-25 12:25:28 +05:30
Ankush Menat
9436c14265 chore: treat background submit as beta feature 2023-08-31 11:59:40 +05:30
Ankush Menat
dc8d7b019a refactor!: Lower roles from All To Desk User 2023-08-29 12:07:57 +05:30
Shariq Ansari
ac775c0e68 fix: removed duplicate doctype_properties from customize form 2023-08-16 13:46:52 +05:30
mergify[bot]
fd10ab25cc
Merge pull request #22003 from gavindsouza/refactor-doc-bits
refactor: Use single query to delete child rows on doc.save
2023-08-11 06:45:07 +00:00
Gavin D'souza
84f134a683
fix: Add "better" typing hints 2023-08-11 11:45:47 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
Ankush Menat
927cd647e4 chore: generate type annotations 2023-07-24 15:32:48 +05:30
Shariq Ansari
d423dedcd3
Merge pull request #21377 from shariquerik/move-form-builder-in-doctype-form 2023-07-16 14:38:08 +05:30
Shariq Ansari
4763dd5293 fix: show fields table for fallback also in customize form 2023-07-16 13:26:12 +05:30
Shariq Ansari
b3333b803c fix: throw error and store save if validation fails 2023-07-16 13:24:24 +05:30
Ankush Menat
b5409f6f07 chore: remove eslint-disable* 2023-07-14 15:41:20 +05:30
Ankush Menat
58cf770760 fix: All ESLint errors 2023-07-14 15:25:48 +05:30
Shariq Ansari
6d912c934b fix: update customize form fields before save 2023-07-12 12:48:31 +05:30
Shariq Ansari
71edb99f5c fix: remove validate fieldname with restricted fieldnames logic
since every new custom field is now prepended with 'custom_'
2023-07-12 12:47:37 +05:30
Shariq Ansari
8efb611339 fix: render form builder on refresh not on change of doc_type 2023-07-12 12:43:44 +05:30
Shariq Ansari
ad4aaf7ae0 fix: load customize form doc_type instead of name 2023-07-12 12:42:38 +05:30
Shariq Ansari
64225bb909 fix: remove render form builder message 2023-07-12 12:40:54 +05:30
Shariq Ansari
a62fce498c fix: render form builder in html field in customize form 2023-07-10 19:22:24 +05:30
Ankush Menat
d0ba31c911
refactor!: Prefix all custom fieldnames created from Desk (#21355)
* fix: actualy remove special characterso

`or "_"` is always truthy, this code didn't do anything

* refactor!: Prefix all custom fieldnames created from Desk

 Why?
 - Custom and standard field clashes are frequent. This will prevent it
   from happening. E.g. recent `incoterm` field addition in ERPNext.
 - Apps/fixtures can still specify exact fieldnames

* test: custom field naming
2023-06-19 18:22:36 +05:30
Sagar Vora
fb438f342d
fix: clean insert_after setters when resetting layout (#21346) 2023-06-13 10:42:57 +05:30
Sagar Vora
113d271af7 chore(UX): reorder customize form actions (+ one rename) 2023-06-13 02:12:48 +05:30
Sagar Vora
0c72130ae6
fix: set confirm_action instead of reject_action for Reset Layout button (#21345) 2023-06-13 01:52:02 +05:30
Raffael Meyer
574ebf0f12
Merge branch 'develop' into sort-options 2023-06-12 11:19:32 +02:00
Sagar Vora
15ce89fb72
fix: minor improvements to CustomizeForm.reset_layout (#21296) 2023-06-09 10:40:05 +05:30
Ankush Menat
6188d1476e fix: correct method for layout reset 2023-06-09 10:02:43 +05:30
barredterra
6a22be0739 feat: enable "Sort Options" for Type field 2023-06-08 19:08:55 +02:00
barredterra
49ccc0ab6e feat: make option sorting configurable 2023-06-08 18:55:53 +02:00
Ankush Menat
e98519211e
feat: let people reset layout back to original (#21290) 2023-06-08 18:07:12 +05:30
Devin Slauenwhite
19d211f1d2
feat: rearranging standard fields in customize form (#19822)
* feat: rearranging standing fields

* fix: fixed creation of property setter

* refactor: renamed setup_sortable

* fix: loading field_order property

* refactor: removed redundant db call

* fix: field_order not found

* test: Added tests for field order in customize form

* refactor: better naming

* refactor: simplified logic

* feat: Updating field order on custom field creation

* feat: Added support for custom fiels

* refactor: moving to meta

* refactor: changed property type to json

* fix: new standard field insert order.

* fix: don't modify insert_after of system generated custom fields.

# This is because system generated fields are to be treated as standard fields. If the user restores the form to default, this value will be used to reset the original position.

# The new position of form fields are stored in the field_order Property Setter.

* fix: treat system generated fields as standard fields when sorting.

* revert: check for is_system_generated

* Revert "fix: new standard field insert order."

This reverts commit 6cdbe42f28d5944165dd100a9bb9172463951fda.

* fix: prioritize field_order over insert_after.

# Use insert_after as fallback in event the field doesn't exist in field_order

* fix(test): delete existing custom field

* fix: order of standard fields without field_order property.

* Revert "Revert "fix: new standard field insert order.""

This reverts commit c830f1ba2fe1e602b09c11a897869d9992097c1e.

* test: field order of newly migrated standard fields.

* fix(test): clear test_standard_field from previous test run.

* fix: sort with insert_after for system generated fields.

* fix(test): reset standard field creation before re-run and after successful test.

* fix: insert_after position should be + 1

* chore: remove debug statement

* test: system generated customized fields

* chore: remove print

* chore: lint all

* fix: show quick link to Table MultiSelect DocTypes

* refactor: change backend implementation of `CustomizeForm` and `Meta`

* test: simplify tests

* fix: rename `idx` to `index` for clarity

* perf: define `existing_fields` conditionally

---------

Co-authored-by: Aradhya <aradhyatripathi51@gmail.com>
Co-authored-by: Aradhya Tripathi <67282231+Aradhya-Tripathi@users.noreply.github.com>
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2023-06-08 17:14:44 +05:30
Ankush Menat
6717b07ab9 perf(customize_form): rebuild global search in bg 2023-06-03 22:28:35 +05:30
Ankush Menat
4104e7d733
feat: show db table utilization on doctype (#21193)
* feat: show db table utilization on doctype

* fix: nicer error message with docs
2023-05-31 16:28:44 +05:30
Nabin Hait
af7502bba7
refactor: Workspace cleanup (#21100)
* refactor: Workspace cleanup

* fix: Resolved conflict
2023-05-26 14:42:31 +05:30
Shariq Ansari
d35a5b4c81 chore: Use Form Builder banner on fields sections on customize form 2023-05-15 16:06:41 +05:30
Ankush Menat
0125af1e3e fix: clear cache on delete of prop setters 2023-04-19 17:17:27 +05:30