[fix] [minor] reorder level bug through scheduler

This commit is contained in:
Nabin Hait 2013-08-12 16:30:48 +05:30
parent 37fe72e4e9
commit bf5d44c804

View File

@ -184,7 +184,7 @@ def _get_buying_amount(voucher_type, voucher_no, item_row, stock_ledger_entries)
def reorder_item():
""" Reorder item if stock reaches reorder level"""
if not hasattr(webnotes, "auto_indent"):
webnotes.auto_indent = webnotes.conn.get_value('Stock Settings', None, 'auto_indent')
webnotes.auto_indent = cint(webnotes.conn.get_value('Stock Settings', None, 'auto_indent'))
if webnotes.auto_indent:
material_requests = {}
@ -280,8 +280,8 @@ def create_material_request(material_requests):
if mr_list:
if not hasattr(webnotes, "reorder_email_notify"):
webnotes.reorder_email_notify = webnotes.conn.get_value('Stock Settings', None,
'reorder_email_notify')
webnotes.reorder_email_notify = cint(webnotes.conn.get_value('Stock Settings', None,
'reorder_email_notify'))
if(webnotes.reorder_email_notify):
send_email_notification(mr_list)
@ -307,7 +307,6 @@ def send_email_notification(mr_list):
msg += "<tr><td>" + item.item_code + "</td><td>" + item.warehouse + "</td><td>" + \
cstr(item.qty) + "</td><td>" + cstr(item.uom) + "</td></tr>"
msg += "</table>"
sendmail(email_list, subject='Auto Material Request Generation Notification', msg = msg)
def notify_errors(exceptions_list):