Currently, the core function frappe.get_list / frappe.get_all is a high level API to wrap raw SQL call to the database, which is extensively used by the list view and reports, there is already special logic to directly allow filtering by child table field, e.g filtering sales order by item_code field in items child table, we can use filtering arguments like this: filters={‘item_code’:‘xxx’}, it is also possible to fetch child table fields by either use the argument with_childnames or directly add full child table name as prefix in fields arguments, e.g fields=[‘tabSales Order Item
.item_code’].
but there are following limitations
- does not support sub fields from link table
- does not support multi level link/child table sub fields
after the enhancement, we can now use the get_list like below:
What is the benefit and typical use case of this new enhancement?
List and report views’ personalized layout
use case: in sales order list view, currently we have only one default fixed version of the list layout(fields shown), there fields are from the main doctype Sales Order table only, different users handling different types of sales orders may need to see very different set of data (fields), e.g some fields may relevant only for maintenance orders, but not for trading orders, vise versa it is true for other trading relevant fields, by design to eliminate duplicate data, some important data may only exist in relevant linked table, for example customer group or user’s mail and telephone etc, anyway for each list view, if system allow end user to easily define and save his/her own version of the layout by choosing and arrange the fields(including fields from link/child table) per each business scenario, also allows him/her to switch to different layout on the fly, then it will further improve the user experience
this is exactly how SAP works for list view and reports, in SAP’s term it is ALV: active list viewer.
https://github.com/frappe/datatable/issues/44
Any idea and comments?
can this be a foundation supported project?