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

Hi,

The above prompt error is from the ff code:



from odoo.exceptions import UserError, ValidationError

class AccountPayment(models.Model):
    _inherit = "account.payment"

    # readonly=True,
    check_number_char = fields.Char(string="Check Number")

    @api.one
    @api.constrains('check_number_char')
    def isNumeric_check_number(self):

        if not self.check_number_char.isdigit():
             raise ValidationError(_("A check number must be numeric."))


아바타
취소
베스트 답변

Hi,

Import this in the file,

from odoo import _

Thanks

아바타
취소
관련 게시물 답글 화면 활동
Validation Error 해결 완료
4
7월 25
5032
0
12월 22
2429
2
3월 15
5015
2
7월 25
2409
1
3월 25
1290