Script Report Not Appearing in Standard Reports List

400 views
Skip to first unread message

Javier Wong

unread,
Sep 3, 2014, 4:07:54 AM9/3/14
to erpnext-dev...@googlegroups.com
Dear Experts,

I created a custom report via the report list. Here are its properties:
- Ref DocType: Sales Invoie
- Is Standard: Yes
- Report Type: Script Report
- Module: Selling

The report works and I confirmed this through viewing the report via the report listing "Show Report" button. The problem I have is the link to the report does not appear through Selling -> Standard Reports.

Is there something I am missing to enable it to be visible in the Standard Reports list?

Thank you.


Javier

Anand Doshi

unread,
Sep 3, 2014, 5:23:10 AM9/3/14
to ERPNext Developer's Forum
If you are making a report as part of a separate frappe-app, you should set the module to be one of your app's module, else the system will create a file in erpnext's selling module, which will cause conflict when you pull future updates.

You will need to manually add it to the module's page. See: https://github.com/frappe/erpnext/blob/develop/erpnext/config/accounts.py#L225

-Anand.


--
Note:
 
If you are posting an issue,
 
1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/981cab84-a3ab-4418-928f-fc94ab5f196a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Javier Wong

unread,
Sep 3, 2014, 5:31:39 AM9/3/14
to erpnext-dev...@googlegroups.com
Dear Anand,

I actually do not want to make it part of a separate frappe-app. I just want to publish the link to this particular report from ERPNext itself. In fact, I wouldn't mind for it to be in the custom reports section. However based on articles that I have read, it seems that Script Reports cannot be a non-standard report - do correct me if I am wrong.

Anyway just to publish it using standard options or features? I do not want it to cause conflicts when updating the apps. Thanks.


Javier
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

Anand Doshi

unread,
Sep 3, 2014, 5:49:47 AM9/3/14
to ERPNext Developer's Forum
Hi Javier,

It would be better if you share what you are making. If it is generic enough, we could put it in the standard product.

If you are customizing, making a frappe-app is the way to go.

-Anand.


To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b77c0341-d788-44b2-9e3d-90474915e085%40googlegroups.com.

Javier Wong

unread,
Sep 4, 2014, 3:53:17 AM9/4/14
to erpnext-dev...@googlegroups.com
Definitely... Please see attachment.

Ok let me try my best to explain what I am trying to achieve here.

I am trying to create a "Debtors Aging Report". This report basically is just a different view of the existing "Account Receivables" report which is available currently in the Accounts module. Just one key difference - the Accounts Receivable report displays each open Sales Invoice in a separate row whereas the Debtors Aging Report which I am trying to create will sum all the Sales Invoices and display just a single row per customer. I don't have any python knowledge so instead of manipulating the .py files I decided to just work on the printing output.

So what did I do:
1) I copied the .py files from the Account Receivables report
2) I made minimal changes to the .py files just to change the name of the report and nothing else
3) I created a html printing template file (please see the attachment) that does the work of sum-ing up the values etc.
4) So far I am happy with the results and the output although... obviously I would be even happier if I could have done it on the python files instead so as to be able to see the output on the ERPNext screen (where I can manipulate the filtering, sorting etc.) versus just seeing the printing output
5) I am now trying to publish this report in the "Selling" module instead of the "Accounts" module so that specific users can view but i can't seem to work out how to publish it

Will require some of your wisdom for this Anand...

Thank you once again. You guys have been super helpful.


Javier
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsubscr...@googlegroups.com.

--
Note:
 
If you are posting an issue,
 
1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.
debtors_aging.zip

Rushabh Mehta

unread,
Sep 4, 2014, 5:19:13 AM9/4/14
to erpnext-dev...@googlegroups.com
Javier,

Great - here is what you need to do.

1. Fork ERPNext
2. In your bench add a new git remote for your fork
2.1 Update the latest version
2.3 Create a new git branch
3. In your site_config.json add "developer_mode": 1
4. Login as "Administrator" and create a new report "Debtors Ageing Report" (check the spelling!)
5. Add the py and js files in the new folder that will automatically come up in the "accounts" folder
6. Add the link to config/accounts.py
7. Push to your branch
8. Got to your for on github.com and click on "New Pull Request"

We will be happy to help you / add your contribution to the project.
 
best,
Rushabh


@rushabh_mehta

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/39695626-dbbd-473a-ad47-260687210e8e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
<debtors_aging.zip>

Reply all
Reply to author
Forward
0 new messages