Assigning internal shipment throws error
After creating an internal shipment and changing its status from Waiting to Assigned, the Tryton GTK client throws this error:
Traceback (most recent call last):
File "/site-packages/trytond/wsgi.py", line 47, in dispatch_request
return endpoint(request, **request.view_args)
File "/site-packages/trytond/protocols/dispatcher.py", line 59, in rpc
request, database_name, *request.params)
File "/site-packages/trytond/wsgi.py", line 39, in auth_required
return wrapped(*args, **kwargs)
File "/site-packages/trytond/protocols/dispatcher.py", line 40, in
wrapper
return func(request, pool, *args, **kwargs)
File "/site-packages/trytond/protocols/dispatcher.py", line 201, in
_dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/site-packages/trytond/model/modelsql.py", line 763, in read
getter_results = field.get(ids, cls, field_list, values=result)
File "/site-packages/trytond/model/fields/function.py", line 92, in
get
return dict((name, call(name)) for name in names)
File "/site-packages/trytond/model/fields/function.py", line 92, in
<genexpr>
return dict((name, call(name)) for name in names)
File "/site-packages/trytond/model/fields/function.py", line 86, in
call
return dict((r.id, method(r, name)) for r in records)
File "/site-packages/trytond/model/fields/function.py", line 86, in
<genexpr>
return dict((r.id, method(r, name)) for r in records)
File "/site-packages/trytond/modules/purchase/stock.py", line 247, in
get_purchase
return self.origin.purchase.id
File "/site-packages/trytond/model/modelstorage.py", line 1202, in
__getattr__
return super(ModelStorage, self).__getattr__(name)
File "/site-packages/trytond/model/model.py", line 376, in __getattr__
% (self.__name__, name, self._values))
AttributeError: 'purchase.line' Model has no attribute 'purchase': None
Notes: This was tested using the 4.0 series. After updating to 4.2, the bug does not persist and the Internal Shipment can be moved to Assigned status. The client was running on OpenSUSE 42.1 Linux while trytond was running on FreeBSD 11. The people using 4.0 might be interested in a fix if they are unable to upgrade for whatever reason.
Files
Download | Creator | Timestamp | Type |
---|---|---|---|
tryton_bug.png | @flpkgsrc | 2016-12-02 21:46:04.043000 UTC | image/png |