Need help with Script Reports

Hi,


I have just noticed that a lot is possible with the script reports which is not even possible with the query reports. Hence I would request some help to be provided on creating a script report.

This is what I have done till now:

  1. Created a script report Customer with SO in the system (Document = Customer)
  2. Now created a python file with the name “Customer with SO.py” (note I don’t have underscores)
  3. Now I had placed this py file in the reports folder and also under customer folder in the server
  4. But still I am getting this error 
[10:13:34.742] Traceback (innermost last):
  File “…/lib/webnotes/handler.py”, line 154, in handle
    execute_cmd(cmd)
  File “…/lib/webnotes/handler.py”, line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File “…/lib/webnotes/handler.py”, line 206, in call
    return fn(**newargs)
  File “…/lib/webnotes/widgets/query_report.py”, line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File “…/lib/webnotes/init.py”, line 357, in get_method
    import(modulename)
 ImportError: No module named customers_with_so.customers_with_so

Kindly let me know what is it that I am missing.



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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/E9H6nrrYXp4J.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Aditya,

Create the python file name with lowercase and underscores.

- Rushabh


On 07-May-2013, at 10:16 AM, Addy <ad...@rigpl.com> wrote:

Hi,

I have just noticed that a lot is possible with the script reports which is not even possible with the query reports. Hence I would request some help to be provided on creating a script report.

