Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3 Antworten
14618 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen

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

Autor

Problem still not solved ;(

Beste Antwort

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
Verwerfen
Beste Antwort

Download and install pop-up reminder from Odoo apps

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Apr. 16
3114
1
März 16
21648
1
Okt. 15
5685
1
Juni 16
2959
2
Juni 16
3303