summaryrefslogtreecommitdiff
path: root/addons/web/data/report_layout.xml
AgeCommit message (Collapse)Author
2020-09-01[IMP] base: Document layout preview improvementsSimon Genin (ges)
The document layout preview is a complete defferent simplified template with its own css that replicates at best the different styles. It does not have the external layout features and lack of fidelity. The new preview actually use the real documents templates and put the result in an iframe. It now has a high fidelity, though not perfect. The goal is for a better onboarding, where clients see easely how documents will look if they had an app to generate them. Of course, the data on the document is a false invoice. Refactor all this from base to web. Task ID 2304177 closes odoo/odoo#56415 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-03-02[FIX] web, base: make company-specific report assets staticLucas Perais (lpe)
Before this commit, the company specific colors and font were implemented by systematically overwriting a "virtual" report SCSS asset file before rendering each report. This caused many issues, forced frequent asset bundles recomputations (performance problem + cache invalidation causing random bugs). And it could simply not work in a multi-company setup where multiple styles are involved, as the asset management could be made not thread-safe. PR #44225 was a first attempt to mitigate the numerous problems by making the asset bundle invalidation less frequent. But the problems were still present and a more complete solution was necessary for multi-company setups. Besides, the design of the bundle forbade making company specific assets. This commit uses a different approach: instead of having a company-specific asset that needs to be constantly updated, a global "multi-company" asset is maintained and included in the report assets. It only needs to be generated when a company style changes, not for every rendering operation. Unfortunately this change cannot be fully performed without updating the template declarations, so it will require an update of the `web` (or `base`) module to be operational. As this represents a rather invasive change in a stable branch, extensive testing was conducted to minimize the effects and ensure proper degradation of features for production deployments where the new code would be deployed without forcing an update of the `web` module: - The report SCSS files were left untouched, to prevent any bundle invalidation, ensuring that old cached assets would remain valid. This means that single-company setups should not see any visible difference after pulling the code (with or without updating `web`). SCSS cleanup will be done later. - Existing Python methods were kept but emptied, to make sure that old templates and code would not crash. - For multi-companies, the last used colors will be applied for all reports until the `web` module is updated. The old behavior was not working correctly anyways, so the degradation is actually limited. - For all setups, changing the colors after deploying this patch will have no effect unless the `web` module is updated. /UPDATED FOR master on top of #44393/: - removed the `res_company.update_scss()` method entirely - fixed the report SCSS styles, as the variable names referred to the old behavior, e.g. "$o-company-primary-color" is nonsense. Renamed to "$o-default-report-primary-color" etc. -- Improves #44225 Forward of #44393 opw-2168623 opw-2171040 closes odoo/odoo#46647 X-original-commit: a5b1421aecf27b1de408434d3bb6d7ac81f57dc3 Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-07-29[IMP] base: Configure document layoutJulien Mougenot
The onboarding modal for setting up the few base fields of a company has now been moved to a wizard It is accessible from the general settings, but also in the onboarding section of sale and account modules. The following company settings are editable with that wizard: - Set report **layout**: The user can chose the overall look of the report. The current choices are : *Standard* (default), *Background*, *Boxed* and *Clean*. - Set company **logo**: Changes the company logo. - Set report **colors**: The user can set the primary and secondary colors of the report through a newly added widget allowing to pick a custom color. When changing the **logo**, colors are automatically set to its most dominant colors. > A "Reset colors" button also triggers the color calculation. - Set report **font**: Changes the overall font of the report. Only Google Fonts are used for enhanced compatibility. - Company **tagline**, also called "header" - **Footer** - **Paper format** - Report **preview**: A mockup of a final report Automatically updates when changing **layout**, **logo**, **colors** or **font** Co-authored by: Julien Mougenot <jum@odoo.com> closes odoo/odoo#33863 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com> Co-authored-by: Lucas Perais <lpe@odoo.com>
2018-11-16[IMP] sale: onboarding and config barGeoffroy Larue
Improve various design elements in sales onboarding and config bar : Onboarding : - tooltip and done button Company info: - Move the incoterm field from company view to account settings. Document layout: - layout widget relabelling and reorganizing - paper format as required - added a Preview button Payment methods and sample quotation : - Style and relabelling
2018-08-13[IMP] base, *: use a many2one for the company report layoutChristophe Matthieu
Before this rev. one could set the report layout on the company using a hardcoded list (background, clean, standard, etc.). Other modules (typically accounting modules) could add options in this list. The used template was built on the layout key. Now, the layout is a many2one field to a newly created model `report.layout`, which is linked to a view with the layout architecture. This gives more control to customize reports and create a new layout (without creating a python module that extend the layout selection).