This is what I have done till now:

  1. Created a script report Customer with SO in the system (Document = Customer)
  2. Now created a python file with the name "Customer with SO.py" (note I don't have underscores)
  3. Now I had placed this py file in the reports folder and also under customer folder in the server
  4. But still I am getting this error 
[10:13:34.742] Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 154, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 206, in call
    return fn(**newargs)
  File "../lib/webnotes/widgets/query_report.py", line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File "../lib/webnotes/__init__.py", line 357, in get_method
    __import__(modulename)
 ImportError: No module named customers_with_so.customers_with_so

Kindly let me know what is it that I am missing.




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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/E9H6nrrYXp4J.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

It should be in the reports folder. See an existing report for more info.


On 07-May-2013, at 10:42 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi,


I am still struggling to get my first script report working. I have tried to understand the structure of the existing script reports and found that there are some files in the folder of the script report which I think are automatically created:
  • report_name.pyc
  • init.pyc
  • report_name.txt
  • report_name.js
  • init.py
Now what I have done:
  • Changed an existing report in the Accounts Module from Query to Script Report
  • Created a folder under the patch /var/www/sites/XXX/app/accounts/report/accounts_receivable_by_invoice
  • Created a python file with the same name accounts_receivable_by_invoice
  • Check the report and I got the same error as the one that I have pointed in the first post which is posted below as well.
  • Now the error suggests that my report points towards the wrong module infact it should be pointing towards the module Accounts but somehow it is  taking the report name as the module name.
Honestly, I have tried my level best to understand the script report but somehow my knowledge is so limited that I cannot figure out a simple thing like this, maybe someone can help me in suggesting what is the issue with my report structure.

[10:28:10.193] Traceback (innermost last):
  File “…/lib/webnotes/handler.py”, line 154, in handle
    execute_cmd(cmd)
  File “…/lib/webnotes/handler.py”, line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File “…/lib/webnotes/handler.py”, line 206, in call
    return fn(**newargs)
  File “…/lib/webnotes/widgets/query_report.py”, line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File “…/lib/webnotes/init.py”, line 357, in get_method
    import(modulename)
 ImportError: No module named accounts_receivable_by_invoice.accounts_receivable_by_invoice


On Tuesday, May 7, 2013 10:50:03 AM UTC+5:30, rushabh wrote:
It should be in the reports folder. See an existing report for more info.



On 07-May-2013, at 10:42 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+un…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/689e18b0-e193-41a3-8c91-fa2a3d140528%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi Aditya,

Probably the __init__.py file is missing under app/accounts/report/accounts_receivable_by_invoice

Create an empty file with that name and it should start working.

Thanks,
Anand.

On 21-May-2013, at 10:34 AM, Addy <ad...@rigpl.com> wrote:

Hi,

I am still struggling to get my first script report working. I have tried to understand the structure of the existing script reports and found that there are some files in the folder of the script report which I think are automatically created:
  • report_name.pyc
  • __init__.pyc
  • report_name.txt
  • report_name.js
  • __init__.py
Now what I have done:
  • Changed an existing report in the Accounts Module from Query to Script Report
  • Created a folder under the patch /var/www/sites/XXX/app/accounts/report/accounts_receivable_by_invoice
  • Created a python file with the same name accounts_receivable_by_invoice
  • Check the report and I got the same error as the one that I have pointed in the first post which is posted below as well.
  • Now the error suggests that my report points towards the wrong module infact it should be pointing towards the module Accounts but somehow it is  taking the report name as the module name.
Honestly, I have tried my level best to understand the script report but somehow my knowledge is so limited that I cannot figure out a simple thing like this, maybe someone can help me in suggesting what is the issue with my report structure.

[10:28:10.193] Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 154, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 206, in call
    return fn(**newargs)
  File "../lib/webnotes/widgets/query_report.py", line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File "../lib/webnotes/__init__.py", line 357, in get_method
    __import__(modulename)
 ImportError: No module named accounts_receivable_by_invoice.accounts_receivable_by_invoice


On Tuesday, May 7, 2013 10:50:03 AM UTC+5:30, rushabh wrote:
It should be in the reports folder. See an existing report for more info.


On 07-May-2013, at 10:42 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+un…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/689e18b0-e193-41a3-8c91-fa2a3d140528%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/374783FE-ED68-465F-BE0B-68C24D18C2F2%40erpnext.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi Anand,


That worked but I am not sure why am I getting this error since I have just copied the accounts receivable report in the system and pasted it as it is.

[19:12:15.913] Traceback (innermost last):
  File “…/lib/webnotes/handler.py”, line 154, in handle
    execute_cmd(cmd)
  File “…/lib/webnotes/handler.py”, line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File “…/lib/webnotes/handler.py”, line 206, in call
    return fn(**newargs)
  File “…/lib/webnotes/widgets/query_report.py”, line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File “…/app/accounts/report/test_accounts_receivables/test_accounts_receivables.py”, line 18, in execute
    age_on = getdate(filters.get(“report_date”)) > getdate(nowdate()) </div>
  File “…/lib/webnotes/utils/init.py”, line 144, in getdate
    if " " in string_date:
 TypeError: argument of type ‘NoneType’ is not iterable


On Tuesday, May 21, 2013 12:11:51 PM UTC+5:30, Anand Doshi wrote:
Hi Aditya,

Probably the init.py file is missing under app/accounts/report/accounts_receivable_by_invoice

Create an empty file with that name and it should start working.

Thanks,
Anand.

On 21-May-2013, at 10:34 AM, Addy <ad…@rigpl.com> wrote:

Hi,

I am still struggling to get my first script report working. I have tried to understand the structure of the existing script reports and found that there are some files in the folder of the script report which I think are automatically created:
  • report_name.pyc
  • init.pyc
  • report_name.txt
  • report_name.js
  • init.py
Now what I have done:
  • Changed an existing report in the Accounts Module from Query to Script Report
  • Created a folder under the patch /var/www/sites/XXX/app/accounts/report/accounts_receivable_by_invoice
  • Created a python file with the same name accounts_receivable_by_invoice
  • Check the report and I got the same error as the one that I have pointed in the first post which is posted below as well.
  • Now the error suggests that my report points towards the wrong module infact it should be pointing towards the module Accounts but somehow it is  taking the report name as the module name.
Honestly, I have tried my level best to understand the script report but somehow my knowledge is so limited that I cannot figure out a simple thing like this, maybe someone can help me in suggesting what is the issue with my report structure.

[10:28:10.193] Traceback (innermost last):
  File “…/lib/webnotes/handler.py”, line 154, in handle
    execute_cmd(cmd)
  File “…/lib/webnotes/handler.py”, line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File “…/lib/webnotes/handler.py”, line 206, in call
    return fn(**newargs)
  File “…/lib/webnotes/widgets/query_report.py”, line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File “…/lib/webnotes/init.py”, line 357, in get_method
    import(modulename)
 ImportError: No module named accounts_receivable_by_invoice.accounts_receivable_by_invoice


On Tuesday, May 7, 2013 10:50:03 AM UTC+5:30, rushabh wrote:
It should be in the reports folder. See an existing report for more info.



On 07-May-2013, at 10:42 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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+un…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/689e18b0-e193-41a3-8c91-fa2a3d140528%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/71e8773f-face-44ac-ade1-987ae0d2d876%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi Aditya,

Please also copy the report's js file. It should solve this error.

Thanks,
Anand.

On 21-May-2013, at 7:15 PM, Addy <ad...@rigpl.com> wrote:

Hi Anand,

That worked but I am not sure why am I getting this error since I have just copied the accounts receivable report in the system and pasted it as it is.

[19:12:15.913] Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 154, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 206, in call
    return fn(**newargs)
  File "../lib/webnotes/widgets/query_report.py", line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File "../app/accounts/report/test_accounts_receivables/test_accounts_receivables.py", line 18, in execute
    age_on = getdate(filters.get("report_date")) > getdate(nowdate()) \
  File "../lib/webnotes/utils/__init__.py", line 144, in getdate
    if " " in string_date:
 TypeError: argument of type 'NoneType' is not iterable


On Tuesday, May 21, 2013 12:11:51 PM UTC+5:30, Anand Doshi wrote:
Hi Aditya,

Probably the __init__.py file is missing under app/accounts/report/accounts_receivable_by_invoice

Create an empty file with that name and it should start working.

Thanks,
Anand.

On 21-May-2013, at 10:34 AM, Addy <ad...@rigpl.com> wrote:

Hi,

I am still struggling to get my first script report working. I have tried to understand the structure of the existing script reports and found that there are some files in the folder of the script report which I think are automatically created:
  • report_name.pyc
  • __init__.pyc
  • report_name.txt
  • report_name.js
  • __init__.py
Now what I have done:
  • Changed an existing report in the Accounts Module from Query to Script Report
  • Created a folder under the patch /var/www/sites/XXX/app/accounts/report/accounts_receivable_by_invoice
  • Created a python file with the same name accounts_receivable_by_invoice
  • Check the report and I got the same error as the one that I have pointed in the first post which is posted below as well.
  • Now the error suggests that my report points towards the wrong module infact it should be pointing towards the module Accounts but somehow it is  taking the report name as the module name.
Honestly, I have tried my level best to understand the script report but somehow my knowledge is so limited that I cannot figure out a simple thing like this, maybe someone can help me in suggesting what is the issue with my report structure.

[10:28:10.193] Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 154, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 206, in call
    return fn(**newargs)
  File "../lib/webnotes/widgets/query_report.py", line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File "../lib/webnotes/__init__.py", line 357, in get_method
    __import__(modulename)
 ImportError: No module named accounts_receivable_by_invoice.accounts_receivable_by_invoice


On Tuesday, May 7, 2013 10:50:03 AM UTC+5:30, rushabh wrote:
It should be in the reports folder. See an existing report for more info.


On 07-May-2013, at 10:42 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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+un…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/689e18b0-e193-41a3-8c91-fa2a3d140528%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/71e8773f-face-44ac-ade1-987ae0d2d876%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/DBC4FE49-0DA7-4894-9DB9-230BDC00CC07%40erpnext.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Probably you did not changed report name in filter specification in js file. Can you see filters in the loaded report?

On 21 May 2013 19:15, "Addy" <ad...@rigpl.com> wrote:
Hi Anand,

That worked but I am not sure why am I getting this error since I have just copied the accounts receivable report in the system and pasted it as it is.

[19:12:15.913] Traceback (innermost last):
File "../lib/webnotes/handler.py", line 154, in handle
execute_cmd(cmd)
File "../lib/webnotes/handler.py", line 189, in execute_cmd
ret = call(method, webnotes.form_dict)
File "../lib/webnotes/handler.py", line 206, in call
return fn(**newargs)
File "../lib/webnotes/widgets/query_report.py", line 69, in run
columns, result = webnotes.get_method(method_name)(filters or {})
File "../app/accounts/report/test_accounts_receivables/test_accounts_receivables.py", line 18, in execute
age_on = getdate(filters.get("report_date")) > getdate(nowdate()) \
File "../lib/webnotes/utils/__init__.py", line 144, in getdate
if " " in string_date:
TypeError: argument of type 'NoneType' is not iterable


On Tuesday, May 21, 2013 12:11:51 PM UTC+5:30, Anand Doshi wrote:
Hi Aditya,

Probably the __init__.py file is missing under app/accounts/report/accounts_receivable_by_invoice

Create an empty file with that name and it should start working.

Thanks,
Anand.

On 21-May-2013, at 10:34 AM, Addy <ad...@rigpl.com> wrote:

Hi,

I am still struggling to get my first script report working. I have tried to understand the structure of the existing script reports and found that there are some files in the folder of the script report which I think are automatically created:
  • report_name.pyc
  • __init__.pyc
  • report_name.txt
  • report_name.js
  • __init__.py
Now what I have done:
  • Changed an existing report in the Accounts Module from Query to Script Report
  • Created a folder under the patch /var/www/sites/XXX/app/accounts/report/accounts_receivable_by_invoice
  • Created a python file with the same name accounts_receivable_by_invoice
  • Check the report and I got the same error as the one that I have pointed in the first post which is posted below as well.
  • Now the error suggests that my report points towards the wrong module infact it should be pointing towards the module Accounts but somehow it is taking the report name as the module name.
Honestly, I have tried my level best to understand the script report but somehow my knowledge is so limited that I cannot figure out a simple thing like this, maybe someone can help me in suggesting what is the issue with my report structure.

[10:28:10.193] Traceback (innermost last):
File "../lib/webnotes/handler.py", line 154, in handle
execute_cmd(cmd)
File "../lib/webnotes/handler.py", line 189, in execute_cmd
ret = call(method, webnotes.form_dict)
File "../lib/webnotes/handler.py", line 206, in call
return fn(**newargs)
File "../lib/webnotes/widgets/query_report.py", line 69, in run
columns, result = webnotes.get_method(method_name)(filters or {})
File "../lib/webnotes/__init__.py", line 357, in get_method
__import__(modulename)
ImportError: No module named accounts_receivable_by_invoice.accounts_receivable_by_invoice


On Tuesday, May 7, 2013 10:50:03 AM UTC+5:30, rushabh wrote:
It should be in the reports folder. See an existing report for more info.


On 07-May-2013, at 10:42 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.








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+un…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/689e18b0-e193-41a3-8c91-fa2a3d140528%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.







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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/71e8773f-face-44ac-ade1-987ae0d2d876%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.






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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CA%2BCj7thVm5nxGfKN29XxXb23ALUEXACV9r1rimJx3rCb%3D2b%2B%2BQ%40mail.gmail.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi,


Well I am still not able to run a custom script report, I have added the blank __init__.py  file and also the test_accounts_receivables.js file with the name of the report changed but still I am getting the below shown as the report output and no error on the console.



Also the files in the folder /app/accounts/report/test_accounts_receivables/  are attached kindly let me know what is the thing that I am missing now.




On Tuesday, May 21, 2013 7:45:45 PM UTC+5:30, Nabin Hait wrote:

Probably you did not changed report name in filter specification in js file. Can you see filters in the loaded report?

On 21 May 2013 19:15, "Addy" <ad...@rigpl.com> wrote:
Hi Anand,

That worked but I am not sure why am I getting this error since I have just copied the accounts receivable report in the system and pasted it as it is.

[19:12:15.913] Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 154, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 206, in call
    return fn(**newargs)
  File "../lib/webnotes/widgets/query_report.py", line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File "../app/accounts/report/test_accounts_receivables/test_accounts_receivables.py", line 18, in execute
    age_on = getdate(filters.get("report_date")) > getdate(nowdate()) \
  File "../lib/webnotes/utils/__init__.py", line 144, in getdate
    if " " in string_date:
 TypeError: argument of type 'NoneType' is not iterable


On Tuesday, May 21, 2013 12:11:51 PM UTC+5:30, Anand Doshi wrote:
Hi Aditya,

Probably the __init__.py file is missing under app/accounts/report/accounts_receivable_by_invoice

Create an empty file with that name and it should start working.

Thanks,
Anand.

On 21-May-2013, at 10:34 AM, Addy <ad...@rigpl.com> wrote:

Hi,

I am still struggling to get my first script report working. I have tried to understand the structure of the existing script reports and found that there are some files in the folder of the script report which I think are automatically created:
  • report_name.pyc
  • __init__.pyc
  • report_name.txt
  • report_name.js
  • __init__.py
Now what I have done:
  • Changed an existing report in the Accounts Module from Query to Script Report
  • Created a folder under the patch /var/www/sites/XXX/app/accounts/report/accounts_receivable_by_invoice
  • Created a python file with the same name accounts_receivable_by_invoice
  • Check the report and I got the same error as the one that I have pointed in the first post which is posted below as well.
  • Now the error suggests that my report points towards the wrong module infact it should be pointing towards the module Accounts but somehow it is  taking the report name as the module name.
Honestly, I have tried my level best to understand the script report but somehow my knowledge is so limited that I cannot figure out a simple thing like this, maybe someone can help me in suggesting what is the issue with my report structure.

[10:28:10.193] Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 154, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 206, in call
    return fn(**newargs)
  File "../lib/webnotes/widgets/query_report.py", line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File "../lib/webnotes/__init__.py", line 357, in get_method
    __import__(modulename)
 ImportError: No module named accounts_receivable_by_invoice.accounts_receivable_by_invoice


On Tuesday, May 7, 2013 10:50:03 AM UTC+5:30, rushabh wrote:
It should be in the reports folder. See an existing report for more info.


On 07-May-2013, at 10:42 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+unsubscr…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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+unsubscr…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/689e18b0-e193-41a3-8c91-fa2a3d140528%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/71e8773f-face-44ac-ade1-987ae0d2d876%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 



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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/6fbd1522-ff23-476d-b573-9562c4b3fda1%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

What is the url you are using?

Looking like you are using #Report2/Sales Invoice/Test Accounts Receivables
Instead use #query-report/Test Accounts Receivables

On 24-May-2013, at 9:29 AM, Addy wrote:

Hi,


Well I am still not able to run a custom script report, I have added the blank __init__.py  file and also the test_accounts_receivables.js file with the name of the report changed but still I am getting the below shown as the report output and no error on the console.




Also the files in the folder /app/accounts/report/test_accounts_receivables/  are attached kindly let me know what is the thing that I am missing now.




On Tuesday, May 21, 2013 7:45:45 PM UTC+5:30, Nabin Hait wrote:

Probably you did not changed report name in filter specification in js file. Can you see filters in the loaded report?

On 21 May 2013 19:15, "Addy" <ad...@rigpl.com> wrote:
Hi Anand,

That worked but I am not sure why am I getting this error since I have just copied the accounts receivable report in the system and pasted it as it is.

[19:12:15.913] Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 154, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 206, in call
    return fn(**newargs)
  File "../lib/webnotes/widgets/query_report.py", line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File "../app/accounts/report/test_accounts_receivables/test_accounts_receivables.py", line 18, in execute
    age_on = getdate(filters.get("report_date")) > getdate(nowdate()) \
  File "../lib/webnotes/utils/__init__.py", line 144, in getdate
    if " " in string_date:
 TypeError: argument of type 'NoneType' is not iterable


On Tuesday, May 21, 2013 12:11:51 PM UTC+5:30, Anand Doshi wrote:
Hi Aditya,

Probably the __init__.py file is missing under app/accounts/report/accounts_receivable_by_invoice

Create an empty file with that name and it should start working.

Thanks,
Anand.

On 21-May-2013, at 10:34 AM, Addy <ad...@rigpl.com> wrote:

Hi,

I am still struggling to get my first script report working. I have tried to understand the structure of the existing script reports and found that there are some files in the folder of the script report which I think are automatically created:
  • report_name.pyc
  • __init__.pyc
  • report_name.txt
  • report_name.js
  • __init__.py
Now what I have done:
  • Changed an existing report in the Accounts Module from Query to Script Report
  • Created a folder under the patch /var/www/sites/XXX/app/accounts/report/accounts_receivable_by_invoice
  • Created a python file with the same name accounts_receivable_by_invoice
  • Check the report and I got the same error as the one that I have pointed in the first post which is posted below as well.
  • Now the error suggests that my report points towards the wrong module infact it should be pointing towards the module Accounts but somehow it is  taking the report name as the module name.
Honestly, I have tried my level best to understand the script report but somehow my knowledge is so limited that I cannot figure out a simple thing like this, maybe someone can help me in suggesting what is the issue with my report structure.

[10:28:10.193] Traceback (innermost last):
  File "../lib/webnotes/handler.py", line 154, in handle
    execute_cmd(cmd)
  File "../lib/webnotes/handler.py", line 189, in execute_cmd
    ret = call(method, webnotes.form_dict)
  File "../lib/webnotes/handler.py", line 206, in call
    return fn(**newargs)
  File "../lib/webnotes/widgets/query_report.py", line 69, in run
    columns, result = webnotes.get_method(method_name)(filters or {})
  File "../lib/webnotes/__init__.py", line 357, in get_method
    __import__(modulename)
 ImportError: No module named accounts_receivable_by_invoice.accounts_receivable_by_invoice


On Tuesday, May 7, 2013 10:50:03 AM UTC+5:30, rushabh wrote:
It should be in the reports folder. See an existing report for more info.


On 07-May-2013, at 10:42 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Rushabh,

But I tried that as well, the problem is that I am not able to figure out that whether the py file should be created under the FOLDER of the DOCTYPE it is based on or in the REPORTS folder.

Kindly let me know.



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+unsubscr…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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+unsubscr…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/689e18b0-e193-41a3-8c91-fa2a3d140528%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





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+un…@googlegroups.com.

To post to this group, send email to erpnext-dev…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/71e8773f-face-44ac-ade1-987ae0d2d876%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/6fbd1522-ff23-476d-b573-9562c4b3fda1%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

<test_accounts_receivables.txt><test_accounts_receivables.py><test_accounts_receivables.js>




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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/26470CAF-12C6-4789-915E-477DCF2DE606%40gmail.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Thanks Nabin,

Really over looked the link, now it is working FINALLY. But how could I ensure that the link on the custom report list takes me to the query-report link instead of the report2 link.

On Fri, May 24, 2013 at 11:26 AM, Nabin Hait <na...@gmail.com> wrote:

#query-report/Test Accounts Receivables





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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAEmKBHzJfuQtjOai_LGYA%3DoRi7mvT%2BN-F1xf1H3xQT6wSn1P3A%40mail.gmail.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

We have fixed the issue, now it will take correct url.

Please pull the latest updates to test it.

On 24-May-2013, at 11:38 AM, Aditya Duggal wrote:

Thanks Nabin,

Really over looked the link, now it is working FINALLY. But how could I ensure that the link on the custom report list takes me to the query-report link instead of the report2 link.

On Fri, May 24, 2013 at 11:26 AM, Nabin Hait <na...@gmail.com> wrote:

#query-report/Test Accounts Receivables






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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAEmKBHzJfuQtjOai_LGYA%3DoRi7mvT%2BN-F1xf1H3xQT6wSn1P3A%40mail.gmail.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/B01EDCCE-7FC1-48A6-9134-2A81BC3E969D%40gmail.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Thanks Nabin,

Its fixed. I didn't knew that you people would find a bug in the process ;)


On Fri, May 24, 2013 at 12:16 PM, Nabin Hait <na...@gmail.com> wrote:
We have fixed the issue, now it will take correct url.

Please pull the latest updates to test it.

On 24-May-2013, at 11:38 AM, Aditya Duggal wrote:

Thanks Nabin,


Really over looked the link, now it is working FINALLY. But how could I ensure that the link on the custom report list takes me to the query-report link instead of the report2 link.


On Fri, May 24, 2013 at 11:26 AM, Nabin Hait <na...@gmail.com> wrote:

#query-report/Test Accounts Receivables






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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAEmKBHzJfuQtjOai_LGYA%3DoRi7mvT%2BN-F1xf1H3xQT6wSn1P3A%40mail.gmail.com?hl=en.


For more options, visit https://groups.google.com/groups/opt_out.





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+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/B01EDCCE-7FC1-48A6-9134-2A81BC3E969D%40gmail.com?hl=en.


For more options, visit https://groups.google.com/groups/opt_out.





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+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAEmKBHzUpvw_GysY6L03UDGDVbeR5taiT%2BVD5YkpXiSePQGWbg%40mail.gmail.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.