Issue 9381

Title
Crash when creating purchase from request
Priority
bug
Status
resolved
Nosy list
ced, pokoli, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2020-06-02.09:12:47 by pokoli, last changed 4 months ago by roundup-bot.

Messages

New changeset 44af17c339b5 by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/tryton-env/rev/44af17c339b5
New changeset f13813452984 by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/trytond/rev/f13813452984
New changeset ff5d55a7358f by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/modules/sale_subscription/rev/ff5d55a7358f
New changeset b4e64b5dc320 by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/modules/sale/rev/b4e64b5dc320
New changeset f9a694f8314d by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/modules/purchase_request/rev/f9a694f8314d
New changeset 99d05c59a44c by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/modules/carrier_weight/rev/99d05c59a44c
New changeset 123ea3226846 by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/modules/account_tax_cash/rev/123ea3226846
New changeset 208de3ba798c by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/modules/account_payment_sepa/rev/208de3ba798c
New changeset 93a9cf8538c8 by Cédric Krier in branch 'default':
Ensure values can be sorted
https://hg.tryton.org/modules/account_payment/rev/93a9cf8538c8
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-07-05.18:22:47
Here is review303881005 which solve the problem with a generic tools and fix similar issue in each module.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-06-02.09:12:45
When creating the purchases of two purchase request I get the following exception:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 109, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 47, in rpc
    return methods.get(request.rpc_method, _dispatch)(
  File "/trytond/wsgi.py", line 77, 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 181, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/wizard/wizard.py", line 295, in execute
    return wizard._execute(state_name)
  File "/trytond/wizard/wizard.py", line 326, in _execute
    result = self._execute(transition())
  File "/trytond/modules/purchase_request/purchase_request.py", line 446, in transition_start
    requests = sorted(requests, key=keyfunc)
TypeError: '<' not supported between instances of 'NoneType' and 'int'

Fault: '<' not supported between instances of 'NoneType' and 'int'

The problem is because one of the purchase request is related to drop_shipment (so it has a customer set) but the other is not.
History
Date User Action Args
2020-07-21 00:37:48roundup-botsetmessages: + msg59391
2020-07-21 00:37:42roundup-botsetmessages: + msg59390
2020-07-21 00:37:33roundup-botsetmessages: + msg59389
2020-07-21 00:37:27roundup-botsetmessages: + msg59388
2020-07-21 00:37:25roundup-botsetmessages: + msg59387
2020-07-21 00:37:21roundup-botsetmessages: + msg59386
2020-07-21 00:37:15roundup-botsetmessages: + msg59385
2020-07-21 00:37:08roundup-botsetmessages: + msg59384
2020-07-21 00:37:07roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg59383
2020-07-10 09:36:30reviewbotsetmessages: + msg59249
2020-07-09 22:16:44reviewbotsetmessages: + msg59248
2020-07-05 18:45:35reviewbotsetmessages: + msg59004
2020-07-05 18:22:47cedsetreviews: 317571002 -> 317571002,303881005
assignedto: pokoli -> ced
messages: + msg59003
nosy: + ced
2020-06-08 14:36:59reviewbotsetmessages: + msg58610
2020-06-08 13:59:05reviewbotsetmessages: + msg58608
2020-06-08 13:58:08pokolisetreviews: 327361002 -> 317571002
2020-06-02 10:31:23reviewbotsetmessages: + msg58411
2020-06-02 09:38:13reviewbotsetnosy: + reviewbot
messages: + msg58409
2020-06-02 09:13:55pokolisetstatus: in-progress -> testing
reviews: 327361002
keyword: + review
2020-06-02 09:12:47pokolicreate