diff options
| author | Christophe Matthieu <chm@odoo.com> | 2018-08-29 13:48:25 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2018-09-04 19:01:20 +0200 |
| commit | f29df7fb2eed9bee7fa1f3452e1efa26f2dd4fb1 (patch) | |
| tree | 9654828162bd58d5da1f19d55773a1e97b471352 /addons/web/views/report_templates.xml | |
| parent | b67bb599b84093a53fdbd9185ce9cb4b2bbd52ff (diff) | |
[FIX] web: Fixed the printing of reports.
A new exception has been added to detect inconsistent reports. However, many are not structured as expected. Thus, the change consists mainly of checking only when the print has to be separated in part to attach it to the respective documents.
We now take the page tag instead of the article, because the article tag is in the layout, so to separate the file, the t-call had to be inside the t-foreach (for the separation) and so possibly read the assets several times. Since all templates have the first tag (in the t-foreach) tag page, the choice is more sensible.
The javascripts files used in readonly were taken out of the editing assets.
A turn was made but not activated, it works locally, but on the runbot, an error is triggered when generating assets after choosing the settings.
Diffstat (limited to 'addons/web/views/report_templates.xml')
| -rw-r--r-- | addons/web/views/report_templates.xml | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml index 6f83ae6254c..bc84d62a065 100644 --- a/addons/web/views/report_templates.xml +++ b/addons/web/views/report_templates.xml @@ -25,6 +25,12 @@ <link rel="stylesheet" type="text/scss" href="/web/static/src/scss/layout_background.scss"/> <link rel="stylesheet" type="text/scss" href="/web/static/src/scss/layout_boxed.scss"/> <link rel="stylesheet" type="text/scss" href="/web/static/src/scss/layout_clean.scss"/> + + <script type="text/javascript" src="web/static/src/js/services/session.js"/> + <script type="text/javascript" src="/web/static/src/js/report/utils.js"/> + <script type="text/javascript" src="/web_editor/static/src/js/content/body_manager.js"/> + <script type="text/javascript" src="/web_editor/static/src/js/root_widget.js"/> + <script type="text/javascript" src='/web/static/src/js/report/report.js' /> </template> <template id="report_assets_pdf"> @@ -37,7 +43,6 @@ <link rel="stylesheet" type="text/scss" href="/web/static/src/scss/report.editor.scss"/> <script type="text/javascript" src="/web/static/src/js/services/session.js"/> - <script type="text/javascript" src="/web/static/src/js/report/utils.js"/> <script type="text/javascript" src='/web/static/src/js/report/report.editor.js' /> </template> @@ -65,14 +70,13 @@ <t t-call-assets="web_editor.assets_editor" t-js="false"/> <t t-call-assets="web.report_assets_editor" t-js="false"/> </t> + <t t-call-assets="web.assets_common" t-css="false"/> + <t t-call-assets="web.report_assets_common" t-css="false"/> <t t-if="editable"> - <t t-call-assets="web.assets_common" t-css="false"/> <t t-call-assets="web_editor.summernote" t-css="false"/> <t t-call-assets="web_editor.assets_editor" t-css="false"/> <t t-call-assets="web.report_assets_editor" t-css="false"/> - <script type="text/javascript" src="/web_editor/static/src/js/content/body_manager.js"/> - <script type="text/javascript" src="/web_editor/static/src/js/root_widget.js"/> <script type="text/javascript" src="/web_editor/static/src/js/iframe.js"></script> <script t-if="enable_editor and inline_mode" type="text/javascript" src="/web_editor/static/src/js/inline.js"></script> </t> @@ -178,7 +182,7 @@ <div class="clearfix mb8"/> </div> - <div class="article o_report_layout_background" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id"> + <div class="article o_report_layout_background"> <t t-call="web.address_layout"/> <t t-raw="0"/> </div> @@ -218,7 +222,7 @@ </div> </div> - <div class="article o_report_layout_boxed" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id"> + <div class="article o_report_layout_boxed"> <t t-call="web.address_layout"/> <t t-raw="0"/> </div> @@ -257,7 +261,7 @@ </div> </div> - <div class="article o_report_layout_clean" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id"> + <div class="article o_report_layout_clean"> <t t-call="web.address_layout"/> <t t-raw="0"/> </div> @@ -305,7 +309,7 @@ </div> </div> - <div class="article o_report_layout_standard" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id"> + <div class="article o_report_layout_standard"> <t t-call="web.address_layout"/> <t t-raw="0"/> </div> @@ -386,16 +390,14 @@ </div> </div> </div> - <div class="article" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id"> + <div class="article"> <t t-raw="0"/> </div> </template> <template id="basic_layout"> - <t t-if="not o" t-set="o" t-value="doc"/> - <t t-call="web.html_container"> - <div class="article" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id"> + <div class="article"> <t t-raw="0"/> </div> </t> |
