diff --git a/website_product_attachments/__manifest__.py b/website_product_attachments/__manifest__.py index 8b1a7911f..2051fe0b4 100644 --- a/website_product_attachments/__manifest__.py +++ b/website_product_attachments/__manifest__.py @@ -22,7 +22,7 @@ { 'name': 'Product Attachments on Website', - 'version': '13.0.1.0.0', + 'version': '13.0.1.0.1', 'summary': """This Module Allows Customer to Download Documents That Are Attached to the Products From Website""", 'description': 'This Module allows customer to download documents ' diff --git a/website_product_attachments/controllers/website_product_attachment.py b/website_product_attachments/controllers/website_product_attachment.py index fac01aac5..149174efc 100644 --- a/website_product_attachments/controllers/website_product_attachment.py +++ b/website_product_attachments/controllers/website_product_attachment.py @@ -60,7 +60,7 @@ class WebsiteSale(WebsiteSale): product_context['pricelist'] = pricelist.id product = product.with_context(product_context) - attachments = request.env['ir.attachment'].search( + attachments = request.env['ir.attachment'].sudo().search( [('res_model', '=', 'product.template'), ('res_id', '=', product.id)], order='id') @@ -95,10 +95,7 @@ class WebsiteSale(WebsiteSale): @http.route(['/attachment/download',], type='http', auth='public') def download_attachment(self, attachment_id): # Check if this is a valid attachment id - attachment = request.env['ir.attachment'].sudo().search_read( - [('id', '=', int(attachment_id))], - ["name", "datas", "res_model", "res_id", "type", "url"] - ) + attachment = request.env['ir.attachment'].sudo().search([('id', '=', int(attachment_id))]) if attachment: attachment = attachment[0] diff --git a/website_product_attachments/doc/RELEASE_NOTES.md b/website_product_attachments/doc/RELEASE_NOTES.md index 6df1b3b47..ba1d2e795 100644 --- a/website_product_attachments/doc/RELEASE_NOTES.md +++ b/website_product_attachments/doc/RELEASE_NOTES.md @@ -4,3 +4,7 @@ #### Version 13.0.1.0.0 #### ADD Initial Commit for website_product_attachments. + +#### 30.07.2020 +#### Version 13.0.1.0.1 +#### UPDT diff --git a/website_product_attachments/static/description/index.html b/website_product_attachments/static/description/index.html index 975769afc..f5d913434 100644 --- a/website_product_attachments/static/description/index.html +++ b/website_product_attachments/static/description/index.html @@ -7,8 +7,8 @@
Allows users to attach documents.
Download attachments from website.
No additional configuration required.
Allows users to attach documents.
Download attachments from website.
Attach your documents like, product specification on product master.
Allow to attach multiple documents for products.
Visitors of your e-commerce portal can download these attachments.