Browse Source

Merge PR #886 into 12.0

Signed-off-by NL66278
12.0
OCA-git-bot 5 years ago
parent
commit
6eb4a25961
  1. 10
      partner_multi_relation_tabs/models/res_partner_relation_type.py

10
partner_multi_relation_tabs/models/res_partner_relation_type.py

@ -57,3 +57,13 @@ class ResPartnerRelationType(models.Model):
tab_partner_category_id != rec.partner_category_right: tab_partner_category_id != rec.partner_category_right:
raise ValidationError(_( raise ValidationError(_(
"Partner category right not compatible with right tab")) "Partner category right not compatible with right tab"))
@api.multi
def _update_right_vals(self, vals):
"""Make sure that on symmetric relations, right vals follow left vals.
@attention: original method only handles properties ending with _left
and we need to update tab_right_id as well
"""
vals['tab_right_id'] = vals.get('tab_left_id', self['tab_left_id'])
super(ResPartnerRelationType, self)._update_right_vals(vals)
Loading…
Cancel
Save