I am trying to do the exact same thing that was addressed in this post, except in version 9.
https://www.odoo.com/fr_FR/forum/aide-1/question/access-one2many-list-in-many2one-onchange-event-93056
I tried implementing the v7 patch code here, but it won't work in 9.
Thanks.
I get this error:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 680, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 316, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 309, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 959, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 509, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 892, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 884, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 381, in old_api
result = method(recs, *args, **kwargs)
File "/opt/odoo/addons/project_emp_team/models/project_emp_team.py", line 71, in onchange
match = onchange_v7.match(field_onchange[field_name])
TypeError: unhashable type: 'list'