'Returns list of advances against Account, Party, Reference'

def set_advances(self):

    res = self.get_advance_entries()
    self.set(u'advances', [])
    for d in res:
        self.append(u'advances', {u'doctype': (self.doctype + u'    Advance'), u'reference_type': d.reference_type, u'reference_name': d.reference_name, u'reference_row': d.reference_row, u'remarks': d.remarks, u'advance_amount': flt(d.amount), u'allocated_amount': (flt(d.amount) if d.against_order else 0)})
