mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 08:47:40 +00:00
feat: add kwkhtmltopdf asset fix (#395)
* feat: add kwkhtmltopdf asset fix
This commit is contained in:
co-authored by
GitHub
parent
fc452c6a2a
commit
91e8999b5c
+1
-1
@@ -9,7 +9,7 @@ branches:
|
|||||||
python:
|
python:
|
||||||
# Force a newer version than 3.7.1 which break build
|
# Force a newer version than 3.7.1 which break build
|
||||||
# due to https://bugs.python.org/issue34921
|
# due to https://bugs.python.org/issue34921
|
||||||
- "3.7.2"
|
- "3.8"
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
postgresql: "9.5"
|
postgresql: "9.5"
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
|
:alt: License
|
||||||
|
|
||||||
|
============================
|
||||||
|
Kwktnkltopdf Asset
|
||||||
|
============================
|
||||||
|
|
||||||
|
Force assets to be saved to be readable by kwkhtmltopdf server, the
|
||||||
|
first time you print a report it failed to generate
|
||||||
|
the pdf asset used for pdf
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
from . import models
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2016-2021 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Kwkhtmltopdf: Asset fix",
|
||||||
|
"version": "16.0.1.0.0",
|
||||||
|
"author": "Camptocamp,Odoo Community Association (OCA)",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"category": "category",
|
||||||
|
"depends": [
|
||||||
|
"base",
|
||||||
|
],
|
||||||
|
"website": "http://www.camptocamp.com",
|
||||||
|
"data": [],
|
||||||
|
"installable": True,
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
from . import ir_qweb
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Copyright 2016-2019 Camptocamp SA
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||||
|
|
||||||
|
from odoo.tools import config
|
||||||
|
from odoo import models
|
||||||
|
|
||||||
|
|
||||||
|
class IrQweb(models.AbstractModel):
|
||||||
|
|
||||||
|
_inherit = "ir.qweb"
|
||||||
|
|
||||||
|
def _generate_asset_nodes_cache(
|
||||||
|
self,
|
||||||
|
bundle,
|
||||||
|
css=True,
|
||||||
|
js=True,
|
||||||
|
debug=False,
|
||||||
|
async_load=False,
|
||||||
|
defer_load=False,
|
||||||
|
lazy_load=False,
|
||||||
|
media=None,
|
||||||
|
):
|
||||||
|
context_for_printing = self.env.context.copy()
|
||||||
|
if not config["test_enable"]:
|
||||||
|
context_for_printing["commit_assetsbundle"] = True
|
||||||
|
return super(
|
||||||
|
IrQweb, self.with_context(**context_for_printing)
|
||||||
|
)._generate_asset_nodes(
|
||||||
|
bundle, css, js, debug, async_load, defer_load, lazy_load, media
|
||||||
|
)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# addons listed in this file are ignored by
|
||||||
|
# setuptools-odoo-make-default (one addon per line)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
To learn more about this directory, please visit
|
||||||
|
https://pypi.python.org/pypi/setuptools-odoo
|
||||||
+1
-1
@@ -5,7 +5,7 @@ redis==4.3.4
|
|||||||
python-json-logger==2.0.4
|
python-json-logger==2.0.4
|
||||||
statsd==4.0.1
|
statsd==4.0.1
|
||||||
python-swiftclient==4.1.0
|
python-swiftclient==4.1.0
|
||||||
python-keystoneclient==5.0.1
|
python-keystoneclient==5.0.0
|
||||||
keystoneauth1==5.0.0
|
keystoneauth1==5.0.0
|
||||||
# error with 5.x (ConstructorError: could not determine a constructor for the tag '!record')
|
# error with 5.x (ConstructorError: could not determine a constructor for the tag '!record')
|
||||||
PyYAML==6.0
|
PyYAML==6.0
|
||||||
|
|||||||
Reference in New Issue
Block a user