summaryrefslogtreecommitdiff
path: root/odoo/addons/base/wizard/base_document_layout.py
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-08-17[IMP] base,web: _for_xml_id as a safe access pointMartin Trigaux
/web/action/load is the public controller that Should be used by the webclient to fetch actions _for_xml_id is the default access method on actions that implements fields filtering to avoid leaking server action code or other information not needed by the webclient Implementing whitelist of fields that can be access per model
2020-05-14[IMP] *: convert to private methodsMartin Trigaux
render, render_template, load, activity_schedule_with_view, get_website_pages should all be private: It should not be possible to render an aribtrary template only with its name or id Still need to render some qweb views from js so the method render_template is kept public. This explains why the website editor still need read access on ir.ui.view as we want to allow any snippet to be rendered.
2019-10-14[FIX] tools, base: fix orientation of image with EXIF orientation tagSébastien Theys
Before this commit, some images would display incorrectly orientated. This typically happens for images taken from a non-standard orientation by some phones or other devices that are able to report orientation. The specified transposition is applied to the image before all other operations, because all of them expect the image to be in its final orientation, which is the case only when the first row of pixels is the top of the image and the first column of pixels is the left of the image. Moreover the EXIF tags will not be kept when the image is later saved, so the transposition has to be done to ensure the final image is correctly orientated. closes odoo/odoo#38717 X-original-commit: 0f8e132ec0495fcdfa0a47d5b9c98a2f6f10c7d8 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-10-01[FIX] base, account, product, hr_holidays: document layout save and printLucas Perais (lpe)
In an onboarding situation, the company doesn't have a logo make an invoice, send and print, print The document layout editor's layout opens, because nothing is set up on the company Click Save Before this commit, it was impossible to make the invoice print because each time the document layout was displayed After this commit, the invoice prints when clicking on Save There is no default external layout for main_company Also, the heuristic used to evaluate whether a company has been set up, onboardingly speaking, has changed. Before we used the existence of the logo, after we check if a layout has been setup. When saving the document layout modal, a report layout is written on the company So, practically, the document layout modal only appears once when trying to print invoices (or other documents) closes odoo/odoo#37137 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-16[FIX] base: document layout reset colors buttonJulien Mougenot
Fixed the button allowing to reset to the logo colors in the document layout configurator. Before this commit, the custom_colors boolean asserting that the colors used by the layout are different than the ones computed from the logo and used to revert to those colors was in readonly and couldn't be toggled. Now, the boolean is editable and allows to revert the colors properly. Task 2072557 closes odoo/odoo#36968 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-03[FIX] base: ill-defined model 'base.document.layout'Raphael Collet
2019-08-07[IMP] *: fix typos in commentsmreficent
closes odoo/odoo#35404 Signed-off-by: Martin Trigaux (mat) <mat@odoo.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>