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.

85 lines
2.7 KiB

  1. Client side message boxes
  2. =========================
  3. This module allows to show a message popup on the client side as result of a button.
  4. Usage
  5. =====
  6. Depend on this module and return
  7. .. code:: python
  8. {
  9. 'type': 'ir.actions.act_window.message',
  10. 'title': _('My title'),
  11. 'message': _('My message'),
  12. # optional title of the close button, if not set, will be _('Close')
  13. # if set False, no close button will be shown
  14. # you can create your own close button with an action of type
  15. # ir.actions.act_window_close
  16. 'close_button_title': 'Make this window go away',
  17. # this is an optional list of buttons to show
  18. 'buttons': [
  19. # a button can be any action (also ir.actions.report.xml et al)
  20. {
  21. 'type': 'ir.actions.act_window',
  22. 'name': 'All customers',
  23. 'res_model': 'res.partner',
  24. 'view_mode': 'form',
  25. 'views': [[False, 'list'], [False, 'form']],
  26. 'domain': [('customer', '=', True)],
  27. },
  28. # or if type == method, you need to pass a model, a method name and
  29. # parameters
  30. {
  31. 'type': 'method',
  32. 'name': _('Yes, do it'),
  33. 'model': self._name,
  34. 'method': 'myfunction',
  35. # list of arguments to pass positionally
  36. 'args': [self.ids],
  37. # dictionary of keyword arguments
  38. 'kwargs': {'force': True},
  39. }
  40. ]
  41. }
  42. You are responsible for translating the messages.
  43. Known issues / Roadmap
  44. ======================
  45. * add `message_type` to differenciate between warnings, errors, etc.
  46. * have one `message_type` to show a nonmodal warning on top right
  47. Bug Tracker
  48. ===========
  49. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  50. In case of trouble, please check there if your issue has already been reported.
  51. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  52. `here <https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_act_window_message%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  53. Credits
  54. =======
  55. Contributors
  56. ------------
  57. * Holger Brunn <hbrunn@therp.nl>
  58. Maintainer
  59. ----------
  60. .. image:: http://odoo-community.org/logo.png
  61. :alt: Odoo Community Association
  62. :target: http://odoo-community.org
  63. This module is maintained by the OCA.
  64. OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
  65. To contribute to this module, please visit http://odoo-community.org.