Advertisement
saurabh6790

Untitled

Oct 7th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. from __future__ import unicode_literals
  2. import webnotes
  3. from webnotes.utils import cstr
  4.  
  5. def execute(filters=None):
  6.     if not filters: filters ={}
  7.     data = []
  8.     i = 1
  9.     columns = ['Check::','Item:Link/Item:120', 'creation::', 'modified', 'Description::120', 'last purchase rate::80']
  10.     data = webnotes.conn.sql("select name, creation, modified, description, last_purchase_rate from `tabItem`", as_list=1)
  11.     for d in data:
  12.         d.insert(0, '<input type="checkbox" id="'+ cstr(i) +'">')
  13.         i = i+1
  14.  
  15.     return columns, data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement