After develop with ERPNext for a while, personally I also find fixtures error prone when working in team, and it is also hard to track changes as it always mess up.
The fixtures is it is always run on migration, sometime good sometime not desirable. I am not sure if there is way to prevent it form always updating.
But to create custom fields on after_install by coding, is also not very good as development proceeds IMHO. otherwise, as we have more custom fields, do we need to use patches? For me, not very good DX.
So, in this thread, I would like to find the best practice on how experiended developers is doing.
For me:
Modules, i.e., to be in marketplace - avoid using export-fixtures
Module for customer project - it is ok to use exort-fixtures
Note: In my first project, I was also using Export Customizations and that is totally horrible when come to team development.
I would suggest you go with the third one if you don’t have many fields; otherwise, go with the first one. I have many custom fields, so I am using the first one because it is better compared to the second option.
Because it will export any custom fields created for any apps altogether. So it made possible that it will update things (not done by you) unintentionally and super hard to keep track.
export-fuxture is the same thing but you can specify what to export.
But as I say create it by create_custom_fields() is best for full control but need some learning curve.
if i was using fixtures how can i add multiple property setters, like if i give
fixtures = [{
“doctype”: “Property Setter”,
filers = [ ‘doctype1’ ]
},
{
“doctype”: “Property Setter”,
filers = [ 'doctype2 ]
},
]
This one doesnt work for me even though this is the recommended way the doctype 2 overwirtes on doctype1, could you help me if you know how to add more that 1 property setter without overwritting