[selling] changed fieldtype of Price List to link
This commit is contained in:
parent
23de6df72e
commit
720a01a6f6
@ -18,8 +18,10 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
|
|||||||
$c_obj(make_doclist(cdt,cdn),'get_series','',function(r,rt){
|
$c_obj(make_doclist(cdt,cdn),'get_series','',function(r,rt){
|
||||||
if(r.message) set_field_options('naming_series', r.message);
|
if(r.message) set_field_options('naming_series', r.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
cur_frm.set_query("price_list_name", function() {
|
||||||
|
return { filters: { buying_or_selling: "Selling" } };
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//cash bank account
|
//cash bank account
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 12:15:51",
|
"creation": "2013-05-24 12:15:51",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:50:33",
|
"modified": "2013-07-26 11:16:53",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -94,11 +94,11 @@
|
|||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "price_list_name",
|
"fieldname": "price_list_name",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Link",
|
||||||
"label": "Price List",
|
"label": "Price List",
|
||||||
"oldfieldname": "price_list_name",
|
"oldfieldname": "price_list_name",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Price List",
|
"options": "Price List",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 19:29:05",
|
"creation": "2013-05-24 19:29:05",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-25 16:08:10",
|
"modified": "2013-07-26 11:16:58",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -247,11 +247,11 @@
|
|||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "price_list_name",
|
"fieldname": "price_list_name",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Link",
|
||||||
"label": "Price List",
|
"label": "Price List",
|
||||||
"oldfieldname": "price_list_name",
|
"oldfieldname": "price_list_name",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Price List",
|
"options": "Price List",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 19:29:08",
|
"creation": "2013-05-24 19:29:08",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-23 15:27:53",
|
"modified": "2013-07-26 11:16:53",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -281,12 +281,12 @@
|
|||||||
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "price_list_name",
|
"fieldname": "price_list_name",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Link",
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"label": "Price List",
|
"label": "Price List",
|
||||||
"oldfieldname": "price_list_name",
|
"oldfieldname": "price_list_name",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Price List",
|
"options": "Price List",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
|
|||||||
@ -70,6 +70,22 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
this.frm.fields_dict.lead && this.frm.set_query("lead", function(doc,cdt,cdn) {
|
this.frm.fields_dict.lead && this.frm.set_query("lead", function(doc,cdt,cdn) {
|
||||||
return{ query:"controllers.queries.lead_query" } });
|
return{ query:"controllers.queries.lead_query" } });
|
||||||
|
|
||||||
|
if(this.frm.fields_dict.price_list_name) {
|
||||||
|
this.frm.set_query("price_list_name", function() {
|
||||||
|
return { filters: { buying_or_selling: "Selling" } };
|
||||||
|
});
|
||||||
|
|
||||||
|
this.frm.set_query("price_list_currency", function() {
|
||||||
|
return {
|
||||||
|
query: "controllers.queries.get_price_list_currency",
|
||||||
|
filters: {
|
||||||
|
price_list_name: me.frm.doc.price_list_name,
|
||||||
|
buying_or_selling: "Selling"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(!this.fname) {
|
if(!this.fname) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-06-18 12:39:59",
|
"creation": "2013-06-18 12:39:59",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-23 15:27:39",
|
"modified": "2013-07-26 11:16:55",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -294,11 +294,11 @@
|
|||||||
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "price_list_name",
|
"fieldname": "price_list_name",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Link",
|
||||||
"label": "Price List",
|
"label": "Price List",
|
||||||
"oldfieldname": "price_list_name",
|
"oldfieldname": "price_list_name",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Price List",
|
"options": "Price List",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-25 11:35:09",
|
"creation": "2013-01-25 11:35:09",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-23 12:03:25",
|
"modified": "2013-07-26 11:19:06",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -55,6 +55,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "currency",
|
"fieldname": "currency",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
"label": "Currency",
|
"label": "Currency",
|
||||||
"options": "Currency",
|
"options": "Currency",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
@ -64,6 +65,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "buying_or_selling",
|
"fieldname": "buying_or_selling",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
|
"in_list_view": 1,
|
||||||
"label": "Valid for Buying or Selling?",
|
"label": "Valid for Buying or Selling?",
|
||||||
"options": "Buying\nSelling",
|
"options": "Buying\nSelling",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 19:29:09",
|
"creation": "2013-05-24 19:29:09",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-23 15:28:18",
|
"modified": "2013-07-26 11:16:57",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -286,11 +286,11 @@
|
|||||||
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "price_list_name",
|
"fieldname": "price_list_name",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Link",
|
||||||
"label": "Price List",
|
"label": "Price List",
|
||||||
"oldfieldname": "price_list_name",
|
"oldfieldname": "price_list_name",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Price List",
|
"options": "Price List",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user