Skip to content
Permalink
Browse files

[FIX] membership: infinite recursion in computed fields

closes #38050

X-original-commit: 1b50c05
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
  • Loading branch information...
sbidoul authored and fw-bot committed Jan 27, 2018
1 parent de27f8a commit c847cf68fbb93ee2be5e6e03543375b67a1c3758
Showing with 3 additions and 6 deletions.
  1. +3 −6 addons/membership/models/partner.py
@@ -86,12 +86,9 @@ def _compute_membership_stop(self):
'associate_member.membership_state')
def _compute_membership_cancel(self):
for partner in self:
if partner.membership_state == 'canceled':
partner.membership_cancel = self.env['membership.membership_line'].search([
('partner', '=', partner.id)
], limit=1, order='date_cancel').date_cancel
else:
partner.membership_cancel = False
partner.membership_cancel = self.env['membership.membership_line'].search([
('partner', '=', partner.id)
], limit=1, order='date_cancel desc').date_cancel

def _membership_state(self):
"""This Function return Membership State For Given Partner. """

0 comments on commit c847cf6

Please sign in to comment.
You can’t perform that action at this time.