Daily updates from Odoo
Wednesday, April 8, 2020
1 change · master
Code cleanup and technical improvements
This update removes long-deprecated internal error handling and replaces it with the current standard approach. It helps keep the platform easier to maintain and reduces reliance on outdated behavior, with little expected day-to-day impact for users.
Original PR description
The `odoo.exceptions.except_orm` has been a deprecated exception type with deprecation warning for 5 years, it has been removed in favor of UserError which becomes the super class of all user-related errors. Since we are here trying to clean odoo custom exceptions, we are also deprecating the `name` exception attribute in favor of the more standard `message` attribute. The `name` (along with `value`) were two attributes used to raise `except_orm` exceptions before the introduction of `UserError`, `AccessError` and related exceptions. The `name` attribute, at the time, was holding the exception type/title. Nowadays it contains the error message. The `value` attribute, at the time, was holding the error message. Nowadays it is no more used. Task: 2187728 Related to: odoo/odoo#45723