Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
15095 Weergaven

Guys, how can I do it, I would like to add a message when "if statement" is true or if certain value is reached.

At this moment I have a message but once i click on it to confirm/close popup window it stop/cancel whole operation.

Is there any way to do it and once i click "OK" it will continue/finish the operation ?

Something like 'confirm' but message depending on result of calculation for example.

[code]

if cust > full_stock:

raise Warning(('Attention!'),(My_error_msg_1))

if cust <= full_stock:

raise Warning(('Attention!'),(My_error_msg_2))

self.single(cr, uid, ids, context=context)

if cust > (2.5 * mwos):

raise Warning(('Attention!'),(My_error_msg_3))

self.single(cr, uid, ids, context=context)

[/code]

Any ideas ?

By the way, "POPUP Reminder"   ................. nah, do not like it.

Avatar
Annuleer
Beste antwoord

Rob,

According to ur code, its working fine only.

But what Odoo actually does is it stops n rollback the whole transaction till the last commit if it encounters any expection/warning raised in the system.

So what you can do is, kepping executable line before raising exception and commit till that..,

if cust <= full_stock:

self.single(cr, uid, ids, context=context)

cr.commit() #it will commit all your transactions after your last commit,

raise Warning(('Attention!'),(My_error_msg_2))

this anyway is not preferred way, until and unless you are sure of using it, as it may bring inconsistency in DB if you use it at wrong place

Hope it Helps    

Avatar
Annuleer

no mail, yes rob, n i vl be availble today

Auteur

Problem still not solved ;(

Beste antwoord

Hi! You can use CapCut to create a popup message in your video without stopping or canceling the whole operation. Simply create a text overlay for your message, and then use the animation feature to make it slide down or pop in at the desired time. You can also adjust the opacity and duration of the animation to your liking.
https://capcutapk.io


Avatar
Annuleer
Beste antwoord

Download and install pop-up reminder from Odoo apps

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
apr. 16
3513
1
mrt. 16
22227
1
okt. 15
6142
1
jun. 16
3409
2
jun. 16
3632