What is the good practice to create custom fileds?
- Fixtures
- Manual coding after_install - create_custom_fields()
From all tutorial, when create new custom fields, it is recommended to use export-fixtures. But when come to all good modules we saw, either from erpnext or else, nobody is using fixtures, i.e., erpnext_germany/erpnext_germany/install.py at version-15 · alyf-de/erpnext_germany · GitHub
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.
What are your best practices?