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.

88 lines
2.9 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. # button style
  40. 'classes': 'btn-primary',
  41. }
  42. ]
  43. }
  44. You are responsible for translating the messages.
  45. Known issues / Roadmap
  46. ======================
  47. * add `message_type` to differenciate between warnings, errors, etc.
  48. * have one `message_type` to show a nonmodal warning on top right
  49. Bug Tracker
  50. ===========
  51. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  52. In case of trouble, please check there if your issue has already been reported.
  53. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  54. `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**>`_.
  55. Credits
  56. =======
  57. Contributors
  58. ------------
  59. * Holger Brunn <hbrunn@therp.nl>
  60. * Zakaria Makrelouf (ACSONE SA/NV) <z.makrelouf@gmail.com>
  61. Maintainer
  62. ----------
  63. .. image:: http://odoo-community.org/logo.png
  64. :alt: Odoo Community Association
  65. :target: http://odoo-community.org
  66. This module is maintained by the OCA.
  67. 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.
  68. To contribute to this module, please visit http://odoo-community.org.