Hi,
Can anyone help me with this?
I need a popup/alert everytime the user(s) set the selling price less than the cost price, so that they would have to set the selling price equal to or greater than the cost price.
Thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
Can anyone help me with this?
I need a popup/alert everytime the user(s) set the selling price less than the cost price, so that they would have to set the selling price equal to or greater than the cost price.
Thanks.
from openerp.exceptions import ValidationError
#check your desired condition....
raise ValidationError("""your alert message goes here""")
Hope this will helps you
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Aug 24
|
543 | ||
|
3
May 24
|
7251 | ||
POS Session wont close
Solved
|
|
1
Sep 23
|
1334 | |
|
0
Aug 23
|
554 | ||
|
1
Sep 22
|
994 |
You can use "@api.constrains".
@api.constrains("your_field")
def alert(self):
if ??<??:
raise exceptions.ValidationError(u"Your Alert")