Error when adding line without currency set on requisition
On purchase_requisition, if you remove currency and then you try to add a line, you get an error
Traceback (most recent call last): File "/trytond/wsgi.py", line 116, in dispatch_request return endpoint(request, **request.view_args) File "/trytond/protocols/dispatcher.py", line 48, in rpc request, database_name, *request.rpc_params) File "/trytond/wsgi.py", line 83, in auth_required return wrapped(*args, **kwargs) File "/trytond/protocols/wrappers.py", line 136, in wrapper return func(request, pool, *args, **kwargs) File "/trytond/protocols/dispatcher.py", line 186, in _dispatch result = rpc.result(meth(inst, *c_args, **c_kwargs)) File "/trytond/model/modelview.py", line 826, in on_change_with changes[fieldname] = getattr(self, method_name)() File "/trytond/model/fields/field.py", line 123, in wrapper return func(self, *args, **kwargs) File "/trytond/modules/purchase_requisition/purchase.py", line 520, in on_change_with_currency return self.requisition.currency.id AttributeError: 'NoneType' object has no attribute 'id'
Fault: 'NoneType' object has no attribute 'id'