Before this commit, there was a hack done in Field.js to handle
a special case of the Many2ManyTagsField which sometimes require
an additional "color" field to be fetched. This field is given in
option on the many2many field, in the arch.
It wasn't possible for the Many2ManyTags field to add that field
on its "FieldToFetch", because this object was static (it didn't
depend on the arch). This commit allows it to do so as FieldsToFetch
can now be a function that receives the fieldInfo (extracted from
the arch) in arguments.
So with this commit, fieldsToFetch can be either an array of fields
(instead of an object as before), or a function returning an array
of fields.
Part of task 3179751
closesodoo/odoo#112518
Related: odoo/enterprise#37020
Signed-off-by: Georis François (fge) <fge@odoo.com>