"dont show again" on user warning

35 views
Skip to first unread message

Simon Klemenc

unread,
May 4, 2016, 11:20:32 AM5/4/16
to tryton
hi,

I want to show a warning message to a user under certain circumstances.
However it seems that once the user checks "dont show again" he won't receive the message anymore...
How can i avoid this choice?

best regards
simon

Nicolas Évrard

unread,
May 4, 2016, 12:20:17 PM5/4/16
to tryton
* Simon Klemenc [2016-05-04 17:20 +0200]:
>hi,

Hello,

>I want to show a warning message to a user under certain circumstances.
>However it seems that once the user checks "dont show again" he won't
>receive the message anymore...

Of course he won't since he asked to not be warned again :).

>How can i avoid this choice?

On the server side this happens thanks to the raise_user_warning:

http://doc.tryton.org/4.0/trytond/doc/ref/models/models.html#trytond.model.Model.raise_user_warning

As you can see the warning_name is used to uniquely identify the
warning and thus allow the user to bypass some of them.

To avoid this just return an always different warning_name.

--
Nicolas Évrard - B2CK SPRL
E-mail/Jabber: nicolas...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Cédric Krier

unread,
May 4, 2016, 12:25:04 PM5/4/16
to tryton
Give a unique name to the warning.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Reply all
Reply to author
Forward
0 new messages