[FIX] partner_profiles: correct unlink() for position profiles

This commit is contained in:
Stéphan Sainléger
2023-09-20 09:59:15 +02:00
parent e822cc2aee
commit 880f784510
2 changed files with 2 additions and 2 deletions

View File

@@ -140,7 +140,7 @@ class res_partner(models.Model):
for partner in self:
if partner.is_company:
# Delete position profiles linked to the company main profile
for position in self.structure_position_ids:
for position in partner.structure_position_ids:
position.unlink()
return super(res_partner, self).unlink()