Hi, I am trying to figure out the best way to export changes made in existing ERPNext app, DocTypes, forms etc and import to staging/production system. I have been some discussion around make a repo fork and pull from the other system. What’s the best way to export changes made in DocTypes and pull into the production system? This includes new roles added, new users and other form changes etc…
Thanks
Hello,
You may want to take a look at the fixtures that can be found under hooks.py .
https://frappeframework.com/docs/user/en/python-api/hooks#fixtures
Regards,
Ivan
FHenry
August 16, 2021, 5:07pm
3
to export custom field that are not deleted on “bench update” or “bench migrate” and property setters (almost all other stuff than customs field)
in hook.py file add
fixtures = [
{
"dt": ("Custom Field"),
"filters": [["name", "in", (
"Item Price-customer_name",
"Item Price-supplier_name",
"Customer-shipping_conditions",
"Sales Invoice-shipping_conditions",
"Sales Invoice-transporter",
"Sales Invoice-transporter_name",
"Sales Invoice-num_tracking",
"Sales Order-transporter",
"Sales Order-transporter_name",
"Delivery Note-shipping_conditions",
"Work Order-customer_name",
"Job Card-customer_name",
)]
]
},
{
"dt": ("Property Setter"),
"or_filters": [["name", "in", ('Quotation-default_print_format',
'Sales Order-default_print_format',
'Item-max_attachments',
'Delivery Note-transporter_name-fetch_from',
'Work Order-item_name-depends_on',
'Work Order-item_name-fetch_from',
'Delivery Note-lr_no-hidden',
'Sales Invoice-naming_series-default')],
["property", "in", ("in_list_view","in_standard_filter")],
],
},
]
in bench
bench --site *devsite.dev* export-fixtures
and when you want to deploy in your production environrenemnt after install customapp
bench update --no-backup