summaryrefslogtreecommitdiff
path: root/addons/web/controllers
diff options
context:
space:
mode:
authorThanhDodeurOdoo <tso@odoo.com>2018-08-14 11:26:55 +0200
committerThanhDodeurOdoo <tso@odoo.com>2018-09-07 16:06:47 +0200
commit16aeecc73d4cf95e55f447315c983fae4ca471f7 (patch)
tree307ce38ff6d53bff5368e2488ce47b63da1ff1b8 /addons/web/controllers
parent469d7acb89822ec11179d7bf2355e2b0eb9053df (diff)
[REF] base, mail: Documents (enterprise) related changes
-removed force_ext from ir.http. -added signature arg to web/image to differentiate cache entries by URL. -added an embed youtube viewer for youtube URL's -added a PDF splitter to the PDF viewer UI -added tests for mail's Document Viewer -added a "signature" param to web/image to go around the browser cache -thumbnail field of ir.attachment is now stored in the filestore as a distinct attachment. task 1853490 Co-authored-by: Pierre Paridans <app@odoo.com>
Diffstat (limited to 'addons/web/controllers')
-rw-r--r--addons/web/controllers/main.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 1719b70f6f8..4577a21ddff 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -425,12 +425,12 @@ def xml2json_from_elementtree(el, preserve_whitespaces=False):
def binary_content(xmlid=None, model='ir.attachment', id=None, field='datas', unique=False,
filename=None, filename_field='datas_fname', download=False, mimetype=None,
default_mimetype='application/octet-stream', share_id=None, share_token=None, access_token=None,
- force_ext=False, env=None):
+ env=None):
return request.registry['ir.http'].binary_content(
xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename,
filename_field=filename_field, download=download, mimetype=mimetype,
default_mimetype=default_mimetype, share_id=share_id, share_token=share_token, access_token=access_token,
- force_ext=force_ext, env=env)
+ env=env)
#----------------------------------------------------------
# Odoo Web web Controllers
@@ -1008,11 +1008,11 @@ class Binary(http.Controller):
def content_common(self, xmlid=None, model='ir.attachment', id=None, field='datas',
filename=None, filename_field='datas_fname', unique=None, mimetype=None,
download=None, data=None, token=None, share_id=None, share_token=None, access_token=None,
- force_ext=False, **kw):
+ **kw):
status, headers, content = binary_content(
xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename,
filename_field=filename_field, download=download, mimetype=mimetype,
- access_token=access_token, share_id=share_id, share_token=share_token, force_ext=force_ext)
+ access_token=access_token, share_id=share_id, share_token=share_token)
if status == 304:
response = werkzeug.wrappers.Response(status=status, headers=headers)
elif status == 301:
@@ -1047,7 +1047,7 @@ class Binary(http.Controller):
def content_image(self, xmlid=None, model='ir.attachment', id=None, field='datas',
filename_field='datas_fname', unique=None, filename=None, mimetype=None,
download=None, width=0, height=0, crop=False, share_id=None, share_token=None, access_token=None, avoid_if_small=False,
- upper_limit=False):
+ upper_limit=False, signature=False):
status, headers, content = binary_content(
xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename,
filename_field=filename_field, download=download, mimetype=mimetype,