def METHOD_NAME(self):
    src = self._get_object()
    dbsession = self._request.dbsession
    default_wmts = LayerWMTS.get_default(dbsession)
    values = {
        'url': default_wmts.url,
        'matrix_set': default_wmts.matrix_set
    } if default_wmts else {
        'url': '',
        'matrix_set': ''
    }
    with dbsession.no_autoflush:
        d = delete(LayerWMS.__table__)
        d = d.where(LayerWMS.__table__.c.id == src.id)
        i = insert(LayerWMTS.__table__)
        values.update({
            'id': src.id,
            'layer': src.layer,
            'image_type': src.ogc_server.image_type,
            'style': src.style
        })
        i = i.values(values)
        u = update(TreeItem.__table__)
        u = u.where(TreeItem.__table__.c.id == src.id)
        u = u.values({'type': 'l_wmts'})
        dbsession.execute(d)
        dbsession.execute(i)
        dbsession.execute(u)
        dbsession.expunge(src)
    dbsession.flush()
    mark_changed(dbsession)
    return {
        'success': True,
        'redirect': self._request.route_url(
            'c2cgeoform_item',
            table='layers_wmts',
            id=self._request.matchdict['id'],
            _query=[('msg_col', 'submit_ok')])
    }