I'm trying to execute a method on user_id change in the sale.order model in Odoo v8, it use osv.osv class.
I create an inherited model with a models.Model class and use the @api.onchange decorator but nothing append.
# -*- coding: utf-8 -*-
from openerp import models, fields, api
from openerp.exceptions import Warning
class Order(models.Model):
_inherit = 'sale.order'
@api.onchange('user_id')
def on_saler_change(self):
raise Warning(('Something happened.'))How i suppose to do this?