Crash when creating a tax line for a move line without account
When creating a tax line for a move without account I get the followin traceback:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 71, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 41, in rpc
request, database_name, *request.rpc_params)
File "/trytond/wsgi.py", line 42, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 122, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 174, in _dispatch
result = rpc.result(meth(inst, *c_args, **c_kwargs))
File "/trytond/model/modelview.py", line 679, in on_change_with
changes[fieldname] = getattr(self, method_name)()
File "/trytond/model/fields/field.py", line 106, in wrapper
return func(self, *args, **kwargs)
File "/trytond/modules/account/tax.py", line 1185, in on_change_with_company
return self.move_line.account.company.id
AttributeError: 'NoneType' object has no attribute 'company'