Hello,
I want to do a simple test : trigger an onchange on res_partner model, and it never trigerred !
Module is installed, without errors.
Here is my code ( res_partner.py ) :
from odoo import fields, models, api
class res_partner(models.Model):
_name = 'res.partner'
_inherit = ['res.partner']
@api.onchange('name')
def _onchange_name(self):
self.name = self.name + "xxx"
return {
'warning': {
'title': "name",
'message': "Name was changed",
}
}
__init__.py code from package models :
import res_partner
root __init__.py code :
from . import models
Here is my strucure :
test
>__init__.py
>__manifest__.py
>static
>models
> __init__.py
> res_partner.py
Thanks.