[fix] [minor] new grid to hide delete button on new row & added description
diff --git a/setup/doctype/price_list/price_list.js b/setup/doctype/price_list/price_list.js
index cbca413..397e982 100644
--- a/setup/doctype/price_list/price_list.js
+++ b/setup/doctype/price_list/price_list.js
@@ -164,7 +164,7 @@
if (row)
this.dialog.set_values(this.make_dialog_values(row));
- $a(this.dialog.body, 'div', '', '', this.make_dialog_buttons());
+ $a(this.dialog.body, 'div', '', '', this.make_dialog_buttons(row));
this.dialog.show();
this.dialog.$wrapper.find('button.update').on('click', function() {
@@ -186,12 +186,12 @@
return dialog_values;
},
- make_dialog_buttons: function() {
+ make_dialog_buttons: function(row) {
var me = this;
var buttons = '<button class="btn btn-primary update">Update</button>';
// if user can delete then only add the delete button in dialog
- if (wn.model.can_delete(me.frm.doc.doctype))
+ if (wn.model.can_delete(me.frm.doc.doctype) && row)
buttons += ' <button class="btn btn-default delete">Delete</button>';
return buttons;
diff --git a/setup/doctype/price_list/price_list.txt b/setup/doctype/price_list/price_list.txt
index 46905a6..343331d 100644
--- a/setup/doctype/price_list/price_list.txt
+++ b/setup/doctype/price_list/price_list.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-25 11:35:09",
"docstatus": 0,
- "modified": "2013-09-06 15:03:38",
+ "modified": "2013-09-30 15:50:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -85,6 +85,7 @@
"reqd": 1
},
{
+ "description": "To change row values, click on the respective row",
"doctype": "DocField",
"fieldname": "item_prices_section",
"fieldtype": "Section Break",