This adds a `toInline` function that replaces the code that was duplicated between convert_inline and mass_mailing_widget. The duplication was confusing and error prone. X-original-commit: 916582af2d707fc1aa462c6feffa3f5defda75a2 Part-of: odoo/odoo#81540