return query

13 views
Skip to first unread message

gangadhar kadam

unread,
May 23, 2013, 1:14:03 AM5/23/13
to erpnext-dev...@googlegroups.com
Hello All,
   I have added return query to a link field. when i type "abc" in filter it should display values containing string "abc" but it shows all values . If i remove return query it works fine for key searching. Is there any thing i miss.

Regards,
Gangadhar kadam

Rushabh Mehta

unread,
May 23, 2013, 1:17:55 AM5/23/13
to erpnext-dev...@googlegroups.com
Gangadhar,

Like I said earlier, our magic eye system is not working. Please share what query you are using. The more information you give us, the faster we (or anyone) can reply to your question. Hope you keep this in mind for future queries on the forum.

- Rushabh


W: https://erpnext.com
T: @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...@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/9626acbd-785f-49da-9cdc-88c418b6c504%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

गंगाधर कदम

unread,
May 23, 2013, 3:42:13 AM5/23/13
to erpnext-dev...@googlegroups.com
Sorry sir,
   I am using following query

cur_frm.fields_dict['group_opm'].get_query = function(doc, cdt, cdn) {
  return "select p.name from tabProfile p,tabUserRole u where u.parent=p.name and u.role='Group Operations Manager'";
 }

I am using this query to filter profile having Group operation manager. If I use this query, I get correct result of query , if I type "abc" then it should display profile having Group operation manager role, but it displays all profiles having Group operation manager role .If i remove this script filter works correctly. Should i tried this also

cur_frm.fields_dict['group_opm'].get_query = function(doc, cdt, cdn) {
  return "select p.name from tabProfile p,tabUserRole u where u.parent=p.name and u.role='Group Operations Manager' and p.name like ' %"+doc.group_opm+"%' ";
 }

Thank you.



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



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

Anand Doshi

unread,
May 23, 2013, 4:03:33 AM5/23/13
to erpnext-dev...@googlegroups.com
Dear Gangadhar,

We have started shifting the get queries to server side. If you have access to modifying server side code, you can use this system.
Check cost_center get query in journal_voucher.js and its called method "get_cost_center_list" in accounts/utils.py

Else your query should be something like:
"select p.name from `tabProfile` p, `tabUserRole` u where u.parent=p.name and u.role=\"Group Operations Manager\" \
and %(key)s like \"%s%%\" "

Thanks,
Anand.


Reply all
Reply to author
Forward
0 new messages