diff --git a/buying/doctype/supplier/supplier.js b/buying/doctype/supplier/supplier.js index f258eb7a1d..82b477b253 100644 --- a/buying/doctype/supplier/supplier.js +++ b/buying/doctype/supplier/supplier.js @@ -91,4 +91,10 @@ cur_frm.cscript.make_contact = function() { // note: render_contact_row is defined in contact_control.js } cur_frm.contact_list.run(); +} + +cur_frm.fields_dict['default_price_list'].get_query = function(doc,cdt,cdn) { + return{ + filters:{'buying_or_selling': "Buying"} + } } \ No newline at end of file diff --git a/buying/doctype/supplier/supplier.txt b/buying/doctype/supplier/supplier.txt index e5a3486f2a..5c722f1c31 100644 --- a/buying/doctype/supplier/supplier.txt +++ b/buying/doctype/supplier/supplier.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:11", "docstatus": 0, - "modified": "2013-11-03 14:01:43", + "modified": "2013-11-19 11:31:28", "modified_by": "Administrator", "owner": "Administrator" }, @@ -153,6 +153,13 @@ "reqd": 1, "search_index": 0 }, + { + "doctype": "DocField", + "fieldname": "default_price_list", + "fieldtype": "Link", + "label": "Price List", + "options": "Price List" + }, { "doctype": "DocField", "fieldname": "default_currency", diff --git a/selling/doctype/customer/customer.js b/selling/doctype/customer/customer.js index ea1e93d43b..e4a9a2b54f 100644 --- a/selling/doctype/customer/customer.js +++ b/selling/doctype/customer/customer.js @@ -110,7 +110,7 @@ cur_frm.cscript.make_contact = function() { cur_frm.fields_dict['customer_group'].get_query = function(doc,dt,dn) { return{ filters:{'is_group': 'No'} - } + } } @@ -119,3 +119,9 @@ cur_frm.fields_dict.lead_name.get_query = function(doc,cdt,cdn) { query:"controllers.queries.lead_query" } } + +cur_frm.fields_dict['default_price_list'].get_query = function(doc,cdt,cdn) { + return{ + filters:{'buying_or_selling': "Selling"} + } +} diff --git a/stock/doctype/item/templates/includes/product_search_box.html b/stock/doctype/item/templates/includes/product_search_box.html index b4fa3e8783..00c001bd0c 100644 --- a/stock/doctype/item/templates/includes/product_search_box.html +++ b/stock/doctype/item/templates/includes/product_search_box.html @@ -13,17 +13,18 @@ \ No newline at end of file diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py index 684da46795..c4ed966544 100644 --- a/utilities/transaction_base.py +++ b/utilities/transaction_base.py @@ -120,6 +120,8 @@ class TransactionBase(StatusUpdater): out["supplier_name"] = supplier.supplier_name if supplier.default_currency: out["currency"] = supplier.default_currency + if supplier.default_price_list: + out["buying_price_list"] = supplier.default_price_list return out