'Convert records to dict of values suitable for one2many line creation
:param recordset lines: records to convert
:return: list of command tuple for one2many line creation [(0, 0, dict of valueis), ...]'

@api.model
def _refund_cleanup_lines(self, lines):

    result = []
    for line in lines:
        values = {}
        for (name, field) in line._fields.iteritems():
            if (name in MAGIC_COLUMNS):
                continue
            elif (field.type == 'many2one'):
                values[name] = line[name].id
            elif (field.type not in ['many2many', 'one2many']):
                values[name] = line[name]
            elif (name == 'invoice_line_tax_ids'):
                values[name] = [(6, 0, line[name].ids)]
        result.append((0, 0, values))
    return result
