muk-it / muk_web

MuK Odoo Web Modules
GNU Lesser General Public License v3.0
109 stars 232 forks source link

Only administrator can see/hear web_preview_audio visualiser in 11.0 #199

Open bennals opened 2 years ago

bennals commented 2 years ago

This is a corner case issue for an older version of Odoo so I understand if it can't be addressed.

In 11.0, in a custom module I have a field defined as follows:

music_mp3 = fields.Many2many('ir.attachment', string='Optional: Music file (max size 25MB)', help='Optionally upload a .wav, .mp3 or ,ogg file of the track you want played - $ attachment=True, track_visibility='onchange')

The field is displayed in a simple form and everything works as expected as long as I am logged in as administrator, ie the visualiser pops up and I am able to preview the audio file.

If I am not logged in as administrator, I can see and download the attachment, but not preview it. The visualiser does not pop up, and therefore I can't play the audio.

If I add an attachment with the 'Attachments' button in the header, I can preview the audio when logged in as a normal user, so it is only the field defined in the custom module that is affected.

I should also point out that I have included many other binary preview widgets in forms for other custom modules I have made for image files (.pdf, .jpg etc) and have no problems previewing those files when logged in as a regular user.

Lastly, and not sure if this is related, but the muk_web_preview_audio module in the 11.0 branch in github currently seems to be for 12.0 (at least that's what the __manifest suggests). If I install that one, in my 11.0 installation, it doesn't work (get the unsupported file format error). Consequently, I have the one from the 10.0 branch installed, and it seems to work fine (apart from the issue described above.

Thanks,

Bill.