diff --git a/.travis.yml b/.travis.yml index f82ed898..fbb4e7c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,21 @@ cache: pip addons: apt: + # only add the two lines below if you need wkhtmltopdf for your tests + sources: + - pov-wkhtmltopdf packages: - expect-dev # provides unbuffer utility - python-lxml # because pip installation is slow - pdftk + - wkhtmltopdf # only add if needed and check the before_install section below postgresql: "9.3" +# set up an X server to run wkhtmltopdf. +before_install: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + language: python python: @@ -22,8 +31,8 @@ env: matrix: - LINT_CHECK="1" - TRANSIFEX="1" - - TESTS="1" ODOO_REPO="OCA/OCB" - - TESTS="1" ODOO_REPO="odoo/odoo" + - TESTS="1" ODOO_REPO="OCA/OCB" OPTIONS="--test-report-directory=/tmp" + - TESTS="1" ODOO_REPO="odoo/odoo" OPTIONS="--test-report-directory=/tmp" install: @@ -31,6 +40,7 @@ install: - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} - export WKHTMLTOPDF_VERSION=0.12.4 - travis_install_nightly + - pip install PyPDF2 # needed for report_qweb_pdf_watermark script: - travis_run_tests diff --git a/report_qweb_pdf_watermark/README.rst b/report_qweb_pdf_watermark/README.rst index 07f681b1..16c8a95d 100644 --- a/report_qweb_pdf_watermark/README.rst +++ b/report_qweb_pdf_watermark/README.rst @@ -11,7 +11,9 @@ This module was written to add watermarks (backgrounds) to PDF reports. Because Installation ============ -This module works out of the box, but is faster if you install the python library PyPDF2. +As PyPDF is not supported in python3, you need to install PyPDF2:: + +$ pip install pypdf2 Usage ===== @@ -51,6 +53,7 @@ Contributors * Holger Brunn * Stefan Rijnhart +* Rod Schouteden Do not contact contributors directly about help with questions or problems concerning this addon, but use the `community mailing list `_ or the `appropriate specialized mailinglist `_ for help, and the bug tracker linked in `Bug Tracker`_ above for technical issues. diff --git a/report_qweb_pdf_watermark/__init__.py b/report_qweb_pdf_watermark/__init__.py index 7eda98a2..5c170507 100644 --- a/report_qweb_pdf_watermark/__init__.py +++ b/report_qweb_pdf_watermark/__init__.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- # © 2016 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import models diff --git a/report_qweb_pdf_watermark/__manifest__.py b/report_qweb_pdf_watermark/__manifest__.py index f4ca0611..74b5ad78 100644 --- a/report_qweb_pdf_watermark/__manifest__.py +++ b/report_qweb_pdf_watermark/__manifest__.py @@ -1,20 +1,29 @@ -# -*- coding: utf-8 -*- # © 2016 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Pdf watermark", - "version": "10.0.1.0.2", + "version": "11.0.1.0.0", "author": "Therp BV, " "Odoo Community Association (OCA)", "license": "AGPL-3", - "category": "Reporting", + "category": "Technical Settings", "summary": "Add watermarks to your QWEB PDF reports", + "website": "https://github.com/oca/reporting-engine", "depends": [ - 'report', + 'web', ], "data": [ "demo/report.xml", "views/ir_actions_report_xml.xml", "views/layout_templates.xml", ], + "demo": [ + "demo/report.xml" + ], + "intallable": True, + 'external_dependencies': { + 'python': [ + 'PyPDF2', + ], + }, } diff --git a/report_qweb_pdf_watermark/demo/report.xml b/report_qweb_pdf_watermark/demo/report.xml index 7528dbf9..1e07ba61 100644 --- a/report_qweb_pdf_watermark/demo/report.xml +++ b/report_qweb_pdf_watermark/demo/report.xml @@ -7,14 +7,14 @@ report_type="qweb-pdf" name="report_qweb_pdf_watermark.demo_report_view" file="report_qweb_pdf_watermark.demo_report_view" - paperformat="report.paperformat_euro" + paperformat="base.paperformat_euro" /> - + docs[:1].company_id.logo