Odoo 11 Qweb headers missing in PDF reports
Using Odoo 11 with wkhtmltopdf verion 0.12.1.3
All the default headers are not on any of the PDF reports I print, even when I try to preview the document templates in general settings.
I still have the footers though.
Furthermore the reports are very plain now, like the table-striped that has become a white plain column, or "row" that doesn't show the elements inside in a row but rather one under the other.
Edit :
To illustrate my problem here is what happen when I chose the Standard template in General Settings and I try to Preview the document.
There is what happends
What's strange is that I didn't touch - I don't think so - this header in any way (even though I've done some custom reports but unrelated).
Here is the code of web.external_layout_standard:
<?xml version="1.0"?>
<t t-name="web.external_layout_standard">
<div class="header">
<div class="row">
<div class="col-xs-3 mb4">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" style="max-height: 45px;"/>
</div>
<div class="col-xs-9 text-right" style="margin-top:22px;" t-field="company.report_header" name="moto"/>
</div>
<div t-if="company.logo or company.report_header" class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"/>
</div>
</div>
<div class="row">
<div class="col-xs-6" name="company_address">
<span t-field="company.partner_id" t-field-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}" style="border-bottom: 1px solid black; display:inline-block;"/>
</div>
</div>
</div>
<div class="article o_report_layout_standard">
<t t-raw="0"/>
</div>
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul class="list-inline mb4">
<li t-if="company.phone">Phone: <span t-field="company.phone"/></li>
<li t-if="company.email">Email: <span t-field="company.email"/></li>
<li t-if="company.website">Web: <span t-field="company.website"/></li>
<li t-if="company.vat"><t t-esc="company.country_id.vat_label or 'TIN'"/>: <span t-field="company.vat"/></li>
</ul>
<div name="financial_infos">
<span t-field="company.report_footer"/>
</div>
<div class="text-muted">
Page: <span class="page"/> / <span class="topage"/>
</div>
</div>
</div>
</t>
EDIT temporary SOLUTION
It might have been a cache problem since we were several people working on the same admin account at the same time.
Thus I copied the database. Checked it worked well in my new database (eureka!). Erased the old one. And changed the name of the copy by the old name.
BUT! at some point it keeps despairing again. I'm doing qweb changes in custom reports so I don't touch the headers but maybe it's connected...
odoo odoo-11 qweb
|
show 2 more comments
Using Odoo 11 with wkhtmltopdf verion 0.12.1.3
All the default headers are not on any of the PDF reports I print, even when I try to preview the document templates in general settings.
I still have the footers though.
Furthermore the reports are very plain now, like the table-striped that has become a white plain column, or "row" that doesn't show the elements inside in a row but rather one under the other.
Edit :
To illustrate my problem here is what happen when I chose the Standard template in General Settings and I try to Preview the document.
There is what happends
What's strange is that I didn't touch - I don't think so - this header in any way (even though I've done some custom reports but unrelated).
Here is the code of web.external_layout_standard:
<?xml version="1.0"?>
<t t-name="web.external_layout_standard">
<div class="header">
<div class="row">
<div class="col-xs-3 mb4">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" style="max-height: 45px;"/>
</div>
<div class="col-xs-9 text-right" style="margin-top:22px;" t-field="company.report_header" name="moto"/>
</div>
<div t-if="company.logo or company.report_header" class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"/>
</div>
</div>
<div class="row">
<div class="col-xs-6" name="company_address">
<span t-field="company.partner_id" t-field-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}" style="border-bottom: 1px solid black; display:inline-block;"/>
</div>
</div>
</div>
<div class="article o_report_layout_standard">
<t t-raw="0"/>
</div>
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul class="list-inline mb4">
<li t-if="company.phone">Phone: <span t-field="company.phone"/></li>
<li t-if="company.email">Email: <span t-field="company.email"/></li>
<li t-if="company.website">Web: <span t-field="company.website"/></li>
<li t-if="company.vat"><t t-esc="company.country_id.vat_label or 'TIN'"/>: <span t-field="company.vat"/></li>
</ul>
<div name="financial_infos">
<span t-field="company.report_footer"/>
</div>
<div class="text-muted">
Page: <span class="page"/> / <span class="topage"/>
</div>
</div>
</div>
</t>
EDIT temporary SOLUTION
It might have been a cache problem since we were several people working on the same admin account at the same time.
Thus I copied the database. Checked it worked well in my new database (eureka!). Erased the old one. And changed the name of the copy by the old name.
BUT! at some point it keeps despairing again. I'm doing qweb changes in custom reports so I don't touch the headers but maybe it's connected...
odoo odoo-11 qweb
Can you be more specific what exactly you want in apart from header issue ? Also from header issue you might get imported wrong template or something done with design issue. Can you show us the code and current report format you got?
– Keval Mehta
Aug 23 '18 at 7:27
I edited the post ! Thanks for the query.
– Joel Perez Torrents
Aug 23 '18 at 8:46
Btw, how can I change to defalut parameters (design + templates) ?
– Joel Perez Torrents
Aug 23 '18 at 8:58
How is you Odoo setup? Plain installation (apt or whatever) or a Docker Setup? Do you use a web proxy? Sometimes you have to add a system parameter in Odooreport.url
with value127.0.0.1:8069
(Maybe another port, depending on your setup).
– CZoellner
Aug 23 '18 at 9:08
Odoo was installed with official documentation available here : odoo.com/documentation/11.0/setup/install.html And it was a source install (odoo.com/documentation/11.0/setup/install.html#source-install) on Ubuntu 18. No proxy. What isreport.url
? I don't know were to find it.
– Joel Perez Torrents
Aug 23 '18 at 9:14
|
show 2 more comments
Using Odoo 11 with wkhtmltopdf verion 0.12.1.3
All the default headers are not on any of the PDF reports I print, even when I try to preview the document templates in general settings.
I still have the footers though.
Furthermore the reports are very plain now, like the table-striped that has become a white plain column, or "row" that doesn't show the elements inside in a row but rather one under the other.
Edit :
To illustrate my problem here is what happen when I chose the Standard template in General Settings and I try to Preview the document.
There is what happends
What's strange is that I didn't touch - I don't think so - this header in any way (even though I've done some custom reports but unrelated).
Here is the code of web.external_layout_standard:
<?xml version="1.0"?>
<t t-name="web.external_layout_standard">
<div class="header">
<div class="row">
<div class="col-xs-3 mb4">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" style="max-height: 45px;"/>
</div>
<div class="col-xs-9 text-right" style="margin-top:22px;" t-field="company.report_header" name="moto"/>
</div>
<div t-if="company.logo or company.report_header" class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"/>
</div>
</div>
<div class="row">
<div class="col-xs-6" name="company_address">
<span t-field="company.partner_id" t-field-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}" style="border-bottom: 1px solid black; display:inline-block;"/>
</div>
</div>
</div>
<div class="article o_report_layout_standard">
<t t-raw="0"/>
</div>
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul class="list-inline mb4">
<li t-if="company.phone">Phone: <span t-field="company.phone"/></li>
<li t-if="company.email">Email: <span t-field="company.email"/></li>
<li t-if="company.website">Web: <span t-field="company.website"/></li>
<li t-if="company.vat"><t t-esc="company.country_id.vat_label or 'TIN'"/>: <span t-field="company.vat"/></li>
</ul>
<div name="financial_infos">
<span t-field="company.report_footer"/>
</div>
<div class="text-muted">
Page: <span class="page"/> / <span class="topage"/>
</div>
</div>
</div>
</t>
EDIT temporary SOLUTION
It might have been a cache problem since we were several people working on the same admin account at the same time.
Thus I copied the database. Checked it worked well in my new database (eureka!). Erased the old one. And changed the name of the copy by the old name.
BUT! at some point it keeps despairing again. I'm doing qweb changes in custom reports so I don't touch the headers but maybe it's connected...
odoo odoo-11 qweb
Using Odoo 11 with wkhtmltopdf verion 0.12.1.3
All the default headers are not on any of the PDF reports I print, even when I try to preview the document templates in general settings.
I still have the footers though.
Furthermore the reports are very plain now, like the table-striped that has become a white plain column, or "row" that doesn't show the elements inside in a row but rather one under the other.
Edit :
To illustrate my problem here is what happen when I chose the Standard template in General Settings and I try to Preview the document.
There is what happends
What's strange is that I didn't touch - I don't think so - this header in any way (even though I've done some custom reports but unrelated).
Here is the code of web.external_layout_standard:
<?xml version="1.0"?>
<t t-name="web.external_layout_standard">
<div class="header">
<div class="row">
<div class="col-xs-3 mb4">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" style="max-height: 45px;"/>
</div>
<div class="col-xs-9 text-right" style="margin-top:22px;" t-field="company.report_header" name="moto"/>
</div>
<div t-if="company.logo or company.report_header" class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"/>
</div>
</div>
<div class="row">
<div class="col-xs-6" name="company_address">
<span t-field="company.partner_id" t-field-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}" style="border-bottom: 1px solid black; display:inline-block;"/>
</div>
</div>
</div>
<div class="article o_report_layout_standard">
<t t-raw="0"/>
</div>
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul class="list-inline mb4">
<li t-if="company.phone">Phone: <span t-field="company.phone"/></li>
<li t-if="company.email">Email: <span t-field="company.email"/></li>
<li t-if="company.website">Web: <span t-field="company.website"/></li>
<li t-if="company.vat"><t t-esc="company.country_id.vat_label or 'TIN'"/>: <span t-field="company.vat"/></li>
</ul>
<div name="financial_infos">
<span t-field="company.report_footer"/>
</div>
<div class="text-muted">
Page: <span class="page"/> / <span class="topage"/>
</div>
</div>
</div>
</t>
EDIT temporary SOLUTION
It might have been a cache problem since we were several people working on the same admin account at the same time.
Thus I copied the database. Checked it worked well in my new database (eureka!). Erased the old one. And changed the name of the copy by the old name.
BUT! at some point it keeps despairing again. I'm doing qweb changes in custom reports so I don't touch the headers but maybe it's connected...
odoo odoo-11 qweb
odoo odoo-11 qweb
edited Aug 24 '18 at 10:43
Joel Perez Torrents
asked Aug 23 '18 at 7:19
Joel Perez TorrentsJoel Perez Torrents
62
62
Can you be more specific what exactly you want in apart from header issue ? Also from header issue you might get imported wrong template or something done with design issue. Can you show us the code and current report format you got?
– Keval Mehta
Aug 23 '18 at 7:27
I edited the post ! Thanks for the query.
– Joel Perez Torrents
Aug 23 '18 at 8:46
Btw, how can I change to defalut parameters (design + templates) ?
– Joel Perez Torrents
Aug 23 '18 at 8:58
How is you Odoo setup? Plain installation (apt or whatever) or a Docker Setup? Do you use a web proxy? Sometimes you have to add a system parameter in Odooreport.url
with value127.0.0.1:8069
(Maybe another port, depending on your setup).
– CZoellner
Aug 23 '18 at 9:08
Odoo was installed with official documentation available here : odoo.com/documentation/11.0/setup/install.html And it was a source install (odoo.com/documentation/11.0/setup/install.html#source-install) on Ubuntu 18. No proxy. What isreport.url
? I don't know were to find it.
– Joel Perez Torrents
Aug 23 '18 at 9:14
|
show 2 more comments
Can you be more specific what exactly you want in apart from header issue ? Also from header issue you might get imported wrong template or something done with design issue. Can you show us the code and current report format you got?
– Keval Mehta
Aug 23 '18 at 7:27
I edited the post ! Thanks for the query.
– Joel Perez Torrents
Aug 23 '18 at 8:46
Btw, how can I change to defalut parameters (design + templates) ?
– Joel Perez Torrents
Aug 23 '18 at 8:58
How is you Odoo setup? Plain installation (apt or whatever) or a Docker Setup? Do you use a web proxy? Sometimes you have to add a system parameter in Odooreport.url
with value127.0.0.1:8069
(Maybe another port, depending on your setup).
– CZoellner
Aug 23 '18 at 9:08
Odoo was installed with official documentation available here : odoo.com/documentation/11.0/setup/install.html And it was a source install (odoo.com/documentation/11.0/setup/install.html#source-install) on Ubuntu 18. No proxy. What isreport.url
? I don't know were to find it.
– Joel Perez Torrents
Aug 23 '18 at 9:14
Can you be more specific what exactly you want in apart from header issue ? Also from header issue you might get imported wrong template or something done with design issue. Can you show us the code and current report format you got?
– Keval Mehta
Aug 23 '18 at 7:27
Can you be more specific what exactly you want in apart from header issue ? Also from header issue you might get imported wrong template or something done with design issue. Can you show us the code and current report format you got?
– Keval Mehta
Aug 23 '18 at 7:27
I edited the post ! Thanks for the query.
– Joel Perez Torrents
Aug 23 '18 at 8:46
I edited the post ! Thanks for the query.
– Joel Perez Torrents
Aug 23 '18 at 8:46
Btw, how can I change to defalut parameters (design + templates) ?
– Joel Perez Torrents
Aug 23 '18 at 8:58
Btw, how can I change to defalut parameters (design + templates) ?
– Joel Perez Torrents
Aug 23 '18 at 8:58
How is you Odoo setup? Plain installation (apt or whatever) or a Docker Setup? Do you use a web proxy? Sometimes you have to add a system parameter in Odoo
report.url
with value 127.0.0.1:8069
(Maybe another port, depending on your setup).– CZoellner
Aug 23 '18 at 9:08
How is you Odoo setup? Plain installation (apt or whatever) or a Docker Setup? Do you use a web proxy? Sometimes you have to add a system parameter in Odoo
report.url
with value 127.0.0.1:8069
(Maybe another port, depending on your setup).– CZoellner
Aug 23 '18 at 9:08
Odoo was installed with official documentation available here : odoo.com/documentation/11.0/setup/install.html And it was a source install (odoo.com/documentation/11.0/setup/install.html#source-install) on Ubuntu 18. No proxy. What is
report.url
? I don't know were to find it.– Joel Perez Torrents
Aug 23 '18 at 9:14
Odoo was installed with official documentation available here : odoo.com/documentation/11.0/setup/install.html And it was a source install (odoo.com/documentation/11.0/setup/install.html#source-install) on Ubuntu 18. No proxy. What is
report.url
? I don't know were to find it.– Joel Perez Torrents
Aug 23 '18 at 9:14
|
show 2 more comments
1 Answer
1
active
oldest
votes
It seems that your pdf processor (wkthmltopdf) is not finding the proper CSS to form the reports. I solved this issue in Odoo 11 with the following steps:
- Create a new system parameter
report.url
For this go to Settings -> Parameters -> System
and check if the parameter report.url
exists. If not create it.
- Set the value of
report.url
to http://127.0.0.1:8069 or http://0.0.0.0:8069
This is by the way the approach suggested by CZoellner. I have learnt more insight from the discussion on headers and CSS in reports at Odoo Help.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51980302%2fodoo-11-qweb-headers-missing-in-pdf-reports%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It seems that your pdf processor (wkthmltopdf) is not finding the proper CSS to form the reports. I solved this issue in Odoo 11 with the following steps:
- Create a new system parameter
report.url
For this go to Settings -> Parameters -> System
and check if the parameter report.url
exists. If not create it.
- Set the value of
report.url
to http://127.0.0.1:8069 or http://0.0.0.0:8069
This is by the way the approach suggested by CZoellner. I have learnt more insight from the discussion on headers and CSS in reports at Odoo Help.
add a comment |
It seems that your pdf processor (wkthmltopdf) is not finding the proper CSS to form the reports. I solved this issue in Odoo 11 with the following steps:
- Create a new system parameter
report.url
For this go to Settings -> Parameters -> System
and check if the parameter report.url
exists. If not create it.
- Set the value of
report.url
to http://127.0.0.1:8069 or http://0.0.0.0:8069
This is by the way the approach suggested by CZoellner. I have learnt more insight from the discussion on headers and CSS in reports at Odoo Help.
add a comment |
It seems that your pdf processor (wkthmltopdf) is not finding the proper CSS to form the reports. I solved this issue in Odoo 11 with the following steps:
- Create a new system parameter
report.url
For this go to Settings -> Parameters -> System
and check if the parameter report.url
exists. If not create it.
- Set the value of
report.url
to http://127.0.0.1:8069 or http://0.0.0.0:8069
This is by the way the approach suggested by CZoellner. I have learnt more insight from the discussion on headers and CSS in reports at Odoo Help.
It seems that your pdf processor (wkthmltopdf) is not finding the proper CSS to form the reports. I solved this issue in Odoo 11 with the following steps:
- Create a new system parameter
report.url
For this go to Settings -> Parameters -> System
and check if the parameter report.url
exists. If not create it.
- Set the value of
report.url
to http://127.0.0.1:8069 or http://0.0.0.0:8069
This is by the way the approach suggested by CZoellner. I have learnt more insight from the discussion on headers and CSS in reports at Odoo Help.
edited Nov 22 '18 at 5:06
answered Nov 22 '18 at 4:41
JuanJuan
83
83
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51980302%2fodoo-11-qweb-headers-missing-in-pdf-reports%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you be more specific what exactly you want in apart from header issue ? Also from header issue you might get imported wrong template or something done with design issue. Can you show us the code and current report format you got?
– Keval Mehta
Aug 23 '18 at 7:27
I edited the post ! Thanks for the query.
– Joel Perez Torrents
Aug 23 '18 at 8:46
Btw, how can I change to defalut parameters (design + templates) ?
– Joel Perez Torrents
Aug 23 '18 at 8:58
How is you Odoo setup? Plain installation (apt or whatever) or a Docker Setup? Do you use a web proxy? Sometimes you have to add a system parameter in Odoo
report.url
with value127.0.0.1:8069
(Maybe another port, depending on your setup).– CZoellner
Aug 23 '18 at 9:08
Odoo was installed with official documentation available here : odoo.com/documentation/11.0/setup/install.html And it was a source install (odoo.com/documentation/11.0/setup/install.html#source-install) on Ubuntu 18. No proxy. What is
report.url
? I don't know were to find it.– Joel Perez Torrents
Aug 23 '18 at 9:14