Doubt regarding exporting fixtures

Hi All ,

I added fixtures = ["Custom Script"] in hooks.py file for all my custom apps and ran bench export-fixtures , everything was fine . Now I do have custom script for erpnext standard apps so I added fixtures = ["Custom Script"] to hooks.py file located in
/home/erp/frappe-bench/apps/erpnext/erpnext . I got a web form instead of custom script in fixtures folder inside erpnext app . Could anyone guide me ? I do have custom script to all standard modules of erpnext .

Please help

Thanks

Hi not really sure if you can do that in ERPNext app. I believe you can have custom script for erpnext standard apps in your custom app. What are you trying to customize by the way?

1 Like

Thanks for the reply @johnskywalker . How to do this ? [quote=“johnskywalker, post:2, topic:17823”]
I believe you can have custom script for erpnext standard apps in your custom app
[/quote]

I have few custom fields in the erpnext standard apps , for which I have scripts .

Thanks .

you have to make your own app first bench new-app {app_name}
after that, you will install it and edit it’s hooks.py fixtures = [“Custom Script”]
and make sure you always do bench --site {site_name} export-fixtures

2 Likes

Thanks for reply @johnskywalker , this is what I have done to my custom apps , I am asking how to export fixtures for erpnext standard apps . Any help could be a life saver

Thanks

1 Like

You’re welcome :slight_smile:

2 Likes

Could anyone please let me know how to export fixtures for erpnext standard apps ?

I don’t think it is possible. But the fixtures that you made in standard apps will be applied, you just have to create your app first.

To export ‘multiple’ fixtures, this syntax in hooks.py works for me:

    fixtures = [{
	"doctype": "DocType",
            "filters": { "custom" : ["=", "1"] }
           }, 
    	"Custom Field",
    	"Custom Script",
    	"Property Setter",
            "Print Format"
       ]

The above you will find here Error installing custom app having ERPNext custom Doctype in fixtures

edit: Note these latest notes Fixtures...don't know what it is - #19 by Tropicalrambler

8 Likes

@clarkej . Thank you so much for the help . I will try