Message 76869

Author
mrichez
Date
2022-06-01.09:07:23
Message id
76869

Content

When using multiple warehouses, there's no default warehouse set by default on sale.

Module sale_stock_quantity is checking stock quantity when quoting sale. But to check stock_quantity, warehouse should be required otherwise we get this error:

Traceback (most recent call last):
File "/trytond/wsgi.py", line 119, in dispatch_request
return endpoint(request, request.view_args)
File "/trytond/protocols/dispatcher.py", line 47, in rpc
request, database_name, request.rpc_params)
File "/trytond/wsgi.py", line 86, in auth_required
return wrapped(
args,
kwargs)
File "/trytond/protocols/wrappers.py", line 161, 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/model/modelview.py", line 707, in wrapper
return func(cls, records, *args,
kwargs)
File "/trytond/model/workflow.py", line 37, in wrapper
result = func(cls, filtered, args, *kwargs)
File "/sale/sale.py", line 172, in quote
sale.create_planned_move()
File "/sale/sale.py", line 148, in create_planned_move
move.from_location = self.warehouse.storage_location
AttributeError: 'NoneType' object has no attribute 'storage_location'

Fault: 'NoneType' object has no attribute 'storage_location'

History
Date User Action Args
2022-06-01 09:07:26mrichezsetrecipients: + tbruyere
2022-06-01 09:07:25mrichezsetmessageid: <1654067245.9374814.O4Z52DNEDBHFJZ5R.issue11531@tryton.org>
2022-06-01 09:07:25mrichezlinkissue11531 messages
2022-06-01 09:07:23mrichezcreate

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