Update cancel_membership.py
This commit is contained in:
parent
64a65ec456
commit
3c70fb98cc
|
|
@ -42,8 +42,12 @@ class MembershipRefues(models.TransientModel):
|
|||
|
||||
def request_cancel_reason(self):
|
||||
request_id = self.env.context.get('active_id')
|
||||
for record in self:
|
||||
if record.request_id:
|
||||
record.request_id.cancel_reasone = record.reason_id.id
|
||||
# Assuming self.env.context contains the ID of the membership
|
||||
if request_id:
|
||||
|
||||
membership = self.env['dev.membership'].browse(request_id)
|
||||
self.env['membership.cancellation.request'].create({
|
||||
'member_id': membership.partner_id.id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue