Script Report: Automatic Calculation of Re Order Level

Hi,


I am trying to write a script report for getting the re order levels as per auto calculation. But since this is my first script report, I am facing trouble to get things done right maybe some one can help me out with the things I am doing wrong.

What this report would do:
  1. List all the items from item table along with their Re-Order Level (Not warehouse wise though)
  2. DN Qty = Sum of all the DN of an item in a specified date range
  3. No of DN = Total Number of DNs in the specified period.
  4. Stock Entry Quantity = Sum of Qty in Stock Entry in the period.
  5. Average quantity in a month for DN = Item No 2/ (Period in months)
  6. Avg of Stock entry in a month = Item no 4/ (period in months)
  7. Total Average = 5 + 6
Now I am trying to write a report but getting some errors like:

[01:40:35.719] 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/stock/report/calculate_rol/calculate_rol.py”, line 25, in execute
    data = get_sl_entries(filters)
  File “…/app/stock/report/calculate_rol/calculate_rol.py”, line 45, in get_sl_entries
    where voucher_type = “Delivery Note” %s group by item_code “”" % conditions ,as_dict=True)
  File “…/lib/webnotes/db.py”, line 130, in sql
    raise e
 ProgrammingError: (1064, ‘You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Entry \n\t\twhere voucher_type = “Delivery Note”  and posting_date >= 2013-05-01 an’ at line 1’)


Now the python file I am using is attached. I know there is something wrong with the way I am using the %s but I am not able find the error even after many attempts. Also I would request if the report I am making is correct or not.



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/50f539a2-0599-47ce-b4a1-5aab2d42e57e%40googlegroups.com?hl=en.

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

 

 

Use `tabStock Ledger Entry` instead of tabStock Ledger Entry.

On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>



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/45C44730-ECA8-46DC-A1A1-866FD416C20D%40gmail.com?hl=en.

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

 

 

Hi Nabin,


Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:
Use tabStock Ledger Entry instead of tabStock Ledger Entry.

On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>



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/e00d7c4e-4abc-49bb-8cba-46ea9bf3e0c3%40googlegroups.com?hl=en.

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

 

 

Aditya,

You will have to join the data manually using loops. Also please share code files using gist / pastebin so people can post edits / suggestions.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

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

Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:
Use `tabStock Ledger Entry` instead of tabStock Ledger Entry.

On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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/e00d7c4e-4abc-49bb-8cba-46ea9bf3e0c3%40googlegroups.com?hl=en.

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

 

 

<calculate_rol.py>




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/84506E75-F032-48D8-8C77-381D984CF458%40erpnext.com?hl=en.

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

 

 

Sorry,


Here is the gist.

On Tuesday, May 28, 2013 12:20:08 PM UTC+5:30, rushabh wrote:
Aditya,

You will have to join the data manually using loops. Also please share code files using gist / pastebin so people can post edits / suggestions.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

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

Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:
Use `tabStock Ledger Entry` instead of tabStock Ledger Entry.

On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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/e00d7c4e-4abc-49bb-8cba-46ea9bf3e0c3%40googlegroups.com?hl=en.

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

 

 

<calculate_rol.py>




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/8b0b218d-c1b6-464d-b37d-1902d735f206%40googlegroups.com?hl=en.

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

 

 

Aditya,

You can just merge the results in Python. Python has some great tools for doing it and is quite easy. For example you can add two lists as data1 + data2

More here.

http://docs.python.org/release/1.5.1p1/tut/lists.html

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 28-May-2013, at 12:44 PM, Addy <ad...@rigpl.com> wrote:

Sorry,

Here is the gist.

On Tuesday, May 28, 2013 12:20:08 PM UTC+5:30, rushabh wrote:
Aditya,

You will have to join the data manually using loops. Also please share code files using gist / pastebin so people can post edits / suggestions.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

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

Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:
Use `tabStock Ledger Entry` instead of tabStock Ledger Entry.

On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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/e00d7c4e-4abc-49bb-8cba-46ea9bf3e0c3%40googlegroups.com?hl=en.

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

 

 

<calculate_rol.py>





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/8b0b218d-c1b6-464d-b37d-1902d735f206%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/C118398E-218E-4370-ABF2-082F72B93F08%40erpnext.com?hl=en.

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

 

 

Hi Rushabh,


Thanks for the link, really helped me alot with the lists. I am now facing a problem where I need to get the calculated field and I am unable to handle the fields where the value to be calculated is none type. How could I do that since I am getting this error:

[20:29:50.347] 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/stock/report/calculate_rol/calculate_rol.py”, line 25, in execute
    data = get_sl_entries(filters)
  File “…/app/stock/report/calculate_rol/calculate_rol.py”, line 100, in get_sl_entries
    data += [(float(d)/diff)30]
 TypeError: float() argument must be a string or a number


And the problem with the part of the code is mentioned below for ease, rest of the code is at the gist.

i= 0
while i < len(data):
#webnotes.msgprint(i)
if not data[i][3]:
data += [(float(data[i][3])/diff)30]
else:
data += [None]
i +=1

On Tuesday, May 28, 2013 12:51:04 PM UTC+5:30, rushabh wrote:
Aditya,

