def METHOD_NAME(self, row, column, value, role):
    if role == Qt.EditRole:
        attrname = column.name
        if attrname == "from":
            attrname = "from_"
        setattr(row, attrname, value)
        return True
    return False