Tryton - Issues

 

Message52611

Author resteve
Recipients
Date 2019-10-22.14:54:03
Content
1. Create an agent without plan (currency field is invisible)
2. Create a commission with an agent without plan:

Traceback (most recent call last):
File "/trytond/wsgi.py", line 104, 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 72, 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 191, in _dispatch
result = rpc.result(meth(inst, *c_args, **c_kwargs))
File "/trytond/model/modelview.py", line 735, in on_change_with
changes[fieldname] = getattr(self, method_name)()
File "/trytond/model/fields/field.py", line 117, in wrapper
return func(self, *args, **kwargs)
File "/trytond/modules/commission/commission.py", line 279, in on_change_with_currency
return self.agent.currency.id
AttributeError: 'NoneType' object has no attribute 'id'

...because agent has not currency.
History
Date User Action Args
2019-10-22 14:54:04restevesetmessageid: <1571748844.04.0.394016415454.issue8751@tryton.org>
2019-10-22 14:54:03restevelinkissue8751 messages
2019-10-22 14:54:03restevecreate

Showing 10 items. Show all history (warning: this could be VERY long)