Tryton - Issues

 

Issue9072

Title AttributeError: 'NoneType' object has no attribute 'party_full_name'
Priority bug Status resolved
Superseder Nosy List ced, pokoli, reviewbot, roundup-bot, yangoon
Type crash Components stock_package_shipping_ups
Assigned To ced Keywords easy, review
Reviews 303421002
View: 303421002

Created on 2020-02-18.17:06:06 by yangoon, last changed by roundup-bot.

Messages
New changeset 803c15b06c39 by Cédric Krier in branch 'default':
Validate shipment before create shipping
https://hg.tryton.org/tryton-env/rev/803c15b06c39
New changeset 5003727a3367 by Cédric Krier in branch 'default':
Validate shipment before create shipping
https://hg.tryton.org/modules/stock_package_shipping/rev/5003727a3367
review303421002 updated at https://codereview.tryton.org/303421002/#ps313411002
msg57478 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-04-25.19:15:32
Here is review303421002
msg57350 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-04-20.22:40:38
I guess this can happen if the address on the warehouse is removed after having saved the shipment. So there is no validation from the create shipping UPS wizard.
I guess we could call validate_packing_ups in the start transition of the wizard so we would have a proper error message.
msg57184 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-04-15.18:39:59
Could you share the steps to reproduce it? 

I've tried to reproduce it on a fresh database and I get a nice error telling me that I need to set and address on the warehouse (which is the cause of your problem). 

P.S: I'm testing it on latest trunk
msg55460 (view) Author: [hidden] (yangoon) (Tryton translator) Date: 2020-02-18.17:06:05
https://demo5.4.tryton.org:8000/

Create Shipping for Packages:


Traceback (most recent call last):
  File "/usr/local/lib/python37/dist-packages/trytond/wsgipy", line 108, in dispatch_request
    return endpoint(request, **requestview_args)
  File "/usr/local/lib/python37/dist-packages/trytond/protocols/dispatcherpy", line 48, in rpc
    request, database_name, *requestrpc_params)
  File "/usr/local/lib/python37/dist-packages/trytond/wsgipy", line 76, in auth_required
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python37/dist-packages/trytond/protocols/wrapperspy", line 131, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/usr/local/lib/python37/dist-packages/trytond/protocols/dispatcherpy", line 186, in _dispatch
    result = rpcresult(meth(*c_args, **c_kwargs))
  File "/usr/local/lib/python37/dist-packages/trytond/wizard/wizardpy", line 285, in execute
    return wizard_execute(state_name)
  File "/usr/local/lib/python37/dist-packages/trytond/wizard/wizardpy", line 316, in _execute
    result = self_execute(transition())
  File "/usr/local/lib/python37/dist-packages/trytond/modules/stock_package_shipping_ups/stockpy", line 142, in transition_start
    shipment_request = selfget_request(shipment, packages, credential)
  File "/usr/local/lib/python37/dist-packages/trytond/modules/stock_package_shipping_ups/stockpy", line 306, in get_request
    warehouse_address)
  File "/usr/local/lib/python37/dist-packages/trytond/modules/stock_package_shipping_ups/stockpy", line 234, in get_shipping_party
    'Name': addressparty_full_name[:35],
AttributeError: 'NoneType' object has no attribute 'party_full_name'
History
Date User Action Args
2020-04-28 00:33:01roundup-botsetmessages: + msg57680
2020-04-28 00:32:53roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg57679
2020-04-25 19:41:08reviewbotsetnosy: + reviewbot
messages: + msg57480
2020-04-25 19:15:32cedsetstatus: chatting -> testing
reviews: 303421002
messages: + msg57478
keyword: + review
assignedto: ced
2020-04-20 22:40:38cedsetstatus: need-eg -> chatting
nosy: + ced
messages: + msg57350
2020-04-15 18:40:00pokolisetstatus: unread -> need-eg
nosy: + pokoli
messages: + msg57184
2020-03-24 10:05:32pokolisetkeyword: + easy
2020-02-18 17:06:26yangoonsetcomponent: + stock_package_shipping_ups
2020-02-18 17:06:06yangooncreate

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