Files
odoo_source/addons/website/tests/__init__.py
T
Romain Derie 5505ef355c [FIX] website: make enable_editor=1 links work from backend
Since frontend to backend commit [1], links having `enable_editor=1` to
enable edit mode were not working anymore in certain cases.

Case 1 [OK]*:
From frontend, click on `enable_editor=1` link without `/@/` in it.

Case 2 [OK]:
From frontend, click on `enable_editor=1` link with `/@/` in it.

Case 3 [KO]*:
From backend, click on `enable_editor=1` link without `/@/` in it.

Case 4 [KO]:
From backend, click on `enable_editor=1` link with `/@/` in it.

This commit fixes case 4 and adds a test for all cases, while leaving
case 3 commented as it will be fixed later with a larger fix related to
URL change listener.

* Note that we will probably change the behavior for case 1 and 3: if
  the version with /@/ + enable_editor=1 enters edit mode properly in
  both frontend and backend contexts (case 2 and 4), it's probably not
  worth having code to support case 1 and 3.

The issue for case 4 was that it was trying to load the whole Odoo app
inside of website preview iframe instead of making the parent window
load that URL.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

closes odoo/odoo#96054

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-07-15 14:22:11 +02:00

31 lines
989 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import test_attachment
from . import test_auth_signup_uninvited
from . import test_automatic_editor
from . import test_base_url
from . import test_client_action
from . import test_configurator
from . import test_controllers
from . import test_converter
from . import test_crawl
from . import test_disable_unused_snippets_assets
from . import test_fuzzy
from . import test_get_current_website
from . import test_http_endpoint
from . import test_lang_url
from . import test_menu
from . import test_page
from . import test_performance
from . import test_qweb
from . import test_res_users
from . import test_snippets
from . import test_theme
from . import test_ui
from . import test_views
from . import test_views_inherit_module_update
from . import test_website_favicon
from . import test_website_form_editor
from . import test_website_reset_password
from . import test_website_visitor