How to get Default Price List in Script Report?

Hi,

I have a field in a custom report which is a link field with Price List. I would like to automatically fill this field with the Default Price list mentioned in the Selling Settings but I am unable to achieve the same, kindly advice on the correct syntax for the same in JS file of the script report.

wn.query_reports["Price List"] = {
"filters": [
{
"fieldname":"price_list",
"label": "Price List",
"fieldtype": "Link",
"options": "Price List"
"default": wn.defaults.get_user_default("price_list")
}


Another thing I have noticed which seems kind of wrong is that the Price List table is under the stock module whereas price list settings, like setting the default price list is under the selling settings. I guess there is a disconnect and it might confuse the new users a bit and maybe the price list could be moved to the selling module if it does not create a lot of problem for the users.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    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 view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/e10943df-408f-4d70-a765-b75aa80432ad%40googlegroups.com.

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