blob: c6b6ce39f777b03d85f9f87db9811c76ae13fba1 [file] [log] [blame]
Nabin Haite4e88c92012-09-24 15:40:56 +05301# ERPNext - web based ERP (http://erpnext.com)
2# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17from __future__ import unicode_literals
18def execute():
19 import webnotes
20 from webnotes.model.code import get_obj
Nabin Haitde7fcc62012-09-24 15:53:01 +053021 bin = webnotes.conn.sql("select name from `tabBin`")
Nabin Haite4e88c92012-09-24 15:40:56 +053022 i=0
23 for d in bin:
24 try:
25 get_obj('Bin', d[0]).update_entries_after('2000-01-01', '12:05')
26 except:
27 pass
28 i += 1
29 if i%100 == 0:
30 webnotes.conn.sql("commit")
31 webnotes.conn.sql("start transaction")