Hey mates
I'm stuck on a website customer review ratting. My requirement is customer product review image should be reviewed instead of auto download. i just use odoo customize ratting which allows image auto download instead of review. if anyone has a solution please let me know. Thanks
Here is a solution of website customer review image auto download issue. you have to create a custom module and add a directories static>src>xml>chatter.xml " <?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!--
Inherited templates from portal to custom chatter with rating
-->
<t t-inherit="portal.Chatter.Attachments" t-inherit-mode="extension">
<xpath expr="//a[contains(@t-attf-href, '?download=true')]" position="attributes">
<attribute
name="t-attf-href"><![CDATA[/web/content/#{attachment.id}?access_token=#{attachment.access_token}]]></attribute>
</xpath>
</t>
</templates>
" and this a manifest code " {
'name': 'Attachment Review',
'version': '17.0.1.0.1',
'depends': ['base', 'portal'],
'data': [],
'assets': {
'web.assets_frontend': [
'attachment_review/static/src/xml/chatter.xml',
],
},
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}
". this code will help you guys in customer review image preview when customer click on product review image instead of auto download by click.