Add new file format in erpnext

A great question!

To add a new file format in ERPNext, you'll need to follow these steps:

Step 1: Create a new file format

  1. Go to the ERPNext dashboard and click on "Setup" > "File Formats".
  2. Click on the "New File Format" button.
  3. Fill in the required information:
    • name: Give a name to your new file format (e.g., "My New Format").
    • description: Add a brief description of your new file format.
    • file_extension: Enter the file extension for your new file format (e.g., ".mynewformat").
  4. Click "Save" to create the new file format.

Step 2: Define the file format structure

  1. In the "File Formats" list, click on the three dots next to your new file format and select "Edit".
  2. In the "File Format Structure" section, define the structure of your new file format. This includes:
    • fields: Define the fields that will be used in your file format. You can add fields by clicking the "Add Field" button.
    • field_types: Define the data types for each field (e.g., text, integer, date).
    • field_order: Define the order in which the fields will appear in the file format.
  3. Click "Save" to save the file format structure.

Step 3: Create a file format template

  1. In the "File Formats" list, click on the three dots next to your new file format and select "Create Template".
  2. In the "File Format Template" section, define the template for your new file format. This includes:
    • template: Define the template for your file format using a template language (e.g., Jinja2).
    • fields: Define the fields that will be used in the template.
  3. Click "Save" to save the file format template.

Step 4: Test your new file format

  1. Create a new file using your new file format by clicking on "File" > "New" > "My New Format" (or the name you chose in Step 1).
  2. Fill in the required information and save the file.
  3. Verify that the file is saved correctly and that the data is formatted according to your new file format.

Step 5: Make your new file format available

  1. Go to the "File Formats" list and click on the three dots next to your new file format and select "Make Available".
  2. Your new file format is now available for use in ERPNext.

That's it! You have successfully added a new file format in ERPNext.