Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
3702 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź
from openerp.exceptions import ValidationError

#below code is your if condition
if price is less than:
    raise ValidationError("Price is below")

Awatar
Odrzuć

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

Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
kwi 24
957
1
mar 24
2222
3
cze 23
1536
0
mar 15
4045
2
gru 20
6709