You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
658 B

from odoo import fields, models, _
class RecurringDonationWizard(models.TransientModel):
_name = 'opendons.recurringdonation.wizard'
_description = 'recurring donation wizard'
stopped_reason=fields.Selection(string='Stop reason',selection=[('motif1', 'Motif 1'), ('motif2', 'Motif 2')])
donation_id=fields.Integer('donation id')
def stopRecurringDonation(self):
donation=self.env['donation.donation'].search([('id','=',self.donation_id)])
donation.recurring_template="stopped"
donation.stopped_reason=self.stopped_reason
donation.stopped_date=fields.Date.context_today(self)