Custom Reports in ERPNext

Hi Everyone,

Can anybody explain these points.

  1. Point number 4 in the below link:
    Not Found
    As I have no idea about it.

  2. It is written in the above link, that developer mode should be on but I am using --setup production then it is not recommended that I put the developer_mode on.

  3. What is the difference between --setup production and without --setup production.

  4. If developer mode on is not recommended in --setup production then what is the way to put developer mode on and how to manage the stuff.

Regards
Ruchin Sharma

in the install script if you pass --setup production the script will do the necessary config for production environment. ( It installs erpnext, and configures supervisor and nginx server) I don’t think that can be a problem with turning on development mode. But ideally --setup production means you want the instance for your production purpose and it is not recommended to do developments on your live instance.

Thanks @neilLasrado but what is the work-around of it.
As I want to develop custom reports (Scrip Reports)

https://frappe.io/help/how-to/script-report

And in the below link it is clearly written that developer mode should be on.

Also, please see the below link, it is written in point 4.

  1. Set Report Type as “Script Report”
  2. Set “Is Standard” as “Yes”
  3. Select the Module in which you want to add this report
  4. In the module folder (for example if it is Accounts in ERPnext the folder will be
    erpnext/accounts/report/[report-name]) you will see that templates for the report files will be created.
  5. In the .js file, you can set filters for the reports
  6. In the .py file, you can write the script that will generate the report

That once you follow these steps a new template will be created but it didn’t create for me. Can anyone tell what could be the reason.

@ruchin is your developer_mode 1 ?
that might be the reason. I would recommend you to create a new app and do customizations there.

got it, correct me if I am wrong developer mode is different for each app.

No, you can mention it for each individual site. You can also use specify in a common file called sites/common_site_config.json

Yes, you are right.
Thanks Nabin