Partner Relation Hierarchy
partner_multi_relation_hierarchy · OCA/partner-contact
Health
32/100
poor
-
Security22/251 minor finding
-
Activity0/25Last human commit 98 months ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 10.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.04 MB
Module directory on disk
Code analysis
2 migration notes
4 models
2 views
0 HTTP endpoints
Migration considerations
ResPartner— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (2 methods) migration-api-multi-one · sourceview_partner_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
form_res_partner_relation_type |
res.partner.relation.type | form | Inherits partner_multi_relation.form_res_partner_relation_type | |
view_partner_form |
view.partner.form | res.partner | form | Inherits base.view_partner_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 4
New fields (3)
-
has_partner_aboveBooleancompute='_compute_partners_above'readonly=True -
partner_above_hierarchyCharcompute='_compute_partners_above'readonly=Truestring='Upper level partners' -
partner_above_idsOne2many → res.partner.relation.hierarchycomodel_name='res.partner.relation.hierarchy'inverse_name='partner_id'readonly=Truestring='Partners above in hierarchy'
-
is_above(self, other_partner)@api.multiCheck whether this partner is above other_partner.
New fields (0)
No new fields.
Public methods (1)-
create(self, vals)@api.modelPrevent contradictory links in hierarchy. We should not do this in a constraint, as those are only checked after creation has already been done, and other modules might fail when they process in invalid hierarchy when triggered on create. TODO: Prevent this also on write.
New fields (5)
-
hierarchy_displayCharhelp='Compact representation of hierarchy'readonly=Truerequired=Truestring='Hierarchy' -
levelIntegerhelp='Number of levels that partner above is higher up'readonly=Truerequired=Truestring='Level' -
partner_above_idMany2one → res.partnercomodel_name='res.partner'help='Partner somewhere above in the hierarchy'readonly=Truerequired=Truestring='Partner above' -
partner_below_idMany2one → res.partnercomodel_name='res.partner'help='Partner immediately below partner above in the hierarchy'readonly=Truerequired=Truestring='Partner below' -
partner_idMany2one → res.partnercomodel_name='res.partner'help='The partner at the base of the hierarchy'readonly=Truerequired=Truestring='Partner'
No public methods.
New fields (1)
-
hierarchySelectiondefault='equal'help="Select wether the relation between the partners can be considered hierarchical. And if so which side is considered 'above'."selection=HIERARCHY_SELECTIONstring='Partners equal, right above, or left above'
No public methods.