call method

18 views
Skip to first unread message

gangadhar kadam

unread,
Mar 11, 2013, 10:10:36 AM3/11/13
to erpnext-dev...@googlegroups.com
Hello All,
   There is a doctype Eqiupment and it have generate_schedule method in old framework . There are 10000 records in Equipment table I have to call generate schedule method for all its records how can i implement this. 

Thank you.
Gangadhar kadam

Nabin Hait

unread,
Mar 11, 2013, 12:19:11 PM3/11/13
to erpnext-dev...@googlegroups.com
Select all equipments and run the following:
get_obj("Equipment", equipment_name, with_children=1).generate_schedule()


Regards,
Nabin Hait

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/ewVvpTzO8jMJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

गंगाधर कदम

unread,
Mar 12, 2013, 1:39:45 AM3/12/13
to erpnext-dev...@googlegroups.com
Thank you Sir,
   Should i run this in control panel?

res=sql("select name from tabEquipment")
for r in res:
   get_obj("Equipment", r[0], with_children=1).generate_schedule()

will it work?

Thank you sir.
--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444

Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune


SAVE TREES - Please consider the environment before printing this email.

SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping  prevent global warming by reducing consumption of power... ARE YOU?

Nabin Hait

unread,
Mar 12, 2013, 2:07:23 AM3/12/13
to erpnext-dev...@googlegroups.com
It should work. Record must be saved from the called function, after adding row in the table.


Regards,
Nabin Hait

गंगाधर कदम

unread,
Mar 12, 2013, 5:00:28 AM3/12/13
to erpnext-dev...@googlegroups.com
Thank you sir,
   It is working but the created child record did not saved, how can i save them . pmh is an instance for preventive maintenance history table which i have to save. how should i implement it .

res=sql("select name from tabEquipment where status='In AMC'")
i=0
for r in res:
  get_obj("Equipment",r[i], with_children=1).generate_schedule()

Thank you Sir,

Nabin Hait

unread,
Mar 12, 2013, 6:36:01 AM3/12/13
to erpnext-dev...@googlegroups.com
Schedule records should be saved after adding, through generate_schedule() function.

Regards,
Nabin Hait
Reply all
Reply to author
Forward
0 new messages