From 28bb342f9691de8e45f9ca334ce152e2c2f4ec7f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 3 May 2012 10:41:19 +0530 Subject: [PATCH] list view for purchase receipt --- .../doctype/purchase_receipt/listview.js | 18 +++++++++++++++++ erpnext/stock/doctype/stock_entry/listview.js | 20 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 erpnext/stock/doctype/purchase_receipt/listview.js create mode 100644 erpnext/stock/doctype/stock_entry/listview.js diff --git a/erpnext/stock/doctype/purchase_receipt/listview.js b/erpnext/stock/doctype/purchase_receipt/listview.js new file mode 100644 index 0000000000..4275b54884 --- /dev/null +++ b/erpnext/stock/doctype/purchase_receipt/listview.js @@ -0,0 +1,18 @@ +// render +wn.doclistviews['Purchase Receipt'] = wn.views.ListView.extend({ + init: function(d) { + this._super(d); + this.fields = this.fields.concat([ + "`tabPurchase Receipt`.supplier_name", + "`tabPurchase Receipt`.purchase_order_no" + ]); + }, + columns: [ + {width: '5%', content:'avatar'}, + {width: '3%', content:'docstatus'}, + {width: '15%', content:'name'}, + {width: '50%', content:'tags+supplier_name', css: {color:'#aaa'}}, + {width: '15%', content:'purchase_order_no', type:'link', doctype:'Purchase Order Order'}, + {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} + ] +}); diff --git a/erpnext/stock/doctype/stock_entry/listview.js b/erpnext/stock/doctype/stock_entry/listview.js new file mode 100644 index 0000000000..4c52e9e7bb --- /dev/null +++ b/erpnext/stock/doctype/stock_entry/listview.js @@ -0,0 +1,20 @@ +// render +wn.doclistviews['Stock Entry'] = wn.views.ListView.extend({ + init: function(d) { + this._super(d); + this.fields = this.fields.concat([ + "`tabStock Entry`.purpose", + "`tabStock Entry`.from_warehouse", + "`tabStock Entry`.to_warehouse", + ]); + }, + columns: [ + {width: '5%', content:'avatar'}, + {width: '3%', content:'docstatus'}, + {width: '15%', content:'name'}, + {width: '18%', content:'tags+purpose', css: {color:'#aaa'}}, + {width: '18%', content:'from_warehouse', template: 'From %(from_warehouse)s'}, + {width: '18%', content:'to_warehouse', template: 'To %(to_warehouse)s'}, + {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} + ] +});