'Create a \'date_cancel\' on the membership_line object'

@api.multi
def action_cancel(self):

    self.env['membership.membership_line'].search([('account_invoice_line', 'in', self.mapped('invoice_line_ids').ids)]).write({'date_cancel': fields.Date.today()})
    return super(Invoice, self).action_cancel()
