|
8 | 8 |
|
9 | 9 | /*
|
10 | 10 | :Author: David Goodger ([email protected])
|
11 |
| -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ |
| 11 | +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ |
12 | 12 | :Copyright: This stylesheet has been placed in the public domain.
|
13 | 13 |
|
14 | 14 | Default cascading style sheet for the HTML output of Docutils.
|
| 15 | +Despite the name, some widely supported CSS2 features are used. |
15 | 16 |
|
16 | 17 | See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
17 | 18 | customize this style sheet.
|
|
274 | 275 | margin-left: 2em ;
|
275 | 276 | margin-right: 2em }
|
276 | 277 |
|
277 |
| -pre.code .ln { color: grey; } /* line numbers */ |
| 278 | +pre.code .ln { color: gray; } /* line numbers */ |
278 | 279 | pre.code, code { background-color: #eeeeee }
|
279 | 280 | pre.code .comment, code .comment { color: #5C6576 }
|
280 | 281 | pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
300 | 301 | span.pre {
|
301 | 302 | white-space: pre }
|
302 | 303 |
|
303 |
| -span.problematic { |
| 304 | +span.problematic, pre.problematic { |
304 | 305 | color: red }
|
305 | 306 |
|
306 | 307 | span.section-subtitle {
|
@@ -425,22 +426,26 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
|
425 | 426 | <li>Another allowing to send a window / client action</li>
|
426 | 427 | </ul>
|
427 | 428 | <p>The reload button is activated when sending the notification with:</p>
|
428 |
| -<p>The action can be used using the <tt class="docutils literal">action</tt> keyword:</p> |
| 429 | +<p>The action can be used using the <tt class="docutils literal">action</tt> keyword and we can choose which name to |
| 430 | +give to our button with the <tt class="docutils literal">button_name</tt> key in the action context <cite>params</cite> key:</p> |
429 | 431 | <pre class="code python literal-block">
|
430 |
| - <span class="n">action</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="p">[</span><span class="s2">"ir.actions.act_window"</span><span class="p">]</span><span class="o">.</span><span class="n">_for_xml_id</span><span class="p">(</span><span class="s1">'sale.action_orders'</span><span class="p">)</span><span class="w"> |
431 |
| -</span> <span class="n">action</span><span class="o">.</span><span class="n">update</span><span class="p">({</span><span class="w"> |
432 |
| -</span> <span class="s1">'res_id'</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">id</span><span class="p">,</span><span class="w"> |
433 |
| -</span> <span class="s1">'views'</span><span class="p">:</span> <span class="p">[(</span><span class="kc">False</span><span class="p">,</span> <span class="s1">'form'</span><span class="p">)],</span><span class="w"> |
434 |
| -</span> <span class="p">})</span><span class="w"> |
| 432 | +<span class="n">action</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="p">[</span><span class="s2">"ir.actions.act_window"</span><span class="p">]</span><span class="o">.</span><span class="n">_for_xml_id</span><span class="p">(</span><span class="s1">'sale.action_orders'</span><span class="p">)</span><span class="w"> |
| 433 | +</span><span class="n">action</span><span class="o">.</span><span class="n">update</span><span class="p">({</span><span class="w"> |
| 434 | +</span> <span class="s1">'res_id'</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">id</span><span class="p">,</span><span class="w"> |
| 435 | +</span> <span class="s1">'views'</span><span class="p">:</span> <span class="p">[(</span><span class="kc">False</span><span class="p">,</span> <span class="s1">'form'</span><span class="p">)],</span><span class="w"> |
| 436 | +</span><span class="p">})</span><span class="w"> |
| 437 | +</span><span class="n">action</span><span class="p">[</span><span class="s2">"context"</span><span class="p">]</span><span class="o">.</span><span class="n">setdefault</span><span class="p">(</span><span class="s2">"params"</span><span class="p">,</span> <span class="p">{})</span><span class="w"> |
| 438 | +</span><span class="n">action</span><span class="p">[</span><span class="s2">"context"</span><span class="p">][</span><span class="s2">"params"</span><span class="p">][</span><span class="s2">"button_name"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"Sales"</span><span class="w"> |
| 439 | +</span><span class="n">action</span><span class="p">[</span><span class="s2">"context"</span><span class="p">][</span><span class="s2">"params"</span><span class="p">][</span><span class="s2">"button_icon"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"fa-eye"</span><span class="w"> |
435 | 440 | </span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">user</span><span class="o">.</span><span class="n">notify_info</span><span class="p">(</span><span class="s1">'My information message'</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="n">action</span><span class="p">)</span>
|
436 | 441 | </pre>
|
437 | 442 | <div class="figure">
|
438 |
| -<img alt="Sample notifications" src="https://raw.githubusercontent.com/OCA/web/16.0/web_notify/static/description/notifications_screenshot.gif" /> |
| 443 | +<img alt="Sample notifications" src="https://raw.githubusercontent.com/OCA/web/16.0/web_notify/static/img/notifications_screenshot.gif" /> |
439 | 444 | </div>
|
440 | 445 | <p>You can test the behaviour of the notifications by installing this module in a demo database.
|
441 | 446 | Access the users form through Settings -> Users & Companies. You’ll see a tab called “Test web notify”, here you’ll find two buttons that’ll allow you test the module.</p>
|
442 | 447 | <div class="figure">
|
443 |
| -<img alt="Sample notifications" src="https://raw.githubusercontent.com/OCA/web/16.0/web_notify/static/description/test_notifications_demo.png" /> |
| 448 | +<img alt="Sample notifications" src="https://raw.githubusercontent.com/OCA/web/16.0/web_notify/static/img/test_notifications_demo.png" /> |
444 | 449 | </div>
|
445 | 450 | </div>
|
446 | 451 | <div class="section" id="bug-tracker">
|
@@ -477,7 +482,9 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
|
477 | 482 | <div class="section" id="maintainers">
|
478 | 483 | <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
|
479 | 484 | <p>This module is maintained by the OCA.</p>
|
480 |
| -<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> |
| 485 | +<a class="reference external image-reference" href="https://odoo-community.org"> |
| 486 | +<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /> |
| 487 | +</a> |
481 | 488 | <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
482 | 489 | mission is to support the collaborative development of Odoo features and
|
483 | 490 | promote its widespread use.</p>
|
|
0 commit comments