'Formstyle for subform action-rows'

def rowstyle(self, form, fields, *args, **kwargs):

    def render_col(col_id, label, widget, comment, hidden=False):
        if (col_id == 'submit_record__row'):
            if hasattr(widget, 'add_class'):
                widget.add_class('inline-row-actions')
            col = TD(widget)
        elif comment:
            col = TD(DIV(widget, comment), _id=col_id)
        else:
            col = TD(widget, _id=col_id)
        return col
    if args:
        col_id = form
        label = fields
        (widget, comment) = args
        hidden = kwargs.get('hidden', False)
        return render_col(col_id, label, widget, comment, hidden)
    else:
        parent = TR()
        for (col_id, label, widget, comment) in fields:
            parent.append(render_col(col_id, label, widget, comment))
        return parent
