You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB

10 years ago
10 years ago
  1. # -*- coding: utf-8 -*-
  2. # This file is part of OpenERP. The COPYRIGHT file at the top level of
  3. # this module contains the full copyright notices and license terms.
  4. {
  5. 'name': 'Web Warning Sounds',
  6. 'version': '0.1',
  7. 'author': "HacBee UAB,Odoo Community Association (OCA)",
  8. 'category': 'Custom',
  9. 'website': 'http://www.hbee.eu',
  10. 'summary': '',
  11. 'description': """
  12. This plugin allows to create modules that can play sound files.
  13. It can be used in on_change methods or when raising an orm_except.
  14. The sound files need to be located in the module's static directory:
  15. module_name/static/path/to/audio/file/mysound.wav
  16. Then the web client can access these files using the url path:
  17. /module_name/static/path/to/audio/file/mysound.wav
  18. To use it in on_change methods just add the the url path of the
  19. audio file in the result dictionary under the key 'sound'. Example::
  20. res['sound'] = '/module_name/static/mysound.wav'
  21. res['warning'] = {
  22. 'title': _('Cannot do something'),
  23. 'message': _('The reason why...'),
  24. }
  25. return res
  26. On orm_except put the url path of the file inside '{{}}' as in this example::
  27. raise orm_except(
  28. 'Cannot do something',
  29. 'The reason why... {{ sound: /module_name/static/mysound.wav }}'
  30. )
  31. """,
  32. 'depends': [
  33. ],
  34. 'data': [
  35. ],
  36. 'js': [
  37. 'static/src/js/sound_extend.js'
  38. ],
  39. 'installable': True,
  40. 'application': True,
  41. 'auto_install': False,
  42. }