@ -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.
< 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 >
Two kinds of notification are supported.< / p >
< ul class = "simple" >
< 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 >
< / ul >
< p > < strong > Table of contents< / strong > < / p >
< p > < strong > Table of contents< / strong > < / p >
< div class = "contents local topic" id = "contents" >
< 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 >
< 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 >
< 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" >
< 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 >
< 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 >
< / pre >
< p > or< / p >
< p > or< / p >
< pre class = "code python literal-block" >
< 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 >
< / pre >
< div class = "figure" >
< div class = "figure" >
< img alt = "Sample notifications" src = "https://raw.githubusercontent.com/OCA/web/12.0/web_notify/static/description/notifications_screenshot.png" / >
< 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 > 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 > 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 > 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 >
< / ul >
< / div >
< / div >
< div class = "section" id = "maintainers" >
< div class = "section" id = "maintainers" >