-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
membership_last_start is not correct #126
Comments
Je constate également qu'en opérant un tri par date sur les adhésions et en remettant l'adhésion à un état null puis à un état "membre payant" cela résoud le problème...peut-être un début de solution à appliquer dans le code ? |
Reporting the same bug on version
The patch: commit 798bb24970f67fe2fe5109efebf3d96355cc8782
Author: Carmen Bianca Bakker <[email protected]>
Date: Wed Sep 7 16:28:51 2022 +0200
[FIX] membership_extension: Use latest start date for Membership Last Start Date
I'm not sure what the behaviour prior to this patch is.
Signed-off-by: Carmen Bianca Bakker <[email protected]>
diff --git a/odoo/temp-oca-src/membership_extension/models/res_partner.py b/odoo/temp-oca-src/membership_extension/models/res_partner.py
index 9cc4757..1882d61 100644
--- a/odoo/temp-oca-src/membership_extension/models/res_partner.py
+++ b/odoo/temp-oca-src/membership_extension/models/res_partner.py
@@ -168,7 +168,7 @@ class ResPartner(models.Model):
continue
date_to = line_date_to + timedelta(days=delta)
if not last_from or (
- last_from <= date_to and last_from > line.date_from
+ last_from <= date_to and last_from < line.date_from
):
last_from = line.date_from
if not last_to or last_to < line_date_to: |
@carmenbianca Have you proposed a PR with such patch? |
@chienandalu I haven't. I'd be happy to create a PR if the maintainer acknowledges the issue and describes what the behaviour should be. My colleague is of the opinion that the correct value of membership_last_start is 2022-09-01 in the above example. |
Hello. I'm not really sure that this patch works. It doesn't for me. 139 partner.membership_start = date_from I remplaced by 139 partner.membership_start = last_from It works as long as there is no gap in adhesion period. |
Sure, the current behavior isn't right. So the PR will be welcome
I would expect the date of the current period as well. |
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
The fix landed in 93c8e75 FWIW. |
Hello folks. Sorry for resurrecting this old thread. After some analisys, we found out that the solution applied for this issue was wrong, and that the previous behavior was right. Reasons explained in #190 (comment) so I invite you to join the conversation. We're preparing a fix. Thanks! |
Module
Membership extension
Describe the bug
Le renouvellement d'une adhésion ne donne pas la bonne information sur le début de la dernière adhésion (membership_last_start)
To Reproduce
Affected versions: 12, 13, 14
Steps to reproduce the behavior:
2.Créer un renouvellement d'adhésion : ie du 01/01/2022 au 31/12/2022
Expected behavior
Voici les informations attendues
Date de début d'adhésion : 01/01/2021
Dernière date d'adhésion : 01/01/2022
Date de fin d'adhésion : 31/12/2022
Additional context
Or, il y a une erreur car membership_last_start = membership_start soit 01/01/2021 au lieu de 01/01/2022.
Je pense qu'il y a une erreur dans la boucle avec les variables last_from et date_from dans le fichier res.partner.py.
The text was updated successfully, but these errors were encountered: