
from odoo import models, fields, api


class DonationDonation(models.Model):
    _inherit = 'donation.donation'

    event_registration_id=fields.Many2one(
            'event.registration',
            String='Event registration',
            index=True,
            readonly=True,
            track_visibility='onchange',
            
        )
    # def remove_draft_donation(self):
    #     donation_draft=self.env['donation.donation'].search([('event_registration_id','=',False),('state','=','draft')])
    #     if donation_draft:
    #         for d in donation_draft:
    #             date



