@ -14,7 +14,7 @@ class ResPartner(models.Model):
partner.is_favorite = self.env.user in partner.favorite_user_ids
def _inverse_is_favorite(self):
favorite_partners = not_fav_partners = self.env['res.partner'].sudo()
favorite_partners = not_fav_partners = self.env['res.partner']
for partner in self:
if self.env.user in partner.favorite_user_ids:
favorite_partners |= partner