If you want to add the code to your custom app then You have to set the standard = “Yes”
Step:
- Set Report Type as “Script Report”
- Set “Is Standard” as “Yes”
- Select the Module in which you want to add this report
- 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. - Write your python script in the generated
{report-name}.pyfile. - You can add filters to your report by adding them to
{report-name}.js
Please check the second video.