summaryrefslogtreecommitdiff
path: root/addons/website_slides/models/slide_slide.py
diff options
context:
space:
mode:
authorAurélien Warnon <awa@odoo.com>2019-08-07 06:01:35 +0000
committerThibault Delavallée <tde@odoo.com>2019-08-12 15:40:36 +0000
commit5e4f37a1f88b549e02273edb93611e47abdecd61 (patch)
treec68d302cbba4a83d74e1514c717e7a1ea76a9c34 /addons/website_slides/models/slide_slide.py
parent5269d8c27f9f5e7b2d0ab86db6423f6ffa227f40 (diff)
[REF] website_slides: remove index_content field from slide.slide
The 'index_content' field was only filled when uploading from the frontend. That would lead to inconsistent results when creating/updating 'presentation' slides from the slide.slide form view. The field was also not cleaned if the slide content changed. As it's usage was not very clear (only on a 'search', and not very intuitive), we simply removed the field.
Diffstat (limited to 'addons/website_slides/models/slide_slide.py')
-rw-r--r--addons/website_slides/models/slide_slide.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/addons/website_slides/models/slide_slide.py b/addons/website_slides/models/slide_slide.py
index a1b99fe90f7..d4ab74afc37 100644
--- a/addons/website_slides/models/slide_slide.py
+++ b/addons/website_slides/models/slide_slide.py
@@ -134,7 +134,6 @@ class Slide(models.Model):
string='Type', required=True,
default='document',
help="The document type will be set automatically based on the document URL and properties (e.g. height and width for presentation and document).")
- index_content = fields.Text('Transcript')
datas = fields.Binary('Content', attachment=True)
url = fields.Char('Document URL', help="Youtube or Google Document URL")
document_id = fields.Char('Document ID', help="Youtube or Google Document ID")
@@ -353,8 +352,6 @@ class Slide(models.Model):
# 'website_published' is handled by mixin
values['date_published'] = False
- if not values.get('index_content'):
- values['index_content'] = values.get('description')
if values.get('slide_type') == 'infographic' and not values.get('image_1920'):
values['image_1920'] = values['datas']
if values.get('is_category'):
@@ -756,11 +753,6 @@ class Slide(models.Model):
values['slide_type'] = get_slide_type(values)
if 'exportLinks' in google_values:
values['datas'] = self._fetch_data(google_values['exportLinks']['application/pdf'], params, 'pdf')['values']
- # Content indexing
- if google_values['exportLinks'].get('text/plain'):
- values['index_content'] = self._fetch_data(google_values['exportLinks']['text/plain'], params)['values']
- elif google_values['exportLinks'].get('text/csv'):
- values['index_content'] = self._fetch_data(google_values['exportLinks']['text/csv'], params)['values']
elif google_values['mimeType'] == 'application/pdf':
# TODO: Google Drive PDF document doesn't provide plain text transcript
values['datas'] = self._fetch_data(google_values['webContentLink'], {}, 'pdf')['values']