|
|
|
@ -1,20 +1,19 @@
|
|
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
|
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
|
|
|
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
|
|
|
<title>Client side message boxes</title>
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
:Author: David Goodger (goodger@python.org)
|
|
|
|
|
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
|
|
|
|
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
|
|
|
|
:Copyright: This stylesheet has been placed in the public domain.
|
|
|
|
|
|
|
|
|
|
Default cascading style sheet for the HTML output of Docutils.
|
|
|
|
|
|
|
|
|
|
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
|
|
|
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
|
|
|
customize this style sheet.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
@ -366,100 +365,103 @@ ul.auto-toc {
|
|
|
|
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
!! This file is generated by oca-gen-addon-readme !!
|
|
|
|
|
!! changes will be overwritten. !!
|
|
|
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
!! source digest: sha256:c6ab6322d92b7ec73af6324032ed00e8a974d28ad30f78d025febc67e5976bf7
|
|
|
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
|
|
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_ir_actions_act_window_message"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_ir_actions_act_window_message"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
|
|
|
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/16.0/web_ir_actions_act_window_message"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_act_window_message"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
|
|
|
<p>This module allows to show a message popup on the client side as result of a button.</p>
|
|
|
|
|
<p><strong>Table of contents</strong></p>
|
|
|
|
|
<div class="contents local topic" id="contents">
|
|
|
|
|
<ul class="simple">
|
|
|
|
|
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#known-issues-roadmap" id="id2">Known issues / Roadmap</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
|
|
|
|
|
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
|
|
|
|
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
|
|
|
|
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="usage">
|
|
|
|
|
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
|
|
|
|
|
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
|
|
|
|
|
<p>Depend on this module and return</p>
|
|
|
|
|
<pre class="code python literal-block">
|
|
|
|
|
<span class="p">{</span>
|
|
|
|
|
<span class="s1">'type'</span><span class="p">:</span> <span class="s1">'ir.actions.act_window.message'</span><span class="p">,</span>
|
|
|
|
|
<span class="s1">'title'</span><span class="p">:</span> <span class="n">_</span><span class="p">(</span><span class="s1">'My title'</span><span class="p">),</span>
|
|
|
|
|
<span class="s1">'message'</span><span class="p">:</span> <span class="n">_</span><span class="p">(</span><span class="s1">'My message'</span><span class="p">),</span>
|
|
|
|
|
<span class="c1"># optional title of the close button, if not set, will be _('Close')</span>
|
|
|
|
|
<span class="c1"># if set False, no close button will be shown</span>
|
|
|
|
|
<span class="c1"># you can create your own close button with an action of type</span>
|
|
|
|
|
<span class="c1"># ir.actions.act_window_close</span>
|
|
|
|
|
<span class="s1">'close_button_title'</span><span class="p">:</span> <span class="s1">'Make this window go away'</span><span class="p">,</span>
|
|
|
|
|
<span class="c1"># Use HTML instead of text</span>
|
|
|
|
|
<span class="s1">'is_html_message'</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
|
|
|
|
<span class="c1"># this is an optional list of buttons to show</span>
|
|
|
|
|
<span class="s1">'buttons'</span><span class="p">:</span> <span class="p">[</span>
|
|
|
|
|
<span class="c1"># a button can be any action (also ir.actions.report.xml et al)</span>
|
|
|
|
|
<span class="p">{</span>
|
|
|
|
|
<span class="s1">'type'</span><span class="p">:</span> <span class="s1">'ir.actions.act_window'</span><span class="p">,</span>
|
|
|
|
|
<span class="s1">'name'</span><span class="p">:</span> <span class="s1">'All customers'</span><span class="p">,</span>
|
|
|
|
|
<span class="s1">'res_model'</span><span class="p">:</span> <span class="s1">'res.partner'</span><span class="p">,</span>
|
|
|
|
|
<span class="s1">'view_mode'</span><span class="p">:</span> <span class="s1">'form'</span><span class="p">,</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">'list'</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="s1">'domain'</span><span class="p">:</span> <span class="p">[(</span><span class="s1">'customer'</span><span class="p">,</span> <span class="s1">'='</span><span class="p">,</span> <span class="kc">True</span><span class="p">)],</span>
|
|
|
|
|
<span class="p">},</span>
|
|
|
|
|
<span class="c1"># or if type == method, you need to pass a model, a method name and</span>
|
|
|
|
|
<span class="c1"># parameters</span>
|
|
|
|
|
<span class="p">{</span>
|
|
|
|
|
<span class="s1">'type'</span><span class="p">:</span> <span class="s1">'method'</span><span class="p">,</span>
|
|
|
|
|
<span class="s1">'name'</span><span class="p">:</span> <span class="n">_</span><span class="p">(</span><span class="s1">'Yes, do it'</span><span class="p">),</span>
|
|
|
|
|
<span class="s1">'model'</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_name</span><span class="p">,</span>
|
|
|
|
|
<span class="s1">'method'</span><span class="p">:</span> <span class="s1">'myfunction'</span><span class="p">,</span>
|
|
|
|
|
<span class="c1"># list of arguments to pass positionally</span>
|
|
|
|
|
<span class="s1">'args'</span><span class="p">:</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">ids</span><span class="p">],</span>
|
|
|
|
|
<span class="c1"># dictionary of keyword arguments</span>
|
|
|
|
|
<span class="s1">'kwargs'</span><span class="p">:</span> <span class="p">{</span><span class="s1">'force'</span><span class="p">:</span> <span class="kc">True</span><span class="p">},</span>
|
|
|
|
|
<span class="c1"># button style</span>
|
|
|
|
|
<span class="s1">'classes'</span><span class="p">:</span> <span class="s1">'btn-primary'</span><span class="p">,</span>
|
|
|
|
|
<span class="p">}</span>
|
|
|
|
|
<span class="p">]</span>
|
|
|
|
|
<span class="p">}</span>
|
|
|
|
|
<span class="p">{</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'type'</span><span class="p">:</span> <span class="s1">'ir.actions.act_window.message'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'title'</span><span class="p">:</span> <span class="n">_</span><span class="p">(</span><span class="s1">'My title'</span><span class="p">),</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'message'</span><span class="p">:</span> <span class="n">_</span><span class="p">(</span><span class="s1">'My message'</span><span class="p">),</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># optional title of the close button, if not set, will be _('Close')</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># if set False, no close button will be shown</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># you can create your own close button with an action of type</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># ir.actions.act_window_close</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'close_button_title'</span><span class="p">:</span> <span class="s1">'Make this window go away'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># Use HTML instead of text</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'is_html_message'</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># this is an optional list of buttons to show</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'buttons'</span><span class="p">:</span> <span class="p">[</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># a button can be any action (also ir.actions.report.xml et al)</span><span class="w">
|
|
|
|
|
</span> <span class="p">{</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'type'</span><span class="p">:</span> <span class="s1">'ir.actions.act_window'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'name'</span><span class="p">:</span> <span class="s1">'All customers'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'res_model'</span><span class="p">:</span> <span class="s1">'res.partner'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'view_mode'</span><span class="p">:</span> <span class="s1">'form'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</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">'list'</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">
|
|
|
|
|
</span> <span class="s1">'domain'</span><span class="p">:</span> <span class="p">[(</span><span class="s1">'customer'</span><span class="p">,</span> <span class="s1">'='</span><span class="p">,</span> <span class="kc">True</span><span class="p">)],</span><span class="w">
|
|
|
|
|
</span> <span class="p">},</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># or if type == method, you need to pass a model, a method name and</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># parameters</span><span class="w">
|
|
|
|
|
</span> <span class="p">{</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'type'</span><span class="p">:</span> <span class="s1">'method'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'name'</span><span class="p">:</span> <span class="n">_</span><span class="p">(</span><span class="s1">'Yes, do it'</span><span class="p">),</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'model'</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_name</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'method'</span><span class="p">:</span> <span class="s1">'myfunction'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># list of arguments to pass positionally</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'args'</span><span class="p">:</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">ids</span><span class="p">],</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># dictionary of keyword arguments</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'kwargs'</span><span class="p">:</span> <span class="p">{</span><span class="s1">'force'</span><span class="p">:</span> <span class="kc">True</span><span class="p">},</span><span class="w">
|
|
|
|
|
</span> <span class="c1"># button style</span><span class="w">
|
|
|
|
|
</span> <span class="s1">'classes'</span><span class="p">:</span> <span class="s1">'btn-primary'</span><span class="p">,</span><span class="w">
|
|
|
|
|
</span> <span class="p">}</span><span class="w">
|
|
|
|
|
</span> <span class="p">]</span><span class="w">
|
|
|
|
|
</span><span class="p">}</span>
|
|
|
|
|
</pre>
|
|
|
|
|
<p>You are responsible for translating the messages.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="known-issues-roadmap">
|
|
|
|
|
<h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
|
|
|
|
|
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
|
|
|
|
|
<ul class="simple">
|
|
|
|
|
<li>add <cite>message_type</cite> to differenciate between warnings, errors, etc.</li>
|
|
|
|
|
<li>have one <cite>message_type</cite> to show a nonmodal warning on top right</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="bug-tracker">
|
|
|
|
|
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
|
|
|
|
|
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
|
|
|
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
|
|
|
|
|
In case of trouble, please check there if your issue has already been reported.
|
|
|
|
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
|
|
|
|
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_act_window_message%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
|
|
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
|
|
|
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_act_window_message%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
|
|
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="credits">
|
|
|
|
|
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
|
|
|
|
|
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
|
|
|
|
|
<div class="section" id="authors">
|
|
|
|
|
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
|
|
|
|
|
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
|
|
|
|
|
<ul class="simple">
|
|
|
|
|
<li>Therp BV</li>
|
|
|
|
|
<li>ACSONE SA/NV</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="contributors">
|
|
|
|
|
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
|
|
|
|
|
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
|
|
|
|
|
<ul class="simple">
|
|
|
|
|
<li>Holger Brunn <<a class="reference external" href="mailto:hbrunn@therp.nl">hbrunn@therp.nl</a>></li>
|
|
|
|
|
<li>Zakaria Makrelouf (ACSONE SA/NV) <<a class="reference external" href="mailto:z.makrelouf@gmail.com">z.makrelouf@gmail.com</a>></li>
|
|
|
|
|
<li>Benjamin Willig (ACSONE SA/NV) <<a class="reference external" href="mailto:benjamin.willig@acsone.eu">benjamin.willig@acsone.eu</a>></li>
|
|
|
|
|
<li>Ioan Galan (Studio73) <<a class="reference external" href="mailto:ioan@studio73.es">ioan@studio73.es</a>></li>
|
|
|
|
|
<li>Abraham Anes (Studio73) <<a class="reference external" href="mailto:abraham@studio73.es">abraham@studio73.es</a>></li>
|
|
|
|
|
<li>Miguel Gandia (Studio73) <<a class="reference external" href="mailto:miguel@studio73.es">miguel@studio73.es</a>></li>
|
|
|
|
|
<li><a class="reference external" href="https://www.dynapps.be">DynApps NV</a>:<ul>
|
|
|
|
|
<li>Koen Loodts</li>
|
|
|
|
|
<li>Raf Ven</li>
|
|
|
|
@ -468,13 +470,13 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="maintainers">
|
|
|
|
|
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
|
|
|
|
|
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
|
|
|
|
|
<p>This module is maintained by the OCA.</p>
|
|
|
|
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
|
|
|
|
<p>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.</p>
|
|
|
|
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_ir_actions_act_window_message">OCA/web</a> project on GitHub.</p>
|
|
|
|
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/16.0/web_ir_actions_act_window_message">OCA/web</a> project on GitHub.</p>
|
|
|
|
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|