* 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>
* fix(meta): ensure that `insert_after` is always considered when sorting fields
* test: add nosemgrep to comment
Co-authored-by: Dany Roberts <danyrt@wahni.com>
* Revert "fix: drop Meta cache during update (#18182)"
This reverts commit 656f6df257.
* fix: replace meta cache keys
Old keys stored different types of data `dict` changing key to indicate
change in type.
### BREAKING CHANGE
#### Datetime, Date and Time fields will always be cast to respective objects in `setattr`, this will ensure uniformity while accessing the values, no more `getdate`, `get_datetime`, `to_timedelta` wrapper.
- While importing data, the framework does check for `set_only_once`.
- In normal case scenarios, this will work flawlessly since most date fields might not be set_only_once.
- But in Subscription, the date field is set to `set_only_once` and in `after_insert`, `document.save` is called, and while doing so, `set_only_once` is checked [here](1944a547f9/frappe/model/document.py (L566)).
-This works fine if the data imported is in the correct format.
- If the date's data is not in the correct format, the framework throws an error.
- for eg `06-02-2022 00:00:00 != 06-02-2022`
- fixes [Issue/#15370](https://github.com/frappe/frappe/issues/15370)
> no-docs
* chore: warn about missing scheduler / doc events
* fix: pass list instead of filter
filter can only be iterated upon once
* refactor: many typehints in __init__.py
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
* fix(model)!: Match labels in meta & model
Labels for fields have been inconsistent. In standard filters, doc.name
would be labelled as "Name" while it's "ID" in the edit filters option.
Similarly for other fields, the same view will address the same fields
differently. This PR aims to get rid of such inconsistencies.
Changes:
* [model] Change label ID for name to 'Name'
* [meta] Match labels of owner, modified, modified_by
* [meta] Add labels for more fields - from model.js
* fix!: get_label to fetch labels as Desk does
* fix!(label): Refer to name field as 'ID' over 'Name'
* test: Use 'ID' label instead of 'Name'
refactor: fetching transaction list
refactor: get default naming series
refactor: simplify naming series option scrubbing
fix: remove dead code related to insert series
This code is dead in many ways
- Creates map but it's never evaluated, so it doesn't actually run :D
- Just randomly splits naming series parts to create prefix... makes no
sense.
fix: deduplicate prefix list