콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
3725 화면

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.

아바타
취소
관련 게시물 답글 화면 활동
0
4월 24
972
1
3월 24
2238
3
6월 23
1543
0
3월 15
4077
2
12월 20
6736