Create chart crashes after server restart if account.account is extended
In the CreateChart wizard the default_properties method uses the Account class, but does not get it from the pool.
If the account.account class is extended in a custom module and the module is activated, then after the server is restarted, the wizard crashes with:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 111, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 47, in rpc
return methods.get(request.rpc_method, _dispatch)(
File "/wrapt/wrappers.py", line 566, in __call__
return self._self_wrapper(self.__wrapped__, self._self_instance,
File "/trytond/wsgi.py", line 78, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 131, 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/wizard/wizard.py", line 314, in execute
return wizard._execute(state_name)
File "/trytond/wizard/wizard.py", line 345, in _execute
result = self._execute(transition())
File "/trytond/wizard/wizard.py", line 325, in _execute
defaults = state.get_defaults(self, state_name,
File "/trytond/wizard/wizard.py", line 95, in get_defaults
defaults.update(default(fields))
File "/trytond/modules/account/account.py", line 2621, in default_properties
receivable_accounts = Account.search([
File "/trytond/model/modelsql.py", line 1266, in search
tables, expression = cls.search_domain(domain)
File "/trytond/model/modelsql.py", line 1426, in search_domain
domain = cls._search_domain_active(domain, active_test=active_test)
File "/trytond/model/modelstorage.py", line 515, in _search_domain_active
if not ('active' in cls._fields
AttributeError: type object 'account.account' has no attribute '_fields'