'Insert Stock Ledger Entries'

def insert_entries(self, row):

    args = frappe._dict({u'doctype': u'Stock    Ledger    Entry', u'item_code': row.item_code, u'warehouse': row.warehouse, u'posting_date': self.posting_date, u'posting_time': self.posting_time, u'voucher_type': self.doctype, u'voucher_no': self.name, u'company': self.company, u'stock_uom': frappe.db.get_value(u'Item', row.item_code, u'stock_uom'), u'is_cancelled': u'No', u'qty_after_transaction': row.qty, u'valuation_rate': row.valuation_rate})
    self.make_sl_entries([args])
