Search 1.9 billion lines of Odoo code on GitHub

web_notify_action

Author: Naglis Jonaitis
License: LGPL-3
Branch: 15.0
Repository: focusate/naglis-misc-addons
Dependencies: bus, and web
Languages: JavaScript (51, 33.8%), Python (60, 39.7%), XML (29, 19.2%), and reStructuredText (11, 7.3%)
Other branches: 11.0, 12.0, 12.0-port-web_notify_action, and fix-redirect-call
Other repositories: Drsmartinkus/misc-addons, Guobower/misc-addons, IaseshviliGeorgiy/misc-addons, TRESCLOUD/misc-addons, Vassy/misc-addons, crtmneric/misc-addons-1, grottas/misc-addons-1, mucahitaz/misc-addons, naglis/misc-addons, sasakuma/misc-addons-1, sm2x/misc-addons-1, and versada/misc-addons

<h1 class="title">User Action Notfications</h1> <p>Server-initiated action notifications on steroids!</p> <pre> <code lang="python">self.env.user._notify_action({ &quot;title&quot;: &quot;Hello World&quot;, &quot;message&quot;: &quot;This is a notification with custom actions.&quot;, &quot;type&quot;: &quot;notification&quot;, # Possible values: ['notification', 'warning']. Default: 'notification' &quot;icon&quot;: &quot;fa-check&quot;, # Font Awesome class &quot;image_url&quot;: &quot;https://odoocdn.com/openerp_website/static/src/img/assets/png/odoo_logo.png&quot;, &quot;timeout&quot;: 2500, # In miliseconds. Ignored if sticky = True. Default: 2500 &quot;sticky&quot;: True, # If true, do not close notification automatically. Default: False &quot;buttons&quot;: [{ &quot;primary&quot;: True, # If true, display button as primary. &quot;text&quot;: &quot;Open&quot;, # Button label text. &quot;icon&quot;: &quot;fa-users&quot;, # Font Awesome class or image URL. &quot;action&quot;: { # Any action dict that can be executed by the action manager. &quot;type&quot;: &quot;ir.actions.act_window&quot;, &quot;view_mode&quot;: &quot;tree&quot;, &quot;res_model&quot;: &quot;res.users&quot;, &quot;views&quot;: [[False, 'list'], [False,'form']], &quot;name&quot;: &quot;Users&quot;, &quot;target&quot;: &quot;new&quot;, }, }, { &quot;primary&quot;: False, &quot;text&quot;: &quot;Open URL&quot;, &quot;icon&quot;: &quot;fa-link&quot;, &quot;action&quot;: { &quot;type&quot;: &quot;ir.actions.act_url&quot;, &quot;url&quot;: &quot;https://naglis.me/&quot;, &quot;target&quot;: &quot;new&quot;, } }], })</code> </pre> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">HTML in <cite>title</cite> or <cite>message</cite> is not supported due to safety concerns.</p> </div> <a name="todo"></a> <h2>TODO</h2> <ul class="simple"> <li>JavaScript tests.</li> <li>Documentation and demos.</li> <li>Multi-action via drop-down button.</li> <li>Model method call actions?</li> <li>Progress bar?</li> </ul>