This question has been flagged
3 Replies
13178 Views

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
Discard
Best Answer

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
Discard
Best Answer

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
Discard

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

Author

Problem still not solved ;(

Best Answer

Download and install pop-up reminder from Odoo apps

Avatar
Discard