Before this commit the creation of the message(s) was done within a for loop in a big function.
Due to this there is no easy nor clean way to override and modify values on the mail.message record(s).
By placing the preparation of message data in a subfunction it can be overwritten and modified as wanted.
closesodoo/odoo#102825
X-original-commit: 6d6d7c12ac456e648bd35645f9617cd1d8ff60e6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>