From 67e7319bd1f966bce993dfa8347a771e2544873d Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Tue, 29 Oct 2024 10:29:16 +0100 Subject: [PATCH] [FIX] shopinvader_anonymous_partner: Remove return value in _promote_anonymous_partner And always drop the cookie --- shopinvader_anonymous_partner/models/res_partner.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/shopinvader_anonymous_partner/models/res_partner.py b/shopinvader_anonymous_partner/models/res_partner.py index 1b523acb0..b627abbb4 100644 --- a/shopinvader_anonymous_partner/models/res_partner.py +++ b/shopinvader_anonymous_partner/models/res_partner.py @@ -114,7 +114,6 @@ def _promote_from_anonymous_partner(self, anonymous_partner: ResPartner): This method can return False to prevent the anonymous partner cookie from being deleted. """ - return True @api.model def _promote_anonymous_partner( @@ -126,7 +125,5 @@ def _promote_anonymous_partner( This method calls the partner promotion and removes the anonymous partner cookie. """ anonymous_partner = self._get_anonymous_partner__cookie(cookies) - if partner._promote_from_anonymous_partner( - anonymous_partner, - ): - self._delete_anonymous_partner__cookie(cookies, response) + partner._promote_from_anonymous_partner(anonymous_partner) + self._delete_anonymous_partner__cookie(cookies, response)