Fixtures...don't know what it is

Thanks! I’m glad this helped you!

Good followup reading unless there is another technique

1 Like

Hi I’m trying to export custom field, custom script, server script regarding my custom doctype

In my in the custom app folder, I tried using
fixtures = ["Sample Doctype"]
I also tried using
fixtures = ["Custom Script","Custom Field"]
only data, custom script get exported. No custom field and server script get exported.

I’m using erpnext 12.3.1, frappe 12.1.0

Did you also run bench export-fixtures?

Hi @auliabismar
Try this format in

fixtures = [“Workflow”,“Workflow State”,“Print Format”,“Notification”,“Workflow Action Master”,
{“dt”: “Custom Field”,
“filters”: [
“name”, “in”, [“Purchase Order-registration_type”,
“Purchase Order-mode_of_transport”,
“Purchase Order-supplier_gstin”,
“Purchase Order-place_of_supply”,
“Purchase Order-company_gstin”,
“Purchase Order-remarks”,
“Purchase Order-authorised_signatory”,
“Sales Order-remarks”,
“Sales Invoice-authorised_signatory”,
“Sales Invoice-remarks”,
“Purchase Receipt-authorised_signatory”,
“Purchase Receipt-mode_of_transport”,
“Delivery Note-authorised_signatory”,
{“dt”: “Notification”,
“filters”: [
“is_standard != 1”

after that use this command
bench --site [sitename] export-fixtures

You can check it out this links

1 Like

How is fixture priority handled.
If two apps were to modify the same DocType and the same field (for instance Address type, modifiy the options list), which fixture from which app would be migrated/have priority?

the app in the apps.txt?

Need help in fixtures. Whats is property setter ? Can anyone provide example

1 Like

Using fixtures you can export doctype settings, custom fields, custom scripts etc that you made in one site then put it in a custom app. If you install this app to another site then you can apply those fixtures

To export fixtures bench --site site1 export-fixtures

thanks @jof2jc.
The problem i am being facing is in customize form.
So “bench export-fixtures” works for custom-field and custom-script. But there is a field in customize form “Default Print Format”. I have set the value to ‘foo-bar’. So export-fixtures should keep the track of this field right ?
If Yes, then how ?
If No then how can i maintain it.

Thank you very much for support, I just want to ask if I have the ability to exclude a couple of fields from the fixtures.

e.g. ["Web Page-main_content", "Web Page-javascript", "Web Page-css"]

What I want to achieve is to version control the website module.