You can just merge the results in Python. Python has some great tools for doing it and is quite easy. For example you can add two lists as data1 + data2

More here.


best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 28-May-2013, at 12:44 PM, Addy <ad...@rigpl.com> wrote:

Sorry,

Here is the gist.

On Tuesday, May 28, 2013 12:20:08 PM UTC+5:30, rushabh wrote:
Aditya,

You will have to join the data manually using loops. Also please share code files using gist / pastebin so people can post edits / suggestions.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

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

Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:
Use `tabStock Ledger Entry` instead of tabStock Ledger Entry.

On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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/e00d7c4e-4abc-49bb-8cba-46ea9bf3e0c3%40googlegroups.com?hl=en.

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

 

 

<calculate_rol.py>





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/8b0b218d-c1b6-464d-b37d-1902d735f206%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/f11eb38e-f30b-40ec-b9a7-46ff0816db9d%40googlegroups.com?hl=en.

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

 

 

Like the trace tells you, the value passed to the float function must be integer or string. Its probably None

so use

data += [(float(data[i][3] or 0)/diff)*30]



On 28-May-2013, at 8:34 PM, Addy <ad...@rigpl.com> wrote:

Hi Rushabh,

Thanks for the link, really helped me alot with the lists. I am now facing a problem where I need to get the calculated field and I am unable to handle the fields where the value to be calculated is none type. How could I do that since I am getting this error:

[20:29:50.347] 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/stock/report/calculate_rol/calculate_rol.py", line 25, in execute
    data = get_sl_entries(filters)
  File "../app/stock/report/calculate_rol/calculate_rol.py", line 100, in get_sl_entries
    data += [(float(d)/diff)*30]
 TypeError: float() argument must be a string or a number


And the problem with the part of the code is mentioned below for ease, rest of the code is at the gist.

i= 0
while i < len(data):
#webnotes.msgprint(i)
if not data[i][3]:
data += [(float(data[i][3])/diff)*30]
else:
data += [None]
i +=1

On Tuesday, May 28, 2013 12:51:04 PM UTC+5:30, rushabh wrote:
Aditya,

You can just merge the results in Python. Python has some great tools for doing it and is quite easy. For example you can add two lists as data1 + data2

More here.


best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 28-May-2013, at 12:44 PM, Addy <ad...@rigpl.com> wrote:

Sorry,

Here is the gist.

On Tuesday, May 28, 2013 12:20:08 PM UTC+5:30, rushabh wrote:
Aditya,

You will have to join the data manually using loops. Also please share code files using gist / pastebin so people can post edits / suggestions.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

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

Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:
Use `tabStock Ledger Entry` instead of tabStock Ledger Entry.

On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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/e00d7c4e-4abc-49bb-8cba-46ea9bf3e0c3%40googlegroups.com?hl=en.

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

 

 

<calculate_rol.py>





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/8b0b218d-c1b6-464d-b37d-1902d735f206%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/f11eb38e-f30b-40ec-b9a7-46ff0816db9d%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/9186163C-5D7C-4F05-8CFD-3DB4F536B522%40erpnext.com?hl=en.

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

 

 

Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:
Use `tabStock Ledger Entry` instead of tabStock Ledger Entry.

On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>



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/e00d7c4e-4abc-49bb-8cba-46ea9bf3e0c3%40googlegroups.com?hl=en.

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












Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%40mail.gmail.com?hl=en.

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

 

 

Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>



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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHz_O0Za0_dFCxrOBaOS44xQHR8kLx4q80MSX17Mei2brg%40mail.gmail.com?hl=en.

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

 

 

Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u&#39;C0BE269E7&#39;, u&#39;Carbide NB 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269F5&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 100.0]


