Yea, you’re right.
But in this case the problem is that I want to collect all custom fields belonging to a particular app.
These can create fields in various standard/custom doctypes. So the doctype in this case gives no clue to which app the custom field or script belongs.
Actually I think this would be a very helpful extension for the Core function (similar to doctype module field).
Here an example:
|__ custom_field “field_A” in “Purchase Order”
|__ custom_script to evaluate in Purchase Order
|__ custom_field “field_B” in “Purchase Order”
When I now call "bench --site app1.site export-fixtures
All custom_fields (from App1 AND App2) will be exported to App1, because in the hooks.py I cannot distinguish which custom_field belongs to App1 or not. The doctype is the same.
When I deploy App1 on a production server, all custom_fields will be deployed there: field_A and fieldB. Even though field_B is not related to App1.