Hi, Im using odoo 11 and i want to add warning to POS when user change price product and the price inputed is below standard_price product.
Any suggestion? im really stuck at this point about this.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi, Im using odoo 11 and i want to add warning to POS when user change price product and the price inputed is below standard_price product.
Any suggestion? im really stuck at this point about this.
from openerp.exceptions import ValidationError
#below code is your if condition
if price is less than:
raise ValidationError("Price is below")
if you run this code, you can't continue
in above code the if condition is just pseudo code....
DHA Medic you are behaving just like a code illiterate person
Hi Yustinus,
If you need to show a warning in pos interface when user input a price lower than the standard price, you can achieve this by modifying the function "set_unit_price". This function is used to set the unit price for the products in the orderlines. In your case, you can add the warning based on your condition inside that function.
Hope this helps.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Apr 24
|
230 | ||
Unable to update PoS config
Solved
|
|
1
Mar 24
|
1389 | |
|
3
Jun 23
|
638 | ||
|
0
Mar 15
|
3303 | ||
|
2
Dec 20
|
5765 |