Hello everyone,
I need to create a custom module via Studio for managing Talents within a sports agency, namely basketball players and coaches. I'd like some advice in terms of good design practices.
So I have several options:
- Create a Talent model that groups all Talent information → Pros: The model is isolated and doesn't impact the rest of the Odoo structure, so will facilitate migrations. Cons: Some fields are redundant with the `res.partner` model (Contacts), and we don't benefit from the functionalities linked to this module (which could evolve in the future).
- Create a Talent model that groups only Talent-specific fields, linked to the `res.partner` model, so that contact fields are those of the `res.partner` model and Talent-specific fields remain in the Talent model. Pros: you benefit from the functionalities of the Contact model, while retaining an independent model. Cons: You can't edit contact fields from a Talent view, even with linked fields, unless you use automations (not recommended to avoid overloading custom developments). So, the user will have to use two different views to edit a Talent.
- Extend the `res.partner` template to add a tab for Talent management in the Contacts view, which must be displayed in the Talent module, and which is only displayed in the Contacts module if the boolean is_talent is set to 1 (or talent_score > 0, if the current structure is used). Pros: simplify the structure by starting from an existing model, and benefit from all current and future Contacts functionalities. Cons: Weighing down one of Odoo's central models, and making it support numerous customizations, so that if one day one of these customizations falls, it's the res.partner model that risks falling, and thus blocking the entire database.
For the time being, I'd still go for the last option, thinking that if we do our customizations properly and document them correctly, maintainability remains good, and it's the best solution in terms of functionality. Do you see anything extra?