mail_blacklist_remove.py 444 B

123456789101112131415
  1. # -*- coding: utf-8 -*-
  2. from odoo import fields, models
  3. class MailBlacklistRemove(models.TransientModel):
  4. _name = 'mail.blacklist.remove'
  5. _description = 'Remove email from blacklist wizard'
  6. email = fields.Char(name="Email", readonly=True, required=True)
  7. reason = fields.Char(name="Reason")
  8. def action_unblacklist_apply(self):
  9. return self.env['mail.blacklist'].action_remove_with_reason(self.email, self.reason)