summaryrefslogtreecommitdiff
path: root/addons/phone_validation/wizard/phone_blacklist_remove.py
blob: 8dff728f9f82bdf471e9122b80814ab55f423e99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- coding: utf-8 -*-

from odoo import fields, models


class PhoneBlacklistRemove(models.TransientModel):
    _name = 'phone.blacklist.remove'
    _description = 'Remove phone from blacklist'

    phone = fields.Char(string="Phone Number", readonly=True, required=True)
    reason = fields.Char(name="Reason")

    def action_unblacklist_apply(self):
        return self.env['phone.blacklist'].action_remove_with_reason(self.phone, self.reason)