Default Project Analytics Account - v11
I am making a custom module for better handling Project Analytics for my engineering firm. I WAS specifically trying to separate the default behavior of automatically creating an Analytic Account with the project.name when a Project is created via whatever means.
THEN (after asking my original version of this question) I FINALLY SAW that Projects don't have a name at all, and Name_Search() is redirected to account.analytic.account. Clearly Projects don't exist except as a container for tasks and not as a truly standalone entity with a freely associatable Analytic Account.
The best I can gather as to the relationships between Projects/Analytics is that the Analytic entries are auto-generated from the "Create Project" views by virtue of the
_inherits[account.analytic.account:account_analytic_id]statement. Because of _inherits, the Project Model is nothing more than an Account.Analytic.Account object with some extra fields added which get dumped to a new table called project_project (because that's the _name of the ProjectModel). So I suppose here's my two interrelated questions I'm having a hard time figuring out how to properly test:
1. When _inherits is used in this case, there is no 'name' field in a Project...what happens if I did create a name? what is the mechanism where Odoo determines which name I am talking about? How would I tell Odoo I have two name fields in different tables?
2. I see no references in Project Model to "account.analytic.account.name", and the Odoo inheritance documentation with the diagram showing all 3 inheritance types shows "Obj1" (AccountAnalyticAccount in this case) as a container within "New Obj" (Project in this case). Is this diagram misleading and this is really just the same inheritance scheme that I'm used to seeing in all other OOP? If so, let's refer back to question 1 on how does it resolve the CRUD between the same column names in two different database tables?
Any guidance to clear up this mosaic in my head would be a great help!