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.

18 lines
553 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2012-2018 Akretion France
  3. # @author: Alexis de Lattre <alexis.delattre@akretion.com>
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. from odoo import api, models
  6. class EventRegistration(models.Model):
  7. _name = 'event.registration'
  8. _inherit = ['event.registration', 'phone.validation.mixin']
  9. _phone_name_sequence = 100
  10. _phone_name_fields = ['phone']
  11. @api.onchange('phone')
  12. def phone_change(self):
  13. if self.phone:
  14. self.phone = self.phone_format(self.phone)