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

While create the UserError message, unable to more the string to new line,

Facing in version  odoo 17.


Example:

raise UserError(_( "Warning ! \n\n Qty must be grather than zero."))





아바타
취소
베스트 답변

Hi,

\n is working as you can see below:

def raise_error(self):
raise UserError(_("Warning!\n\nQty must be greater than zero."))


You need to restart the Odoo service and upgrade your Module.

아바타
취소
작성자

Thanks Waleed Ali Mohsen

I tried but i didn't see any changes on this, I am facing this in 17.0

관련 게시물 답글 화면 활동
3
3월 25
2941
0
3월 25
1439
4
1월 25
2414
2
4월 25
2871
0
2월 25
1221