Web Warning Sounds
web_warning_sound · OCA/web
-
Security25/25No findings
-
Activity0/25Last human commit 141 months ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Migrating to 19.0: only `__manifest__.py` is recognized: a module with `__openerp__.py` is not detected at all. migration-openerp-manifest · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This plugin allows to create modules that can play sound files. It can be used in on_change methods or when raising an orm_except.
The sound files need to be located in the module's static directory:
module_name/static/path/to/audio/file/mysound.wav
Then the web client can access these files using the url path:
/module_name/static/path/to/audio/file/mysound.wav
To use it in on_change methods just add the the url path of the audio file in the result dictionary under the key 'sound'. Example::
res['sound'] = '/module_name/static/mysound.wav'
res['warning'] = {
'title': _('Cannot do something'),
'message': _('The reason why...'),
}
return res
On orm_except put the url path of the file inside '{{}}' as in this example::
raise orm_except(
'Cannot do something',
'The reason why... {{ sound: /module_name/static/mysound.wav }}'
)
Dependencies
- Odoo dependencies
- None
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 0
No views found for this module.
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 0
No models found for this module.