Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Partner Relations

Entity: res.partner.relation

Compute Method: _compute_this_partner_id

View 19.0
Inputs Method Outputs
  • right_partner_id
  • left_partner_id
+ """Show inverse type when coming from right partner."""
+ current_partner = self._get_current_partner()
+ for this in self:
+             this.this_partner_id = (
+                 this.right_partner_id
+                 if this.right_partner_id == current_partner
+                 else this.left_partner_id
+             )
  • this_partner_id

Back to entity