I have again something weird going on with a One2Many field. This time I get
Traceback (most recent call last): File "/trytond/wsgi.py", line 108, in dispatch_request return endpoint(request, **request.view_args) File "/trytond/protocols/dispatcher.py", line 48, in rpc request, database_name, *request.rpc_params) File "/trytond/wsgi.py", line 76, in auth_required return wrapped(*args, **kwargs) File "/trytond/protocols/wrappers.py", line 131, in wrapper return func(request, pool, *args, **kwargs) File "/trytond/protocols/dispatcher.py", line 186, in _dispatch result = rpc.result(meth(*c_args, **c_kwargs)) TypeError: 'One2Many' object is not callable
This error pops up about 1 second after you have opened a list / form view. After you have clicked the error away, you can proceed with everything without loosing data.
It’s a very simple scheme:
class ReviewActivityResources(ModelSQL, ModelView): __name__ = 'review.activity.resources' review = fields.Many2One('review.activity', 'Review') class ReviewActivity(Workflow, ModelSQL, ModelView): __name__ = "review.activity" resources = fields.One2Many('review.activity.resources', 'review', 'Resources')
When I rename
resources to for example
activity_resources the error is gone. I have multiple models with a
resources field and they all have the same behavior.