Hello house,
Please am new to Odoo.
I need a method on how a fields value in another model to be updated when a record is created.
For instance, i have these classes
class Antena_Pole(models.Model):
_name='antena.pole'
current_signal = fields.Float(string='Current Signal')
class RadioWave(models.Model):
_name='radio.wave'
current_wave = fields.Float(string='Wave')
class RadioBand(models.Model):
_name='radio.band'
signal = fields.Float(string='Signal')
antena = fields.Many2one('antena.pole', string='Antena')
wave = fields.Float(string='Wave')
class Antena_Pole(models.Model):
_inherit='antena.pole'
radioband_ids = fields.One2many('radio.band', 'antena', string='Radio Band')
So when a record is created in RadioBand Class, i want the signal value and wave value to be updated in AntenaPole Class and RadioWave Class respectively.
Am using odoo version 10
Thanks in advance
If I want to check some constraints or insert some values before creating, editing or deleting our record than you may use odoo override methods: http://learnopenerp.blogspot.com/2017/11/how-to-override-odoo-functions.html