Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header and footer missing in invoice in Odoo v8 #10393

Closed
neeohw opened this issue Jan 11, 2016 · 8 comments
Closed

Header and footer missing in invoice in Odoo v8 #10393

neeohw opened this issue Jan 11, 2016 · 8 comments
Assignees

Comments

@neeohw
Copy link

neeohw commented Jan 11, 2016

I have a fresh install of Odoo v8.0.0.FINAL on Ubuntu 15.04.
I have tried everything as described in the solutions for #1105
But still, when I generate a PDF from an invoice, there's no header and footer. When I select to generate only HTML, I can see the header and footer in the popup window.

wkhtmltopdf --version
0.12.1

odoo-server.log

2016-01-11 09:01:17,848 4002 INFO ? werkzeug: 127.0.0.1 - - [11/Jan/2016 09:01:17] "GET /report/static/src/css/reset.min.css HTTP/1.1" 200 -
2016-01-11 09:01:17,863 4002 INFO ? werkzeug: 127.0.0.1 - - [11/Jan/2016 09:01:17] "GET /website/static/src/css/website.css HTTP/1.1" 200 -
2016-01-11 09:01:17,865 4002 INFO ? werkzeug: 127.0.0.1 - - [11/Jan/2016 09:01:17] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 200 -
2016-01-11 09:01:17,868 4002 INFO ? werkzeug: 127.0.0.1 - - [11/Jan/2016 09:01:17] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 200 -
2016-01-11 09:01:18,888 4002 INFO ekkuurne openerp.addons.report.models.report: The PDF document INVVK20160001.pdf is now saved in the database
@sle-odoo
Copy link
Contributor

if (with patched qt) does not appear in wkhtmltopdf --version, you're not using the right version. Please refer to the wkhtmltopdf page on the wiki

@neeohw
Copy link
Author

neeohw commented Jan 11, 2016

And where can I find a package built for ARM?

@sle-odoo
Copy link
Contributor

There is some informmation on this thread about how to compile it yourself. I can't help you a lot more about that. If you manage to get it work don't hesitate to explain here how you did it.

Regards

@neeohw
Copy link
Author

neeohw commented Jan 11, 2016

Ok, I'll try
But what does "patched qt" mean? Where can I find this "patch"?

@sle-odoo
Copy link
Contributor

It's a modified version of qt that allows printing on header and footer, among other things.

@neeohw
Copy link
Author

neeohw commented Jan 11, 2016

Yes, I reckon.
But where do I get it? Or, if I need to compile QT with that patch, where do I get the patch?

Edit: I guess the patch is inside wkhtmltopdf tree.
So, I'll try to build it now

@neeohw
Copy link
Author

neeohw commented Jan 12, 2016

I succeeded in compiling it for armhf!
The debian package can be found here: https://drive.google.com/file/d/0B8IWzZBfybNfd2VHR3k0eHZNZkk/view?usp=sharing
It may be interesting to copy it to http://nightly.odoo.com/extra/

I compiled it directly on my Orange Pi PC; but since those are static binaries, I guess it's also possible they work on a Raspberry Pi.
What I did:

sudo apt-get build-dep wkhtmltopdf
sudo apt-get build-dep qt4-qmake
(this should replace the need to manually install libraries like libxext-dev libx11-dev libxrender-dev libssl-dev)
sudo rm /usr/bin/ld
sudo ln -s ld.gold /usr/bin/ld

Now clone and build the source code

cd ~
git clone --recursive https://github.com/wkhtmltopdf/wkhtmltopdf.git --depth 1 --branch 0.12.1.2
cd wkhtmltopdf
./scripts/build.py posix-local

It will end with an error because of packaging; but the binaries will be available under static-build/posix-local/wkhtmltox-0.12.1.2/bin

I've created a debian package for ease of use.

@neeohw
Copy link
Author

neeohw commented Jan 12, 2016

Now I have a header and footer in the PDF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants