[IMP] Added `hierarchy_level` and relations control to `res.company`
@enricostn @xavier.bonet We can assure that base.main_company will be always the instance company? This is the logic added in the post init hook.
Features
- New
hierarchy_levelselector field inres.company - Constrains on
hierarchy_level- Can only be one
instancecompany -
instancecompany can't have anyparent_idcompany -
coordinatorparenthierarchy_levelmust beinstance -
communityparenthierarchy_levelmust becoordinator
- Can only be one
- Added
parent_id_filtered_idscomputed field to create dynamic domain toparent_iddepending on thehierarchy_level - Added
parent_idfield to easy_company_creation (Domain is not dynamic, we only create community type here) - Added unit test. (Feedback is appreciated
😅 ) - Post init hook assigns
instancetobase.companyand the children companycoordinator
Roadmap
- Enable creation of
coordinatorcompanies in easy company creation
Edited by Daniil Digtyar Vasilieva