Tryton - Issues



Title Cannot create commission for agent without a plan
Priority bug Status testing
Superseder Nosy List ced, pokoli, resteve, reviewbot
Type crash Components commission
Assigned To resteve Keywords review
Reviews 284291002
View: 284291002

Created on 2019-10-22.14:54:04 by resteve, last changed by ced.

review284291002 updated at
msg52638 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-23.01:23:06
I think only agent with plan should be allowed on commission.
msg52617 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-10-22.15:40:32
Probably we can use the company currency if the plan does not have any currency set
msg52611 (view) Author: [hidden] (resteve) Date: 2019-10-22.14:54:03
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/", line 104, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/", line 48, in rpc
request, database_name, *request.rpc_params)
File "/trytond/", line 72, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/", line 131, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/", line 191, in _dispatch
result = rpc.result(meth(inst, *c_args, **c_kwargs))
File "/trytond/model/", line 735, in on_change_with
changes[fieldname] = getattr(self, method_name)()
File "/trytond/model/fields/", line 117, in wrapper
return func(self, *args, **kwargs)
File "/trytond/modules/commission/", line 279, in on_change_with_currency
AttributeError: 'NoneType' object has no attribute 'id'

...because agent has not currency.
Date User Action Args
2019-10-25 00:08:13cedsetstatus: chatting -> testing
assignedto: resteve
2019-10-24 15:53:41reviewbotsetnosy: + reviewbot
messages: + msg52663
2019-10-24 15:49:14restevesetreviews: 284291002
keyword: + review
2019-10-23 01:23:06cedsetnosy: + ced
messages: + msg52638
2019-10-22 15:40:33pokolisetnosy: + pokoli
messages: + msg52617
2019-10-22 15:04:25albertcasettitle: Can create commission that agent has not a plan -> Cannot create commission for agent without a plan
2019-10-22 14:54:04restevecreate

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