[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
committed by Stéphan Sainléger
parent eba51e1654
commit a5993e3786
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
{ {
"name": "partner_profiles", "name": "partner_profiles",
"version": "12.0.2.5.0", "version": "12.0.2.5.1",
"author": "Elabore", "author": "Elabore",
"website": "https://elabore.coop", "website": "https://elabore.coop",
"maintainer": "Stéphan Sainléger", "maintainer": "Stéphan Sainléger",

View File

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