[Fixes] material request's editable fields overriding with purchase common
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index d101ece..dbfda21 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -12,12 +12,14 @@
erpnext.buying.BuyingController = erpnext.TransactionController.extend({
setup: function() {
this._super();
- this.frm.get_field('items').grid.editable_fields = [
- {fieldname: 'item_code', columns: 4},
- {fieldname: 'qty', columns: 2},
- {fieldname: 'rate', columns: 3},
- {fieldname: 'amount', columns: 2}
- ];
+ if(!this.frm.get_field('items').grid.editable_fields){
+ this.frm.get_field('items').grid.editable_fields = [
+ {fieldname: 'item_code', columns: 4},
+ {fieldname: 'qty', columns: 2},
+ {fieldname: 'rate', columns: 3},
+ {fieldname: 'amount', columns: 2}
+ ];
+ }
},
onload: function() {