PURPOSE As event will soon evolve (onchange -> compute, code improvements, addition of new features) cleaning and improving tests is necessary to help avoid issues. SPECIFICATIONS As event model grow in complexity and features, it is easier to find its way through the application with having registration model lying in its own file to separate it from event-specific models (event.type, event.event). Ticket (event_sale) and sponsor (website_event_track) models are also extracted in their own file. LINKS LINKS Side effect of Task ID 2089156 (event onchange to compute) Community PR odoo/odoo#43127 Enterprise PR odoo/enterprise#7656
14 lines
386 B
Python
14 lines
386 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models
|
|
|
|
|
|
class Registration(models.Model):
|
|
_inherit = 'event.registration'
|
|
|
|
def _sms_get_number_fields(self):
|
|
""" This method returns the fields to use to find the number to use to
|
|
send an SMS on a record. """
|
|
return ['mobile', 'phone']
|