Fixtures: How to do it?

Someone can give me an example how can i use this?


fixtures are used when you need to install your custom_fields / custom script etc. You can mention the fixtures in your app’s then export the fixtures using bench export-fixtures

But this custom_fields are the fields that i create in doctypes of erpnext?

fields created/added in the doctype directly can not be exported, create the custom fields from Custom Field or from Customize Form.

Im thinking about it…
I need create some custom fields to my customer in purchase invoice doctype for example, but i want do this by script, so when i install my app in another customer, this fields will be installed too.
It’s possible do that?


"Purchase Invoice" = custom_fields {[fieldname: 'custom_field1', type: 'link', options: 'DocType', depends: 'eval: in_list blablabla'],
            [fieldname: 'custom_field2', type: 'data', options: ' ', depends: ' ']