New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rearranging standard fields in customize form #19822
Conversation
…nto customize_form
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #19822 +/- ##
===========================================
+ Coverage 63.87% 64.00% +0.12%
===========================================
Files 761 759 -2
Lines 68844 68755 -89
Branches 6224 6200 -24
===========================================
+ Hits 43977 44007 +30
+ Misses 21320 21256 -64
+ Partials 3547 3492 -55
Flags with carried forward coverage won't be shown. Click here to find out more. |
This comment was marked as outdated.
This comment was marked as outdated.
I can offer to help with documentation if needed, would be great to see this implemented. |
@pmjd-code Thank you, I think we better wait until code changes are approved before writing documentation. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
The Form Builder is great and this feature would really help in customising apps. |
I will complete the remaining TODOs over the weekend and merge this. If anyone has inputs on the additional implementation points above, they'd be greatly appreciated. |
I haven't been able to get this done. Some other projects that are more critical are taking longer. I don't have a new ETA as of now. |
@sagarvora I understand. Thank you for the update and all of the hard work from you and @dj12djdjs on this. If it is only the 4 files listed on thir PR needed to implement, I will probably try and add them in my own install so I can customise my installation of ERPnext more easily. Thanks |
@dj12djdjs @sagarvora this feels okay for first cut. Whatever the caveats maybe, all those exist for current code too. Few things we can add maybe is:
|
support for form builder added via #21297 |
continuation of: #19452
Customize Form now supports reordering all fields (including "standard" ones) 🎉
Implementation
A new property setter called
field_order
has been introduced. Whenmeta.sort_fields
is called following is done:If field order exists:
In case new fields are present in doctype, but aren't in cleaned field order:
insert_after
for custom fields (same as before)insert_after
for standard fields (this is currently done based on the DocType's fields table)Additional implementation (if reviewer requests it)
field_order
(if no standard fields found) by enqueue-ing a DB callcc: @ankush @surajshetty3416
TODO (after initial review)
To be backported together with #20168