@ -372,8 +372,11 @@ ul.auto-toc {
< p > This technical module allows you to send instant notification messages from the server to the user in live.
Two kinds of notification are supported.< / p >
< ul class = "simple" >
< li > Warning: Displayed in a red flying popup div< / li >
< li > Information: Displayed in a light yellow flying popup div< / li >
< li > Success: Displayed in a < cite > success< / cite > theme color flying popup div< / li >
< li > Danger: Displayed in a < cite > danger< / cite > theme color flying popup div< / li >
< li > Warning: Displayed in a < cite > warning< / cite > theme color flying popup div< / li >
< li > Information: Displayed in a < cite > info< / cite > theme color flying popup div< / li >
< li > Default: Displayed in a < cite > default< / cite > theme color flying popup div< / li >
< / ul >
< p > < strong > Table of contents< / strong > < / p >
< div class = "contents local topic" id = "contents" >
@ -397,11 +400,23 @@ Two kinds of notification are supported.</p>
< h1 > < a class = "toc-backref" href = "#id2" > Usage< / a > < / h1 >
< p > To send a notification to the user you just need to call one of the new methods defined on res.users:< / p >
< pre class = "code python literal-block" >
< 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_success< / span > < span class = "p" > (< / span > < span class = "n" > message< / span > < span class = "o" > =< / span > < span class = "s1" > 'My success message'< / span > < span class = "p" > )< / span >
< / pre >
< p > or< / p >
< pre class = "code python literal-block" >
< 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_danger< / span > < span class = "p" > (< / span > < span class = "n" > message< / span > < span class = "o" > =< / span > < span class = "s1" > 'My danger message'< / span > < span class = "p" > )< / span >
< / pre >
< p > or< / p >
< pre class = "code python literal-block" >
< 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_warning< / span > < span class = "p" > (< / span > < span class = "n" > message< / span > < span class = "o" > =< / span > < span class = "s1" > 'My warning message'< / span > < span class = "p" > )< / span >
< / pre >
< p > or< / p >
< pre class = "code python literal-block" >
< 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 = "n" > message< / span > < span class = "o" > =< / span > < span class = "s1" > 'My information message'< / span > < span class = "p" > )< / span >
< / pre >
< p > or< / p >
< pre class = "code python literal-block" >
< 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_warning< / span > < span class = "p" > (< / span > < span class = "n" > message< / span > < span class = "o" > =< / span > < span class = "s1" > 'My marning message'< / span > < span class = "p" > )< / 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_default < / span > < span class = "p" > (< / span > < span class = "n" > message< / span > < span class = "o" > =< / span > < span class = "s1" > 'My default message'< / span > < span class = "p" > )< / span >
< / pre >
< div class = "figure" >
< img alt = "Sample notifications" src = "https://raw.githubusercontent.com/OCA/web/12.0/web_notify/static/description/notifications_screenshot.png" / >
@ -435,6 +450,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
< li > Laurent Mignon < < a class = "reference external" href = "mailto:laurent.mignon@acsone.eu" > laurent.mignon@ acsone.eu< / a > > < / li >
< li > Serpent Consulting Services Pvt. Ltd.< < a class = "reference external" href = "mailto:jay.vora@serpentcs.com" > jay.vora@ serpentcs.com< / a > > < / li >
< li > Aitor Bouzas < < a class = "reference external" href = "mailto:aitor.bouzas@adaptivecity.com" > aitor.bouzas@ adaptivecity.com< / a > > < / li >
< li > Shepilov Vladislav < < a class = "reference external" href = "mailto:shepilov.v@protonmail.com" > shepilov.v@ protonmail.com< / a > > < / li >
< / ul >
< / div >
< div class = "section" id = "maintainers" >