I have tried this code
raise odoo.osv.osv.except_osv('title', 'description')
But the title gets ignored.
If I know well, by default you can not. However Odoo developers kept backward compatibility. When you use except_orm
, then it will show your title text.
In my opinion this is not enough beauty solution.
from odoo import exceptions, _
...
raise exceptions.except_orm(_('My Title), _('My message + lorem ipsum'))