-
- Downloads
[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:Quentin Smetz (qsm) <qsm@odoo.com>
Showing
- addons/http_routing/controllers/main.py 2 additions, 8 deletionsaddons/http_routing/controllers/main.py
- addons/http_routing/models/ir_http.py 29 additions, 0 deletionsaddons/http_routing/models/ir_http.py
- addons/portal/models/ir_http.py 1 addition, 28 deletionsaddons/portal/models/ir_http.py
- addons/portal/views/portal_templates.xml 38 additions, 60 deletionsaddons/portal/views/portal_templates.xml
- addons/rating/controllers/main.py 3 additions, 3 deletionsaddons/rating/controllers/main.py
- addons/rating/views/rating_template.xml 2 additions, 11 deletionsaddons/rating/views/rating_template.xml
- addons/survey/views/assets.xml 0 additions, 16 deletionsaddons/survey/views/assets.xml
- addons/survey/views/survey_templates.xml 11 additions, 38 deletionsaddons/survey/views/survey_templates.xml
- addons/web/models/ir_http.py 11 additions, 1 deletionaddons/web/models/ir_http.py
- addons/web/views/webclient_templates.xml 52 additions, 9 deletionsaddons/web/views/webclient_templates.xml
- addons/website/models/ir_http.py 10 additions, 24 deletionsaddons/website/models/ir_http.py
- addons/website/views/website_templates.xml 55 additions, 70 deletionsaddons/website/views/website_templates.xml
- addons/website_slides_survey/__manifest__.py 1 addition, 1 deletionaddons/website_slides_survey/__manifest__.py
- addons/website_survey/__init__.py 0 additions, 2 deletionsaddons/website_survey/__init__.py
- addons/website_survey/__manifest__.py 0 additions, 21 deletionsaddons/website_survey/__manifest__.py
- addons/website_survey/views/website_survey_templates.xml 0 additions, 18 deletionsaddons/website_survey/views/website_survey_templates.xml
Loading
Please register or sign in to comment