{ "info": { "author": "Openlabs Technologies & consulting (P) Limited", "author_email": "info@openlabs.co.in", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Plugins", "Framework :: Tryton", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Office/Business" ], "description": "Webkit based PDF report engine\n==============================\n\n.. image:: https://travis-ci.org/openlabs/trytond-report-webkit.png?branch=develop\n :target: https://travis-ci.org/openlabs/trytond-report-webkit\n\n\nThis package allows you to build HTML based reports and then convert them\ninto PDFs using either `wkhtmltopdf` which uses the webkit rendering engine and\nQT. (WebKit is the engine of Apples Safari). or\n`Weasyprint `_\n\nThe templates are written using `Jinja 2 `_ \ntemplate engine. `Template Inheritance \n`_ is also\nsupported to make it easier to extend existing emails and having a single\ntheme for all your emails.\n\nThe package also supports Genshi Template\n`Inheritance `_.\n\n\nUsing this in your projects\n===========================\n\nInstead of using the default report class from trytond.report use the\nReportWebkit class from this package instead.\n\n.. code-block:: python\n\n from openlabs_report_webkit import ReportWebkit\n\n class UserReport(ReportWebkit):\n __name__ = 'res.user'\n\n @classmethod\n def get_jinja_filters(cls, *args, **kwargs):\n \"\"\"\n Add my custom filters\n \"\"\"\n filters = super(UserReport, cls).get_jinja_filters(*args, **kwargs)\n filters.update({\n 'nl2br': lambda value: value.replace('\\n','
\\n')\n })\n return filters\n\n\nOutput Formats\n--------------\n\nTo get PDF outputs (instead of standard html) ensure that the report\ndefinition in xml clearly shows the extension as PDF. This could be\nchanged from the tryton administration section too.\n\nTo convert to PDFs this module needs either the ``wkhtmltopdf`` or \n``weasyprint`` installed.\n\nInstalling wkhtmltopdf (default)\n````````````````````````````````\n\nInstalling wkhtmltopdf from debian repositories usually install an older\nversion which does not have support for features like page numbers at the\nend of each page. So remember to install the latest one published by the\nmaintainers. For details refer to \n`wkhtmltopdf project website `_.\n\nInstalling weasyprint\n`````````````````````\n\nWeasyprint is a much lighter option (in comparison to wkhtmltopdf) but\nwith lesser features. Weasyprint can be installed from PYPI.\n\n``pip install weasyprint``\n\n\nTo use weasyprint, your report implementation class must explicitly\noverride the convert api to use weasyprint. Example:\n\n.. code-block:: python\n\n # TODO: an example here\n\n\nTemplate Filters\n----------------\n\nTryton HTML reports arrive with some builtin Template filters (in addition\nto the `built-in filters of Jinja2 \n`_) to make\nthings easier:\n\ndateformat(date, format='medium')\n`````````````````````````````````\n\nFormat the date with the current language from the context. For other\npossible formats, refer the \n`babel documentation `_.\n\nExample\n\n.. code-block:: html+jinja\n\n Date\n {{ sale.date|dateformat }}\n\ndatetimeformat(datetime, format)\n````````````````````````````````\n\nFormat the datetime with the current language from the context. For other\npossible formats, refer the \n`babel documentation `_.\n\nExample\n\n.. code-block:: html+jinja\n\n Created on {{ sale.create_date|datetimeformat('long') }}\n\ncurrencyformat(amount, currency, format=None)\n`````````````````````````````````````````````\n\nReturn formatted currency value. For more formatting information refer\n`babel documentation `_\n\nExample\n\n.. code-block:: html+jinja\n\n Total Value\n {{ sale.total_amount|currencyformat(sale.currency.code) }}\n\nmodulepath(name)\n````````````````\n\nGet the absolute Path of a file within a module\n\nExample\n\n.. code-block:: html+jinja\n\n \n\n\n\nOf course you can add your own as stated above.\n\n\nIncluding Styles\n----------------\n\nTo include stylesheets, images or any other static data you have two options:\n\n1. Have Tryton serving your files by adding the static-directory to your\n Tryton json_path\n2. Bundle your static files inside the reports module and reference using\n\n.. code-block:: html+jinja\n\n \n\nThe second approach comes with the downside that static files will only be\navailable on the server, so you can only see the formatted pdf\n\nAdding as a dependency\n----------------------\n\nYou can add the report toolkit as a dependent package of your tryton\nmodule by adding into the install_requires list on your setup.py script.\nRemember to specify the version numbers carefully, or the latest version\nof the package available would be installed.\n\nFor example if your module is for version 2.6 of tryton, the line to add\nwould be\n\n.. code-block:: python\n\n install_requires = [\n ...,\n 'openlabs_report_webkit>=2.6,<2.7'\n ...,\n ]\n\nIf you want to use weasyprint instead of whtmltopdf, it might be a good\nidea to change the above line to\n\n.. code-block:: python\n\n 'openlabs_report_webkit[weasyprint]>=2.6,<2.7'\n\nGotchas!\n========\n\nThe report file is missing\n--------------------------\n\n* Did you add the template file to the package_data in your setup.py ?\n* Did you add the template file extension to the included files in\n MANIFEST ?\n \nAuthors and Contributors\n------------------------\n\nThis module was built at `Openlabs `_. \n\nWe gratefully acknowledge contributions by:\n\n* `simon klemenc `_\n* `Udo Spallek `_\n\nProfessional Support\n--------------------\n\nThis module is professionally supported by `Openlabs `_.\nIf you are looking for on-site teaching or consulting support, contact our\n`sales `_ and `support\n`_ teams.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.openlabs.co.in", "keywords": "", "license": "GPL-3", "maintainer": "", "maintainer_email": "", "name": "openlabs_report_webkit", "package_url": "https://pypi.org/project/openlabs_report_webkit/", "platform": "", "project_url": "https://pypi.org/project/openlabs_report_webkit/", "project_urls": { "Homepage": "http://www.openlabs.co.in" }, "release_url": "https://pypi.org/project/openlabs_report_webkit/4.0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Tryton Webkit Report", "version": "4.0.1.1" }, "last_serial": 3716091, "releases": { "2.6.0.1": [], "2.6.1.0": [ { "comment_text": "", "digests": { "md5": "0a6e3032506f6fd99e4cf85f9cbd9096", "sha256": "19fa9740df81e68beca28b9f6fc00678e0c7ed923b0b6bd8898796e6cb8350fa" }, "downloads": -1, "filename": "openlabs_report_webkit-2.6.1.0.tar.gz", "has_sig": false, "md5_digest": "0a6e3032506f6fd99e4cf85f9cbd9096", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3517, "upload_time": "2013-11-20T13:34:05", "url": "https://files.pythonhosted.org/packages/8c/60/cbd169b06e6dc19d814513262fe9ac68cd68e09b297882922ec7ed92f24a/openlabs_report_webkit-2.6.1.0.tar.gz" } ], "2.6.2.0": [ { "comment_text": "", "digests": { "md5": "ced01f323b409d79bbb83a578f24baf2", "sha256": "7c3c2e678d29e1f5a29b591f0eb33b13fdc0232afea57f54b16b3561794fe2d4" }, "downloads": -1, "filename": "openlabs_report_webkit-2.6.2.0.tar.gz", "has_sig": false, "md5_digest": "ced01f323b409d79bbb83a578f24baf2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3600, "upload_time": "2013-11-22T17:49:35", "url": "https://files.pythonhosted.org/packages/fd/10/fa74021798617efde5532d0ce9ebe53a4a0e9496e5a91426efe91a44d7e1/openlabs_report_webkit-2.6.2.0.tar.gz" } ], "3.0.1.0": [ { "comment_text": "", "digests": { "md5": "25cedc9ac5bf19bb4f4405ff182a3c2b", "sha256": "3e7e83e078432162bd8262c8968abb0db3d0dd8ef363e3cb44e40571a9e9d267" }, "downloads": -1, "filename": "openlabs_report_webkit-3.0.1.0.tar.gz", "has_sig": false, "md5_digest": "25cedc9ac5bf19bb4f4405ff182a3c2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3519, "upload_time": "2013-11-20T13:35:14", "url": "https://files.pythonhosted.org/packages/52/01/ce88b604771abe23cebe8b6b9dccbc3bf54e205dba479e819c36762010bb/openlabs_report_webkit-3.0.1.0.tar.gz" } ], "3.0.2.0": [ { "comment_text": "", "digests": { "md5": "884975d5298bd3b0066f25d1385729da", "sha256": "eb5966b0a6aa9ec7e95b816eb04254aa8c56a78965a1b6fd638b98e2e4771450" }, "downloads": -1, "filename": "openlabs_report_webkit-3.0.2.0.tar.gz", "has_sig": false, "md5_digest": "884975d5298bd3b0066f25d1385729da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3602, "upload_time": "2013-11-22T17:57:27", "url": "https://files.pythonhosted.org/packages/ff/8a/1f5175b075211a601843e0e5102fb83cb8896e1e297519065a0be7f5b446/openlabs_report_webkit-3.0.2.0.tar.gz" } ], "3.0.2.1": [ { "comment_text": "", "digests": { "md5": "04fc808630a622a99abad85cc20c8da7", "sha256": "9129d084fe41b12c4506d8d199883342cc5c3b1e9bbe70db237964033c6ea577" }, "downloads": -1, "filename": "openlabs_report_webkit-3.0.2.1.tar.gz", "has_sig": false, "md5_digest": "04fc808630a622a99abad85cc20c8da7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3610, "upload_time": "2014-03-26T09:24:24", "url": "https://files.pythonhosted.org/packages/27/44/ac335192a133d7cdef6503d473d2f7e3788f0ee9cc1cff8aaf3daeac2354/openlabs_report_webkit-3.0.2.1.tar.gz" } ], "3.0.3.0": [ { "comment_text": "", "digests": { "md5": "c131572dbcbba55a20746130d6010b0c", "sha256": "9e046c5518c8f9f6cc6b64de77516eb6ba88969af22ea42fda95e245b0b47a00" }, "downloads": -1, "filename": "openlabs_report_webkit-3.0.3.0.tar.gz", "has_sig": false, "md5_digest": "c131572dbcbba55a20746130d6010b0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3847, "upload_time": "2014-07-30T18:45:39", "url": "https://files.pythonhosted.org/packages/61/9f/14f0c7112c2444697d92a3eb929233c8842c0a8974bf89df7d13ccc3d8ac/openlabs_report_webkit-3.0.3.0.tar.gz" } ], "3.2.0.1": [ { "comment_text": "", "digests": { "md5": "57ef761f18cddf68657ffd2b4aac88d3", "sha256": "ce41dfa62b9ebc7db401922dc369c0bae866acc4b9255ae50c8a23f957c4a8a7" }, "downloads": -1, "filename": "openlabs_report_webkit-3.2.0.1.tar.gz", "has_sig": false, "md5_digest": "57ef761f18cddf68657ffd2b4aac88d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3854, "upload_time": "2014-07-30T18:46:31", "url": "https://files.pythonhosted.org/packages/73/eb/55adcd401c2a24a72d5fd6dd66396bd837333c39d84d333736c2db3ed814/openlabs_report_webkit-3.2.0.1.tar.gz" } ], "3.2.0.2": [ { "comment_text": "", "digests": { "md5": "e206f1f2854d7d66b73c00f2449a370c", "sha256": "304515a02112041ced36924c00d892a8b797a990b00afabb9549ab7daef76e2c" }, "downloads": -1, "filename": "openlabs_report_webkit-3.2.0.2.tar.gz", "has_sig": false, "md5_digest": "e206f1f2854d7d66b73c00f2449a370c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4154, "upload_time": "2014-07-31T18:27:28", "url": "https://files.pythonhosted.org/packages/3f/7a/380b08fd48d92d3bb0b814f5bac5d78742f20654eb60364a54f533146785/openlabs_report_webkit-3.2.0.2.tar.gz" } ], "3.2.0.3": [ { "comment_text": "", "digests": { "md5": "2b64a593465f5474a328aa59ca501771", "sha256": "65b1e833a5de105e649f1a1b5812500c3d0e6c9ecd8b05b75cea1f168df58e5d" }, "downloads": -1, "filename": "openlabs_report_webkit-3.2.0.3.tar.gz", "has_sig": false, "md5_digest": "2b64a593465f5474a328aa59ca501771", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4915, "upload_time": "2014-08-12T04:43:25", "url": "https://files.pythonhosted.org/packages/76/a2/212216a0800719801bff278f2e972b6b050c6ca205ab06326cec4375562d/openlabs_report_webkit-3.2.0.3.tar.gz" } ], "3.2.0.4": [ { "comment_text": "", "digests": { "md5": "875050f049eb7718bb2d831a75ff3896", "sha256": "dc9d6e741670007df9ed31820d797ed1d907bb89f0a711fa6465555fd18f4675" }, "downloads": -1, "filename": "openlabs_report_webkit-3.2.0.4.tar.gz", "has_sig": false, "md5_digest": "875050f049eb7718bb2d831a75ff3896", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5029, "upload_time": "2014-12-18T09:56:08", "url": "https://files.pythonhosted.org/packages/d5/59/da932b66be1a342b4fb1bc1d8a87c3bc43b6adc382820e6dd4e3b3a82d5b/openlabs_report_webkit-3.2.0.4.tar.gz" } ], "3.4.0.2": [ { "comment_text": "", "digests": { "md5": "7adb0bec2bd860d9bddd010c2b1bf897", "sha256": "3d74f755e13c89501005229770f9c55fcbe259d142b0e14d94528b5ca4005923" }, "downloads": -1, "filename": "openlabs_report_webkit-3.4.0.2.tar.gz", "has_sig": false, "md5_digest": "7adb0bec2bd860d9bddd010c2b1bf897", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5028, "upload_time": "2014-12-24T15:50:58", "url": "https://files.pythonhosted.org/packages/99/31/0418af8cfe02fedf563e0b2672da4d17359d2216ace8ca0cf55b9ab6c288/openlabs_report_webkit-3.4.0.2.tar.gz" } ], "3.4.0.3": [ { "comment_text": "", "digests": { "md5": "4ddcaca073fc117287f7a0148bcca1c6", "sha256": "feabb1580945243583fef3fb25530833b61c8fba60aaf0350596d8c11e0fb6a3" }, "downloads": -1, "filename": "openlabs_report_webkit-3.4.0.3.tar.gz", "has_sig": false, "md5_digest": "4ddcaca073fc117287f7a0148bcca1c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5202, "upload_time": "2015-02-18T12:43:14", "url": "https://files.pythonhosted.org/packages/69/20/b1368cc2e5f966f54ada1c81bce63c7c02aaaaab928feb80b31089bbc273/openlabs_report_webkit-3.4.0.3.tar.gz" } ], "3.4.0.4": [ { "comment_text": "", "digests": { "md5": "5085ae1576704c8b03231c1812af3a1c", "sha256": "c44345497b794d7cd738fd267bc76b25a390393ac3746b87dd10c0a29df150ff" }, "downloads": -1, "filename": "openlabs_report_webkit-3.4.0.4.tar.gz", "has_sig": false, "md5_digest": "5085ae1576704c8b03231c1812af3a1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6418, "upload_time": "2015-05-21T05:22:50", "url": "https://files.pythonhosted.org/packages/b4/1e/d58f9c7f9d848c7cde66d4e7bd4e13716a13b681c6e9b0353dc058625c4c/openlabs_report_webkit-3.4.0.4.tar.gz" } ], "3.4.1.0": [ { "comment_text": "", "digests": { "md5": "7536a11032144120b598531b542f4d01", "sha256": "66c5be7ccd00b65fd54f2b851401c73b0f14bcf8a74ddb2bd095b999aaa64134" }, "downloads": -1, "filename": "openlabs_report_webkit-3.4.1.0.tar.gz", "has_sig": false, "md5_digest": "7536a11032144120b598531b542f4d01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8488, "upload_time": "2015-06-11T10:52:15", "url": "https://files.pythonhosted.org/packages/28/20/60edf42bc716a511764492e31754267b6f4157cc49f6b357b2d27c6a1451/openlabs_report_webkit-3.4.1.0.tar.gz" } ], "3.4.1.1": [ { "comment_text": "", "digests": { "md5": "2e76627b65476b9e905e0ceec4a12326", "sha256": "f3921cfb22bf944129058e77fc4aa2f9c80e5ee666a885848197f2eff65bcfe7" }, "downloads": -1, "filename": "openlabs_report_webkit-3.4.1.1.tar.gz", "has_sig": false, "md5_digest": "2e76627b65476b9e905e0ceec4a12326", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8501, "upload_time": "2015-09-16T11:28:07", "url": "https://files.pythonhosted.org/packages/6e/cd/229c73adf22d9838c398feb0201beaebc21c89f59c5e878b526f9f37e969/openlabs_report_webkit-3.4.1.1.tar.gz" } ], "3.6.0.2": [ { "comment_text": "", "digests": { "md5": "8f629e07f635527549e48512ee8df7b0", "sha256": "976b729561adfd56246ca51ce3cf6f2e7cbd59feb497688c1d65893a12c8e5bf" }, "downloads": -1, "filename": "openlabs_report_webkit-3.6.0.2.tar.gz", "has_sig": false, "md5_digest": "8f629e07f635527549e48512ee8df7b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8322, "upload_time": "2015-07-29T06:33:56", "url": "https://files.pythonhosted.org/packages/73/39/c2b12a34430fce26b4298e80fad7cfd07e699a49a4ce613031a9a05e3bb8/openlabs_report_webkit-3.6.0.2.tar.gz" } ], "4.0.0.1": [ { "comment_text": "", "digests": { "md5": "de3bd28c303c1cd7befcbf22de41ec36", "sha256": "13249d6b14a2e60f60955eb0007b2d1dbfaf24550af6df17000bff641610456c" }, "downloads": -1, "filename": "openlabs_report_webkit-4.0.0.1.tar.gz", "has_sig": false, "md5_digest": "de3bd28c303c1cd7befcbf22de41ec36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8344, "upload_time": "2016-08-17T07:21:39", "url": "https://files.pythonhosted.org/packages/34/8d/d6312918c70b8a2c1a32b361d0810b6f7c235e1fc04870764884ecbdb252/openlabs_report_webkit-4.0.0.1.tar.gz" } ], "4.0.0.2": [ { "comment_text": "", "digests": { "md5": "6522d327ac4dabe4adaca8e91de611a7", "sha256": "2f3e0ae11ff14ca2f169f7b01741f3bc0e781f948d69ae130cee13b18ec3c958" }, "downloads": -1, "filename": "openlabs_report_webkit-4.0.0.2.tar.gz", "has_sig": false, "md5_digest": "6522d327ac4dabe4adaca8e91de611a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8180, "upload_time": "2016-08-31T19:07:51", "url": "https://files.pythonhosted.org/packages/83/07/6853a8a7d3dba4d837d771b164be21e703f6e5b09b97f3d15215ec4a9481/openlabs_report_webkit-4.0.0.2.tar.gz" } ], "4.0.0.3": [ { "comment_text": "", "digests": { "md5": "5fde6bfb47ad0cd17ccb7bc14ddc1c3e", "sha256": "2b6173495ca695f973c33f093033846f0abcd63eb31121a1547641f613009ac1" }, "downloads": -1, "filename": "openlabs_report_webkit-4.0.0.3.tar.gz", "has_sig": false, "md5_digest": "5fde6bfb47ad0cd17ccb7bc14ddc1c3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8165, "upload_time": "2016-09-01T09:41:03", "url": "https://files.pythonhosted.org/packages/ed/0b/764f5741e8d4aca0c1c0f161a349e326233edb12437f62cddd68f913cbb6/openlabs_report_webkit-4.0.0.3.tar.gz" } ], "4.0.0.4": [ { "comment_text": "", "digests": { "md5": "4eb46c8ea175a69c3612ddbe192a1320", "sha256": "ac39fe22e600f8e611e3992c8e2d2b27124b432f7084a59a4f9b79735b331e89" }, "downloads": -1, "filename": "openlabs_report_webkit-4.0.0.4.tar.gz", "has_sig": false, "md5_digest": "4eb46c8ea175a69c3612ddbe192a1320", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8217, "upload_time": "2016-09-08T10:55:45", "url": "https://files.pythonhosted.org/packages/09/6e/49d8066fb2f0b29bec99a2582e243ff0891b2834c44e41e0f83c81dbd876/openlabs_report_webkit-4.0.0.4.tar.gz" } ], "4.0.1.0": [ { "comment_text": "", "digests": { "md5": "8fef440281951119278b07028897b13e", "sha256": "03eea441fd30e67718413b1f8f5d8712a5ee1ba38f224059f0650aa0cf697d46" }, "downloads": -1, "filename": "openlabs_report_webkit-4.0.1.0.tar.gz", "has_sig": false, "md5_digest": "8fef440281951119278b07028897b13e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8236, "upload_time": "2017-11-10T19:31:44", "url": "https://files.pythonhosted.org/packages/21/d3/edb1cf0f8ee362900d5a760d746a0ed32509e83fba5b74fc6a10b97a7094/openlabs_report_webkit-4.0.1.0.tar.gz" } ], "4.0.1.1": [ { "comment_text": "", "digests": { "md5": "1f07f91d36ca06ab5bc8abf26813680d", "sha256": "26f7d0582768af7dbe2ac23411a659c0255f69f86684fab8b0129622056120bf" }, "downloads": -1, "filename": "openlabs_report_webkit-4.0.1.1.tar.gz", "has_sig": false, "md5_digest": "1f07f91d36ca06ab5bc8abf26813680d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8287, "upload_time": "2018-03-29T06:38:51", "url": "https://files.pythonhosted.org/packages/28/95/345287ecc68e080a3edbe9442fc8cebfa8f4b9ecab7bb5e9a90de32d12c7/openlabs_report_webkit-4.0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f07f91d36ca06ab5bc8abf26813680d", "sha256": "26f7d0582768af7dbe2ac23411a659c0255f69f86684fab8b0129622056120bf" }, "downloads": -1, "filename": "openlabs_report_webkit-4.0.1.1.tar.gz", "has_sig": false, "md5_digest": "1f07f91d36ca06ab5bc8abf26813680d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8287, "upload_time": "2018-03-29T06:38:51", "url": "https://files.pythonhosted.org/packages/28/95/345287ecc68e080a3edbe9442fc8cebfa8f4b9ecab7bb5e9a90de32d12c7/openlabs_report_webkit-4.0.1.1.tar.gz" } ] }