This question has been flagged
1 Reply
4530 Views

Dear All

    I have written code to return warning message like follows. The code is written in @api.onchange()

try:
    phone_nbr = phonenumbers.parse(number, region=country_code, keep_raw_input=True)
    except phonenumbers.phonenumberutil.NumberParseException as e:
return {
    'warning': {
    'title': 'TITLE OF THE WARNING MESSAGE BOX',
    'message': 'YOUR WARNING MESSAGE',
    }
    }                 

But its displaying message only in console not in dialog box

         

Avatar
Discard
Best Answer

Hello Shaneebkhan why did you put Try and except in onchange method ?

Did any special case ? Try to write in basic python code for checking phonenumbers then you will automatically popup the Warning message.

Avatar
Discard