Daily updates from Odoo
Tuesday, June 4, 2019
3 changes
Code cleanup and technical improvements
The mail Chatter topbar layout was reorganized to be easier to maintain while keeping the same visual behavior for users. Follower dropdown controls were also made more consistent and accessible, reducing the risk of display or interaction issues in future updates.
Original PR description
The Chatter's topbar (containing the buttons like 'Send Message', 'Log Note') was difficult to deal with: specially the positioning of its content (a float into another float...). So, this commit refactors the topbar's layout using Flexbox. It allows to simplify and reduce the amount of (S)CSS needed to achieve the same visual result. In the process, the Followers (dropdown) buttons now use correctly nested .btn-group components (as described by the Bootstrap 4 documentation) and SubTypes dropdown items use semantic html element (<button>) instead of attaching behavior on icon element(<i>). Finally a few Chatter's tests requested a slight adaptation (cf. trimming element's textual content). Task ID: 1928573
Odoo’s public-facing pages now share a common layout foundation instead of each app maintaining duplicated page structure. This makes portal, survey, rating, and website pages easier to maintain and helps future frontend apps work consistently whether or not the Website app is installed.
Original PR description
* 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…
* 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
This change aligns the enterprise document and web interface templates with related updates in the main Odoo platform. It is an internal cleanup to keep the enterprise modules compatible and maintainable, with little direct impact on day-to-day users.
Original PR description
* web_enterprise, documents task-1961045