addons14/base_rest_demo/services/exception_services.py
def user_error(self):
        """
        Simulate an odoo.exceptions.UserError
        Should be translated into BadRequest with a description into the json
        body
        """
        raise UserError(_("UserError message"))

        Simulate an odoo.exceptions.UserError
        Should be translated into BadRequest with a description into the json
        body
        
Simulate an odoo.exceptions.UserError
Should be translated into BadRequest with a description into the json
body
Simulate an odoo . exceptions . UserError Should be translated into BadRequest with a description into the json body
def user_error(self):
        raise UserError(_("UserError message"))
def user_error ( self ) : raise UserError ( _ ( "UserError message" ) )
Simulate an odoo.exceptions.UserError
Should be translated into BadRequest with a description into the json
body
Simulate an odoo . exceptions . UserError Should be translated into BadRequest with a description into the json body
"""
        Simulate an odoo.exceptions.UserError
        Should be translated into BadRequest with a description into the json
        body
        """
self