erpnext queries

203 views
Skip to first unread message

gangadhar kadam

unread,
Feb 22, 2013, 3:24:09 AM2/22/13
to erpnext-dev...@googlegroups.com
Hi
I am trying few things for customizing ERPNext. I have following queries:

1) How to create custom reports fetching data from two or more doctypes?

2) We want to fetch some values from a doctype when certain action happens in another doctype. This was done earlier using client/server triggers for a particular field while defining it in a doctype. I am not able to find that now. Please suggest how to get that functionality.

3) After creation of an Item in Stock module, the Item name field was automatically hidden. Is it a known bug or am I doing something wrong?

Please let me know answers to these queries.

Thanks, 

Rushabh Mehta

unread,
Feb 22, 2013, 4:32:40 AM2/22/13
to erpnext-dev...@googlegroups.com
Gangadhar,


Hi
I am trying few things for customizing ERPNext. I have following queries:

1) How to create custom reports fetching data from two or more doctypes?

Make a query report. To start go to #query-report in the address bar. See examples like Accounts > Delivered Items to be Billed.

2) We want to fetch some values from a doctype when certain action happens in another doctype. This was done earlier using client/server triggers for a particular field while defining it in a doctype. I am not able to find that now. Please suggest how to get that functionality.

You can make scripts Setup > Custom Script - can you explain what are you exactly trying to do?

3) After creation of an Item in Stock module, the Item name field was automatically hidden. Is it a known bug or am I doing something wrong?

Item Code is a one time use field hence it gets hidden. Item Name is not hidden please check.

Please let me know answers to these queries.

Thanks, 

--
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/-/aXLiazhCS1MJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

गंगाधर कदम

unread,
Feb 22, 2013, 9:49:07 AM2/22/13
to erpnext-dev...@googlegroups.com
Hello Sir,
    I have to add trigger on item code in delivery note such that after selecting item code i have to fetch and set quantity from stock entry table. Earlier this was done using field level client/server trigger when defining a doctype. In new system, I don't see any such option to define trigger.

Please suggest how this could be done without modifying core.

Regards,
--
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?

Rushabh Mehta

unread,
Feb 23, 2013, 12:18:42 PM2/23/13
to erpnext-dev...@googlegroups.com
Gangadhar,

You will have to write a client script for this. I can add a "get_value" standard method so you can query and fetch the value. Will do it Monday  -- If I forget, remind me :)

best,
Rushabh



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

गंगाधर कदम

unread,
Feb 25, 2013, 5:44:01 AM2/25/13
to erpnext-dev...@googlegroups.com
Hello Sir,
    Please let me know have you added the get_value method?.   

Thank you.

Regards,
Gangadhar kadam

Rushabh Mehta

unread,
Feb 26, 2013, 1:22:28 AM2/26/13
to erpnext-dev...@googlegroups.com
Rushabh


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

गंगाधर कदम

unread,
Mar 1, 2013, 12:39:56 AM3/1/13
to erpnext-dev...@googlegroups.com
Thank you sir,
    I have one more query, from child table can we pass multiple filters as follows ?

cur_frm.cscript.wash_type = function(doc,cdt,cdn) {
    var d = locals[cdt][cdn];
    if (d.wash_type) {
    get_server_fields('get_itemqty',d.wash_type,d.item_code,'delivery_note_details',doc,cdt,cdn,1); 
  }
}

for single filter it works but if i pass multiple parameters id shows undefined parameter error.

Regards,
Gangadhar kadam

Anand Doshi

unread,
Mar 1, 2013, 1:39:34 AM3/1/13
to erpnext-dev...@googlegroups.com
Dear Gangadhar,

Have a look at the scripts page: 

go to the heading: Fetching a table row's values in the form

Thanks,
Anand Doshi.

Anand Doshi

unread,
Mar 1, 2013, 2:00:41 AM3/1/13
to Anand Doshi, erpnext-dev...@googlegroups.com
Hi Gangadhar,

If you want to simply fetch values from a particular table's row, you can use the get value call as described in:
section: Get Values From Server

In the callback, you can update the returned values in r.message to the table's row like:
callback: function( r ) {
if(!r.exc) {
$.extend(d, r.message);  // where d is -- var d = locals[cdt][cdn];
}
}

If you want to use this, please do it tomorrow, as this update will be released by end of day.

Thanks,
Anand. 

गंगाधर कदम

unread,
Mar 1, 2013, 2:07:33 AM3/1/13
to erpnext-dev...@googlegroups.com
Yes sir,
   But as i understand the script are for only one doctype , I have to get value from sending filters for multiple doctype and multiple filters.

Thank you

Regards,
Gangadhar kadam

Anand Doshi

unread,
Mar 1, 2013, 2:25:34 AM3/1/13
to erpnext-dev...@googlegroups.com
Hi Gangadhar,

You should then use my previous recommendation: Fetching a table row's values in the form

In the server-side function, you can query multiple tables and send the resulting fields and values as a dictionary.

-Anand.

गंगाधर कदम

unread,
Mar 1, 2013, 5:04:00 AM3/1/13
to erpnext-dev...@googlegroups.com
Hello Sir,
   i have written custom on_update function in stock_entry.py for auto creation of sales order on my local setup. How can i use this as custom functionality for project uploaded on erpnext account.

Regards,
Gangadhar kadam

Rushabh Mehta

unread,
Mar 1, 2013, 5:12:38 AM3/1/13
to erpnext-dev...@googlegroups.com
Quick Answer: You can't - convince your customer to host on their own.

best,
Rushabh


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

Reply all
Reply to author
Forward
0 new messages