Skip to content
Snippets Groups Projects
Commit e9be0bb1 authored by qsm-odoo's avatar qsm-odoo
Browse files

[REF] web, *: share common parts of main frontend layouts

* http_routing, portal, rating, survey, website, website_survey,
website_slides_survey

Before this commit, the final base layout of website was a fully
overridden layout of the one in portal, which was somehow a duplicated
one of the login one in web, which... so lots of duplicated code.

This commit is a first step towards a better organization:

1) The web app defines a frontend layout (to include base frontend
assets), with a base company logo as header.

2) The portal app modifies that layout in place to include the base
header, footer, ... It also uses a primary extension of it for
portal pages.

The survey app simply uses the above layout instead of defining its
own (by primary extension to include its own assets for its own
pages)

Same goes for the rating app and pages.

3) The website app modifies that layout in place to include the UI
assets, to add website UI, ... This allows to create frontend apps
which do not depend on website, with a non duplicated layout that
will be automatically adapted if website is ever installed (this
therefore allows to get rid of website_survey definitely)

This commit also fixes the session info system and the translation URL
on the frontend side to not require to redefine the whole session_info
for portal, website, ... Now the frontend session_info is defined in web
and http_routing extends it to add translation informations, then
website extends it again to add its own elements (not to redefine them
all as before). Note: before, http_routing defined the translation route
but only portal was adding it in its layout...
This is an adaptation of the work that was done with commit
https://github.com/odoo/odoo/commit/99821fdcf89aa66ac9561a972c6823135ebf65c0



Note 1: Many frontend but non-website apps (not only survey / rating)
could probably use this too but this would be the topic of another task.

Note 2: survey currently depends on http_routing but does not add itself
in the list of frontend apps to translate, it probably should.

Note 3: web_editor does currently not depend on http_routing but does
add itself in the list of frontend apps to translate, it thus uses a
function it does not really depend on... to check after its work-in-
progress refactoring.

task-1961045

closes odoo/odoo#33825

Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 8e30349f
No related branches found
No related tags found
No related merge requests found
Showing
with 215 additions and 310 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment