-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Export Custom field using export fixtures
Saurabh edited this page May 7, 2018
·
5 revisions
Hello, community, You can add the custom field using two approaches one is using make_custom_field() function or other is using fixtures. If you added a custom field to the standard module using customize the form. It will remain to that local or cloud instance if you want to use these changes on other instance when you use csv or use the backup to restore changes but you can create a custom app. In custom app hooks.py add the following line
fixtures = [{"dt": "Custom Field", "filters":[["name", "in", ['Sales Invoice-section_break_20',
'Sales Invoice-delivery_note', 'Sales Invoice-supplier_ref', 'Sales Invoice-buyers_order_no', 'Sales Invoice-despatch_document_no', 'Sales Invoice-despatched_through', 'Sales Invoice-country', 'Sales Invoice-delivery_note_date', 'Sales Invoice-other_references',
'Sales Invoice-terms_of_delivery', 'Sales Invoice-column_break_28',
'Sales Invoice-buyers_order_date', 'Sales Invoice-mode_terms_of_payment'
'Sales Invoice-destination', 'Sales Invoice-e_way_bill']]]},
{"dt": "Print Format", "filters": [["name", "in", ["challan_cum_tax_invoice"]]]}]
In custom filed 'Doctype-custom_doc_field' after that try bench --site site_name export-fixtures It will create fixture table in your custom app so that you can easily installed on another environment or other instance without taking csv of customize form.