[u&#39;C0BE269G3&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 150.0]
[u&#39;C0BE269H1&#39;, u&#39;Carbide NB 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269J6&#39;, u&#39;Carbide NB 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, -196.0]


[u&#39;C0BE2A01H5&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01J0&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A01K8&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2A01L6&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01M4&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A69K7&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2R6990&#39;, u&#39;Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69A2&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2&#39;, None, 100.0, 2, -100.0]

[u&#39;C0BE2R69B0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2&#39;, None, 100.0, 1, -150.0]


[u&#39;C0BE2R69C8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69D5&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2&#39;, None, 486.0, 2, -818.0]

[u&#39;C0BE2R6BH8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2&#39;, None, 10.0, 1, -50.0]


[u&#39;C0BE2R6DX0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2&#39;, None, 50.0, 2, -80.0]

[u&#39;C0BE46B77&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 4&#39;, None, None, None, -52.0]

[u&#39;C0BE46B85&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 4&#39;, None, None, None, -48.0]
[u&#39;C0SE21A01N2&#39;, u&#39;Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2&#39;, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3]) /diff)*30)]
i +=1

Error:

--

File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
if not (data[i][3]):
TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>



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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%40mail.gmail.com?hl=en.

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

 

 

Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:

Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u’C0BE269E7’, u’Carbide NB 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]

[u’C0BE269F5’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 100.0]


[u’C0BE269G3’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 150.0]
[u’C0BE269H1’, u’Carbide NB 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]

[u’C0BE269J6’, u’Carbide NB 0X BNEM \xd86x22x50 Z= 2’, None, None, None, -196.0]


[u’C0BE2A01H5’, u’Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2A01J0’, u’Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A01K8’, u’Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 0]


[u’C0BE2A01L6’, u’Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2A01M4’, u’Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A69K7’, u’Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2’, None, None, None, 0]


[u’C0BE2R6990’, u’Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2R69A2’, u’Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2’, None, 100.0, 2, -100.0]

[u’C0BE2R69B0’, u’Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2’, None, 100.0, 1, -150.0]


[u’C0BE2R69C8’, u’Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2R69D5’, u’Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2’, None, 486.0, 2, -818.0]

[u’C0BE2R6BH8’, u’Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2’, None, 10.0, 1, -50.0]


[u’C0BE2R6DX0’, u’Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2’, None, 50.0, 2, -80.0]

[u’C0BE46B77’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 4’, None, None, None, -52.0]

[u’C0BE46B85’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 4’, None, None, None, -48.0]
[u’C0SE21A01N2’, u’Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2’, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3])  /diff)*30)]
i +=1

Error:

--

  File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
    if not (data[i][3]):
 TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must 

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.com?hl=en.

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

 

 

Hi Anand,

I have tried to replace the float with flt and I am still getting the same error:
TypeError: 'int' object is unsubscriptable

Maybe I am overlooking something simple or is it something more complex. I did not knew that getting a calculated field out of the result is going to take soo long for me to figure out, I thought this would be the simplest job.



On Wed, May 29, 2013 at 5:33 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:


Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u&#39;C0BE269E7&#39;, u&#39;Carbide NB 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269F5&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 100.0]


[u&#39;C0BE269G3&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 150.0]
[u&#39;C0BE269H1&#39;, u&#39;Carbide NB 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269J6&#39;, u&#39;Carbide NB 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, -196.0]


[u&#39;C0BE2A01H5&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01J0&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A01K8&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2A01L6&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01M4&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A69K7&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2R6990&#39;, u&#39;Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69A2&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2&#39;, None, 100.0, 2, -100.0]

[u&#39;C0BE2R69B0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2&#39;, None, 100.0, 1, -150.0]


[u&#39;C0BE2R69C8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69D5&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2&#39;, None, 486.0, 2, -818.0]

[u&#39;C0BE2R6BH8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2&#39;, None, 10.0, 1, -50.0]


[u&#39;C0BE2R6DX0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2&#39;, None, 50.0, 2, -80.0]

[u&#39;C0BE46B77&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 4&#39;, None, None, None, -52.0]



[u&#39;C0BE46B85&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 4&#39;, None, None, None, -48.0]
[u&#39;C0SE21A01N2&#39;, u&#39;Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2&#39;, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3]) /diff)*30)]
i +=1

Error:

--

File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
if not (data[i][3]):
TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.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/CAEmKBHy74q_DYvu5udddt-hsEiS3K0w0Gs7RZEXCMvQ-Zqqj9Q%40mail.gmail.com?hl=en.

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

 

 

Aditya,

It means data[i] is an integer not a list as expected in data[i][3]

do a msgprint on data[i]

to find out.

best,
Rushabh

W: https://erpnext.com
T: @rushabh_mehta

On 30-May-2013, at 12:01 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Anand,

I have tried to replace the float with flt and I am still getting the same error:
TypeError: 'int' object is unsubscriptable

Maybe I am overlooking something simple or is it something more complex. I did not knew that getting a calculated field out of the result is going to take soo long for me to figure out, I thought this would be the simplest job.



On Wed, May 29, 2013 at 5:33 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:


Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u’C0BE269E7’, u’Carbide NB 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]

[u’C0BE269F5’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 100.0]


[u’C0BE269G3’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 150.0]
[u’C0BE269H1’, u’Carbide NB 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]

[u’C0BE269J6’, u’Carbide NB 0X BNEM \xd86x22x50 Z= 2’, None, None, None, -196.0]


[u’C0BE2A01H5’, u’Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2A01J0’, u’Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A01K8’, u’Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 0]


[u’C0BE2A01L6’, u’Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2A01M4’, u’Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A69K7’, u’Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2’, None, None, None, 0]


[u’C0BE2R6990’, u’Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2R69A2’, u’Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2’, None, 100.0, 2, -100.0]

[u’C0BE2R69B0’, u’Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2’, None, 100.0, 1, -150.0]


[u’C0BE2R69C8’, u’Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2R69D5’, u’Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2’, None, 486.0, 2, -818.0]

[u’C0BE2R6BH8’, u’Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2’, None, 10.0, 1, -50.0]


[u’C0BE2R6DX0’, u’Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2’, None, 50.0, 2, -80.0]

[u’C0BE46B77’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 4’, None, None, None, -52.0]



[u’C0BE46B85’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 4’, None, None, None, -48.0]
[u’C0SE21A01N2’, u’Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2’, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3])  /diff)*30)]
i +=1

Error:

--

  File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
    if not (data[i][3]):
 TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must 

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.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/CAEmKBHy74q_DYvu5udddt-hsEiS3K0w0Gs7RZEXCMvQ-Zqqj9Q%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/A86455C7-2E17-4953-A969-1EFF9AA046DA%40erpnext.com?hl=en.

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

 

 

Dear Rushabh,

I have already given the msgprint of data[i] in my previous post which clearly shows that data[i] is a list with [4] item being either nonetype or float.



On Thu, May 30, 2013 at 10:45 AM, Rushabh Mehta <rm…@gmail.com> wrote:
Aditya,

It means data[i] is an integer not a list as expected in data[i][3]

do a msgprint on data[i]


to find out.


best,

Rushabh


On 30-May-2013, at 12:01 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Anand,

I have tried to replace the float with flt and I am still getting the same error:
TypeError: 'int' object is unsubscriptable

Maybe I am overlooking something simple or is it something more complex. I did not knew that getting a calculated field out of the result is going to take soo long for me to figure out, I thought this would be the simplest job.



On Wed, May 29, 2013 at 5:33 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:


Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u&#39;C0BE269E7&#39;, u&#39;Carbide NB 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269F5&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 100.0]


[u&#39;C0BE269G3&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 150.0]
[u&#39;C0BE269H1&#39;, u&#39;Carbide NB 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269J6&#39;, u&#39;Carbide NB 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, -196.0]


[u&#39;C0BE2A01H5&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01J0&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A01K8&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2A01L6&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01M4&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A69K7&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2R6990&#39;, u&#39;Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69A2&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2&#39;, None, 100.0, 2, -100.0]

[u&#39;C0BE2R69B0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2&#39;, None, 100.0, 1, -150.0]


[u&#39;C0BE2R69C8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69D5&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2&#39;, None, 486.0, 2, -818.0]

[u&#39;C0BE2R6BH8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2&#39;, None, 10.0, 1, -50.0]


[u&#39;C0BE2R6DX0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2&#39;, None, 50.0, 2, -80.0]

[u&#39;C0BE46B77&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 4&#39;, None, None, None, -52.0]



[u&#39;C0BE46B85&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 4&#39;, None, None, None, -48.0]
[u&#39;C0SE21A01N2&#39;, u&#39;Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2&#39;, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3]) /diff)*30)]
i +=1

Error:

--

File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
if not (data[i][3]):
TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.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/CAEmKBHy74q_DYvu5udddt-hsEiS3K0w0Gs7RZEXCMvQ-Zqqj9Q%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/A86455C7-2E17-4953-A969-1EFF9AA046DA%40erpnext.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/CAEmKBHx3VA2ZRzPO%3DuXokD-chYMGntQmG%3Dg1OvoLvR4ia4Nhcw%40mail.gmail.com?hl=en.

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

 

 

Aditya,

Chances are that the computer is not wrong ;)

are you printing data instead of data[i]?

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

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

Dear Rushabh,

I have already given the msgprint of data[i] in my previous post which clearly shows that data[i] is a list with [4] item being either nonetype or float.



On Thu, May 30, 2013 at 10:45 AM, Rushabh Mehta <rm…@gmail.com> wrote:
Aditya,

It means data[i] is an integer not a list as expected in data[i][3]

do a msgprint on data[i]


to find out.


best,

Rushabh


On 30-May-2013, at 12:01 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Anand,

I have tried to replace the float with flt and I am still getting the same error:
TypeError: 'int' object is unsubscriptable

Maybe I am overlooking something simple or is it something more complex. I did not knew that getting a calculated field out of the result is going to take soo long for me to figure out, I thought this would be the simplest job.



On Wed, May 29, 2013 at 5:33 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:


Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u’C0BE269E7’, u’Carbide NB 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]

[u’C0BE269F5’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 100.0]


[u’C0BE269G3’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 150.0]
[u’C0BE269H1’, u’Carbide NB 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]

[u’C0BE269J6’, u’Carbide NB 0X BNEM \xd86x22x50 Z= 2’, None, None, None, -196.0]


[u’C0BE2A01H5’, u’Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2A01J0’, u’Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A01K8’, u’Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 0]


[u’C0BE2A01L6’, u’Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2A01M4’, u’Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A69K7’, u’Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2’, None, None, None, 0]


[u’C0BE2R6990’, u’Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2R69A2’, u’Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2’, None, 100.0, 2, -100.0]

[u’C0BE2R69B0’, u’Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2’, None, 100.0, 1, -150.0]


[u’C0BE2R69C8’, u’Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2R69D5’, u’Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2’, None, 486.0, 2, -818.0]

[u’C0BE2R6BH8’, u’Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2’, None, 10.0, 1, -50.0]


[u’C0BE2R6DX0’, u’Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2’, None, 50.0, 2, -80.0]

[u’C0BE46B77’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 4’, None, None, None, -52.0]



[u’C0BE46B85’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 4’, None, None, None, -48.0]
[u’C0SE21A01N2’, u’Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2’, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3])  /diff)*30)]
i +=1

Error:

--

  File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
    if not (data[i][3]):
 TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must 

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.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/CAEmKBHy74q_DYvu5udddt-hsEiS3K0w0Gs7RZEXCMvQ-Zqqj9Q%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/A86455C7-2E17-4953-A969-1EFF9AA046DA%40erpnext.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/CAEmKBHx3VA2ZRzPO%3DuXokD-chYMGntQmG%3Dg1OvoLvR4ia4Nhcw%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/7E880150-4D14-4ADF-8CD1-2312894B7BB8%40erpnext.com?hl=en.

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

 

 

Hi,

I finally have found a workaround but still the earlier errors are mystery. Now this report is also complete with some things where it is lacking:
  1. The columns which are based on calculations are showing as strings or something since their sorting is all screwed up.

  2. All zero values cannot be converted to NULL values again in the calculated fields which are column no [5 to 8]
You can check the gist here.

The report is working fine apart from the calculated value fields which not getting sorted and I am also not able to convert the zero to null values.

Let me know if you are able to find the solution to the same.


On Thu, May 30, 2013 at 10:57 AM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya,

Chances are that the computer is not wrong ;)

are you printing data instead of data[i]?

- Rushabh
On 30-May-2013, at 10:54 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Dear Rushabh,

I have already given the msgprint of data[i] in my previous post which clearly shows that data[i] is a list with [4] item being either nonetype or float.



On Thu, May 30, 2013 at 10:45 AM, Rushabh Mehta <rm…@gmail.com> wrote:
Aditya,

It means data[i] is an integer not a list as expected in data[i][3]

do a msgprint on data[i]


to find out.


best,

Rushabh


On 30-May-2013, at 12:01 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Anand,

I have tried to replace the float with flt and I am still getting the same error:
TypeError: 'int' object is unsubscriptable

Maybe I am overlooking something simple or is it something more complex. I did not knew that getting a calculated field out of the result is going to take soo long for me to figure out, I thought this would be the simplest job.



On Wed, May 29, 2013 at 5:33 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:


Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u&#39;C0BE269E7&#39;, u&#39;Carbide NB 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269F5&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 100.0]


[u&#39;C0BE269G3&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 150.0]
[u&#39;C0BE269H1&#39;, u&#39;Carbide NB 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269J6&#39;, u&#39;Carbide NB 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, -196.0]


[u&#39;C0BE2A01H5&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01J0&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A01K8&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2A01L6&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01M4&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A69K7&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2R6990&#39;, u&#39;Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69A2&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2&#39;, None, 100.0, 2, -100.0]

[u&#39;C0BE2R69B0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2&#39;, None, 100.0, 1, -150.0]


[u&#39;C0BE2R69C8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69D5&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2&#39;, None, 486.0, 2, -818.0]

[u&#39;C0BE2R6BH8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2&#39;, None, 10.0, 1, -50.0]


[u&#39;C0BE2R6DX0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2&#39;, None, 50.0, 2, -80.0]

[u&#39;C0BE46B77&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 4&#39;, None, None, None, -52.0]



[u&#39;C0BE46B85&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 4&#39;, None, None, None, -48.0]
[u&#39;C0SE21A01N2&#39;, u&#39;Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2&#39;, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3]) /diff)*30)]
i +=1

Error:

--

File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
if not (data[i][3]):
TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.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/CAEmKBHy74q_DYvu5udddt-hsEiS3K0w0Gs7RZEXCMvQ-Zqqj9Q%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/A86455C7-2E17-4953-A969-1EFF9AA046DA%40erpnext.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/CAEmKBHx3VA2ZRzPO%3DuXokD-chYMGntQmG%3Dg1OvoLvR4ia4Nhcw%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/7E880150-4D14-4ADF-8CD1-2312894B7BB8%40erpnext.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/CAEmKBHzMi2UnW0ddHr4TDq0o_NajkjKRzzY7fJjNjZ-nfZtF0Q%40mail.gmail.com?hl=en.

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

 

 

Aditya,

You will have to sort the table in python before sending it. Something like:

data = sorted(data, key = lambda d: d[3])

if you want it sorted by the 3rd column

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 30-May-2013, at 4:30 PM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi,

I finally have found a workaround but still the earlier errors are mystery. Now this report is also complete with some things where it is lacking:
  1. The columns which are based on calculations are showing as strings or something since their sorting is all screwed up.

  2. All zero values cannot be converted to NULL values again in the calculated fields which are column no [5 to 8]
You can check the gist here.

The report is working fine apart from the calculated value fields which not getting sorted and I am also not able to convert the zero to null values.

Let me know if you are able to find the solution to the same.


On Thu, May 30, 2013 at 10:57 AM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya,

Chances are that the computer is not wrong ;)

are you printing data instead of data[i]?

- Rushabh
On 30-May-2013, at 10:54 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Dear Rushabh,

I have already given the msgprint of data[i] in my previous post which clearly shows that data[i] is a list with [4] item being either nonetype or float.



On Thu, May 30, 2013 at 10:45 AM, Rushabh Mehta <rm…@gmail.com> wrote:
Aditya,

It means data[i] is an integer not a list as expected in data[i][3]

do a msgprint on data[i]


to find out.


best,

Rushabh


On 30-May-2013, at 12:01 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Anand,

I have tried to replace the float with flt and I am still getting the same error:
TypeError: 'int' object is unsubscriptable

Maybe I am overlooking something simple or is it something more complex. I did not knew that getting a calculated field out of the result is going to take soo long for me to figure out, I thought this would be the simplest job.



On Wed, May 29, 2013 at 5:33 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:


Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u’C0BE269E7’, u’Carbide NB 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]

[u’C0BE269F5’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 100.0]


[u’C0BE269G3’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 150.0]
[u’C0BE269H1’, u’Carbide NB 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]

[u’C0BE269J6’, u’Carbide NB 0X BNEM \xd86x22x50 Z= 2’, None, None, None, -196.0]


[u’C0BE2A01H5’, u’Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2A01J0’, u’Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A01K8’, u’Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 0]


[u’C0BE2A01L6’, u’Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2A01M4’, u’Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A69K7’, u’Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2’, None, None, None, 0]


[u’C0BE2R6990’, u’Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2R69A2’, u’Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2’, None, 100.0, 2, -100.0]

[u’C0BE2R69B0’, u’Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2’, None, 100.0, 1, -150.0]


[u’C0BE2R69C8’, u’Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2R69D5’, u’Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2’, None, 486.0, 2, -818.0]

[u’C0BE2R6BH8’, u’Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2’, None, 10.0, 1, -50.0]


[u’C0BE2R6DX0’, u’Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2’, None, 50.0, 2, -80.0]

[u’C0BE46B77’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 4’, None, None, None, -52.0]



[u’C0BE46B85’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 4’, None, None, None, -48.0]
[u’C0SE21A01N2’, u’Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2’, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3])  /diff)*30)]
i +=1

Error:

--

  File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
    if not (data[i][3]):
 TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must 

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.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/CAEmKBHy74q_DYvu5udddt-hsEiS3K0w0Gs7RZEXCMvQ-Zqqj9Q%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/A86455C7-2E17-4953-A969-1EFF9AA046DA%40erpnext.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/CAEmKBHx3VA2ZRzPO%3DuXokD-chYMGntQmG%3Dg1OvoLvR4ia4Nhcw%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/7E880150-4D14-4ADF-8CD1-2312894B7BB8%40erpnext.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/CAEmKBHzMi2UnW0ddHr4TDq0o_NajkjKRzzY7fJjNjZ-nfZtF0Q%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/B1F78265-3A8A-4FFF-B23B-93BE152CAA3A%40erpnext.com?hl=en.

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

 

 

Dear Rushabh,

I think you have not understood what I had meant.
I am actually saying that the fields which are calculated are not getting sorted as per the float or Int mentioned in get_columns and those columns are being considered as text only.

The column are the last 3 columns so something is not right as these columns should have been int or float but are being considered as Text only when I click on the column heading to sort, however if I try to search by filters on the column then they act as if they are numbers like 101:106 field would only show items between 101 and 106 only.

So if you could really help me with the sorting part and how to remove zeros from the fields that would be great.


On Fri, May 31, 2013 at 10:44 AM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya,

You will have to sort the table in python before sending it. Something like:

data = sorted(data, key = lambda d: d[3])

if you want it sorted by the 3rd column

best,
On 30-May-2013, at 4:30 PM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi,

I finally have found a workaround but still the earlier errors are mystery. Now this report is also complete with some things where it is lacking:
  1. The columns which are based on calculations are showing as strings or something since their sorting is all screwed up.

  2. All zero values cannot be converted to NULL values again in the calculated fields which are column no [5 to 8]
You can check the gist here.

The report is working fine apart from the calculated value fields which not getting sorted and I am also not able to convert the zero to null values.

Let me know if you are able to find the solution to the same.


On Thu, May 30, 2013 at 10:57 AM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya,

Chances are that the computer is not wrong ;)

are you printing data instead of data[i]?

- Rushabh
On 30-May-2013, at 10:54 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Dear Rushabh,

I have already given the msgprint of data[i] in my previous post which clearly shows that data[i] is a list with [4] item being either nonetype or float.



On Thu, May 30, 2013 at 10:45 AM, Rushabh Mehta <rm…@gmail.com> wrote:
Aditya,

It means data[i] is an integer not a list as expected in data[i][3]

do a msgprint on data[i]


to find out.


best,

Rushabh


On 30-May-2013, at 12:01 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Anand,

I have tried to replace the float with flt and I am still getting the same error:
TypeError: 'int' object is unsubscriptable

Maybe I am overlooking something simple or is it something more complex. I did not knew that getting a calculated field out of the result is going to take soo long for me to figure out, I thought this would be the simplest job.



On Wed, May 29, 2013 at 5:33 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:


Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u&#39;C0BE269E7&#39;, u&#39;Carbide NB 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269F5&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 100.0]


[u&#39;C0BE269G3&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 150.0]
[u&#39;C0BE269H1&#39;, u&#39;Carbide NB 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE269J6&#39;, u&#39;Carbide NB 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, -196.0]


[u&#39;C0BE2A01H5&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01J0&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A01K8&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2A01L6&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2A01M4&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2&#39;, None, None, None, 0]

[u&#39;C0BE2A69K7&#39;, u&#39;Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2&#39;, None, None, None, 0]


[u&#39;C0BE2R6990&#39;, u&#39;Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69A2&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2&#39;, None, 100.0, 2, -100.0]

[u&#39;C0BE2R69B0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2&#39;, None, 100.0, 1, -150.0]


[u&#39;C0BE2R69C8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2&#39;, None, None, None, 0]
[u&#39;C0BE2R69D5&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2&#39;, None, 486.0, 2, -818.0]

[u&#39;C0BE2R6BH8&#39;, u&#39;Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2&#39;, None, 10.0, 1, -50.0]


[u&#39;C0BE2R6DX0&#39;, u&#39;Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2&#39;, None, 50.0, 2, -80.0]

[u&#39;C0BE46B77&#39;, u&#39;Carbide NB 0X BNEM \xd85x22x50 Z= 4&#39;, None, None, None, -52.0]



[u&#39;C0BE46B85&#39;, u&#39;Carbide NB 0X BNEM \xd84x22x50 Z= 4&#39;, None, None, None, -48.0]
[u&#39;C0SE21A01N2&#39;, u&#39;Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2&#39;, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3]) /diff)*30)]
i +=1

Error:

--

File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
if not (data[i][3]):
TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.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/CAEmKBHy74q_DYvu5udddt-hsEiS3K0w0Gs7RZEXCMvQ-Zqqj9Q%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/A86455C7-2E17-4953-A969-1EFF9AA046DA%40erpnext.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/CAEmKBHx3VA2ZRzPO%3DuXokD-chYMGntQmG%3Dg1OvoLvR4ia4Nhcw%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/7E880150-4D14-4ADF-8CD1-2312894B7BB8%40erpnext.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/CAEmKBHzMi2UnW0ddHr4TDq0o_NajkjKRzzY7fJjNjZ-nfZtF0Q%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/B1F78265-3A8A-4FFF-B23B-93BE152CAA3A%40erpnext.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/CAEmKBHx2C07Zr2H9Cezn0RCfbbmTkEmKOpLTDGZdoH9y3vFW5Q%40mail.gmail.com?hl=en.

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

 

 

Hi Aditya,

To remove zeroes, check if the value is zero when inserting into the array and if it is 0, insert None.

Sorting should work. Check Accounts Receivable report's Age field. Even your gist looks okay. Maybe you changed something and didn't update in the gist.

Thanks,
Anand.

On 31-May-2013, at 12:17 PM, Aditya Duggal <ad...@rigpl.com> wrote:

Dear Rushabh,

I think you have not understood what I had meant.
I am actually saying that the fields which are calculated are not getting sorted as per the float or Int mentioned in get_columns and those columns are being considered as text only.

The column are the last 3 columns so something is not right as these columns should have been int or float but are being considered as Text only when I click on the column heading to sort, however if I try to search by filters on the column then they act as if they are numbers like 101:106 field would only show items between 101 and 106 only.

So if you could really help me with the sorting part and how to remove zeros from the fields that would be great.


On Fri, May 31, 2013 at 10:44 AM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya,

You will have to sort the table in python before sending it. Something like:

data = sorted(data, key = lambda d: d[3])

if you want it sorted by the 3rd column

best,
On 30-May-2013, at 4:30 PM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi,

I finally have found a workaround but still the earlier errors are mystery. Now this report is also complete with some things where it is lacking:
  1. The columns which are based on calculations are showing as strings or something since their sorting is all screwed up.

  2. All zero values cannot be converted to NULL values again in the calculated fields which are column no [5 to 8]
You can check the gist here.

The report is working fine apart from the calculated value fields which not getting sorted and I am also not able to convert the zero to null values.

Let me know if you are able to find the solution to the same.


On Thu, May 30, 2013 at 10:57 AM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya,

Chances are that the computer is not wrong ;)

are you printing data instead of data[i]?

- Rushabh
On 30-May-2013, at 10:54 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Dear Rushabh,

I have already given the msgprint of data[i] in my previous post which clearly shows that data[i] is a list with [4] item being either nonetype or float.



On Thu, May 30, 2013 at 10:45 AM, Rushabh Mehta <rm…@gmail.com> wrote:
Aditya,

It means data[i] is an integer not a list as expected in data[i][3]

do a msgprint on data[i]


to find out.


best,

Rushabh


On 30-May-2013, at 12:01 AM, Aditya Duggal <ad...@rigpl.com> wrote:

Hi Anand,

I have tried to replace the float with flt and I am still getting the same error:
TypeError: 'int' object is unsubscriptable

Maybe I am overlooking something simple or is it something more complex. I did not knew that getting a calculated field out of the result is going to take soo long for me to figure out, I thought this would be the simplest job.



On Wed, May 29, 2013 at 5:33 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Aditya,

At the top of the python file, write:

from webnotes.utils import flt


and use the flt function instead of float

Thanks,
Anand.

On 29-May-2013, at 3:49 PM, Aditya Duggal <ad...@rigpl.com> wrote:


Now the thing is that data[i][3] is a float and some values are also NONE Type so how could I handle the same in the below code since I think the nonetype is creating some problems


Here is a msgprint of the data[i] to ensure that I am not making the same mistake as earlier:

[u’C0BE269E7’, u’Carbide NB 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]

[u’C0BE269F5’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 100.0]


[u’C0BE269G3’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 150.0]
[u’C0BE269H1’, u’Carbide NB 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]

[u’C0BE269J6’, u’Carbide NB 0X BNEM \xd86x22x50 Z= 2’, None, None, None, -196.0]


[u’C0BE2A01H5’, u’Carbide ANUBIS 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2A01J0’, u’Carbide ANUBIS 0X BNEM \xd84x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A01K8’, u’Carbide ANUBIS 0X BNEM \xd85x22x50 Z= 2’, None, None, None, 0]


[u’C0BE2A01L6’, u’Carbide ANUBIS 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2A01M4’, u’Carbide ANUBIS 0X BNEM \xd86x22x50 Z= 2’, None, None, None, 0]

[u’C0BE2A69K7’, u’Carbide ANUBIS 0X BNEM \xd82x6x\xd83x38 Z= 2’, None, None, None, 0]


[u’C0BE2R6990’, u’Carbide ROHIT 0X BNEM \xd83x16x50 Z= 2’, None, None, None, 0]
[u’C0BE2R69A2’, u’Carbide ROHIT 0X BNEM \xd84x22x50 Z= 2’, None, 100.0, 2, -100.0]

[u’C0BE2R69B0’, u’Carbide ROHIT 0X BNEM \xd85x22x50 Z= 2’, None, 100.0, 1, -150.0]


[u’C0BE2R69C8’, u’Carbide ROHIT 0X BNEM \xd85x35x75 Z= 2’, None, None, None, 0]
[u’C0BE2R69D5’, u’Carbide ROHIT 0X BNEM \xd86x22x50 Z= 2’, None, 486.0, 2, -818.0]

[u’C0BE2R6BH8’, u’Carbide ROHIT 0X BNEM \xd86x35x75 180\xb0 Z= 2’, None, 10.0, 1, -50.0]


[u’C0BE2R6DX0’, u’Carbide ROHIT 0X BNEM \xd84x35x75 180\xb0 Z= 2’, None, 50.0, 2, -80.0]

[u’C0BE46B77’, u’Carbide NB 0X BNEM \xd85x22x50 Z= 4’, None, None, None, -52.0]



[u’C0BE46B85’, u’Carbide NB 0X BNEM \xd84x22x50 Z= 4’, None, None, None, -48.0]
[u’C0SE21A01N2’, u’Carbide ANUBIS 0X TiAlN SQEM \xd81x4x\xd83x38 Z= 2’, None, None, None, 0]

I am still not able to figure out the problem:

Code used is:

i= 0
while i < len(data):
if not (data[i][3]):
data += [0]
else:
data += [((float(data[i][3])  /diff)*30)]
i +=1

Error:

--

  File "../app/stock/report/calculate_rol/calculate_rol.py", line 98, in get_sl_entries
    if not (data[i][3]):
 TypeError: 'int' object is unsubscriptable



On Wed, May 29, 2013 at 3:31 PM, Aditya Duggal <ad...@rigpl.com> wrote:
Rushabh,

I am still stuck on the last error and I am trying to figure out the problem once done I would update my gist since I have no idea about the forking and pushing on github and I would really need an idiot's guide on that....I hope you understand I am not a coder just a coding enthusiast nothing more.


On Wed, May 29, 2013 at 1:55 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Aditya if this works out, do send us the final version.

Or better, a pull request so it is officially recorded as your contribution :)

For that you must 

- set developer_mode=1
- login as Administrator,
- save the report (files will be created in the code folder)
- commit your changes
- push on your fork
- send us a pull request from GitHub

best,
Rushabh




On Tue, May 28, 2013 at 10:44 AM, Addy <ad...@rigpl.com> wrote:
Hi Nabin,

Thanks for pointing out the omission. I am facing another problem which is that I have 3 queries which I now need to join so that I could get the result in a consolidated format but I am unable to find any help on that, it would be great if you could guide me as to how should I join the 3 queries to get the consolidated result, I am attaching the report py file.



On Monday, May 27, 2013 9:46:16 AM UTC+5:30, Nabin Hait wrote:

Use tabStock Ledger Entry instead of tabStock Ledger Entry.


On 27-May-2013, at 1:43 AM, Addy wrote:

<calculate_rol.py>




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.




--



Twitter: @rushabh_mehta



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/CANn8SW%2BGSZw-BFt%3DUnhWTyNn2W59FxaG7RZv6QuBUjLdKraHUg%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/CAEmKBHzAo3VS8%2B1Xh1gXqqdmd1rc0AL2fjZYaZzZWMpMvy7g3g%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/F042035C-9448-4D78-A541-D77092E0B730%40erpnext.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/CAEmKBHy74q_DYvu5udddt-hsEiS3K0w0Gs7RZEXCMvQ-Zqqj9Q%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/A86455C7-2E17-4953-A969-1EFF9AA046DA%40erpnext.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/CAEmKBHx3VA2ZRzPO%3DuXokD-chYMGntQmG%3Dg1OvoLvR4ia4Nhcw%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/7E880150-4D14-4ADF-8CD1-2312894B7BB8%40erpnext.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/CAEmKBHzMi2UnW0ddHr4TDq0o_NajkjKRzzY7fJjNjZ-nfZtF0Q%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/B1F78265-3A8A-4FFF-B23B-93BE152CAA3A%40erpnext.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/CAEmKBHx2C07Zr2H9Cezn0RCfbbmTkEmKOpLTDGZdoH9y3vFW5Q%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/5D9AAE85-779F-40BC-982C-CCCD311B6FEE%40erpnext.com?hl=en.

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