Export Fixtures

Hi,

I am trying to make a custom app to import some customisations.
I can’t find a way to export-import the following customisations

  1. Sales Taxes and Charges
  2. Naming Series Prefix
  3. Default Print Format for Sales Invoice - Sales Order - Delivery Note

Can you please share what customization is done, and how? Perhaps it’s includes in the backup itself.

Hi umair,

I made customisations to different things like
Custom field, Custom Scripts, New Print formats etc
In the beginning I tried to export-fixtures all of them, but for some reason in Sales Invoice, Sales Order, Payment Entry, export data and not the customisations I made in doctype.
So then I tried to export customisation from web gui and put them all together in a folder called custom inside my app, but nothing change when install my app.

Hello @georman - What are you using for version control? Git? It sounds like the problem might be in your install process; can you walk us through your steps there?

Use Bitbacket and always make one way installation
I made all my changes to a developer mode erpnext container and export-fixtures inside erpnext/hooks.py
fixtures = [ “Custom Field”,
“Custom Script”,
“Customer”,
“Sales Order”,
“Sales Invoice”,
“Print Format”,
“Payment Entry”,
“Letter Head”,
“Naming Series”,
“Email Account”,
“Role Profile”,
“Notification Control”,
“Translation”]

Manually copied fixtures folder inside my app and add the same fixtures in my app/hooks.py

2 Likes

This is a different flow that the one I’ve used successfully.
I will export customizations to custom_app.
Then add the add the fixtures assignment (yours looks fine, but consider filtering) to the hooks.py of custom_app.
Then I push to github/gitlab/bitbucket via git.
Then I’ll run the bench get-app command.

Where my team runs into trouble is that changes don’t get pushed to the remote correctly, because git isn’t exactly easy or beginner friendly. This should be easy enough to verify in the web GUI of github/gitlab/bitbucket.

Hope that helps.

I tried to export-fixture rarely and make the most changes to custom app source code direct.
But I can’t find how to change default values for i.e. sales order prefix from SO to be PO the same for sales taxes the default is 23 and I want to be 24 and set the default print formats for doctype like sales order or sales invoice.
I mean by custom app and not manualy.

Try this:
https://erpnext.org/docs/user/manual/en/setting-up/settings/naming-series

I mean by custom app and not manually from web gui!

2 Likes