This question has been flagged
1 Reply
1503 Views

Hi ,

when i clicked create button for new tax, i have got an error. i have noticed the error is related somehow to taxgroup. i couldn't create a tax group because there is no "Create" button for tax group creation.

would you please help ?

Thanks,


Avatar
Discard
Author

this is the error message :

Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/tools/cache.py", line 85, in lookup
r = d[key]
File "/home/odoo/src/odoo/15.0/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
File "/home/odoo/src/odoo/15.0/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7f84fbf6cf70>, 'account.tax_group_taxes')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/odoo/src/odoo/15.0/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/src/odoo/15.0/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/15.0/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/15.0/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/15.0/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/home/odoo/src/odoo/15.0/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/15.0/addons/web/controllers/main.py", line 1347, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/15.0/addons/web/controllers/main.py", line 1339, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 6356, in onchange
defaults = self.default_get(missing_names)
File "/home/odoo/src/odoo/15.0/addons/account/models/account_tax.py", line 139, in default_get
rslt = super(AccountTax, self).default_get(fields_list + ['company_id'])
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 1410, in default_get
defaults[name] = field.default(self)
File "/home/odoo/src/odoo/15.0/addons/account/models/account_tax.py", line 69, in _default_tax_group
return self.env.ref('account.tax_group_taxes')
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 578, in ref
res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
File "/home/odoo/src/odoo/15.0/odoo/addons/base/models/ir_model.py", line 1935, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-35>", line 2, in _xmlid_lookup
File "/home/odoo/src/odoo/15.0/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/15.0/odoo/addons/base/models/ir_model.py", line 1928, in _xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/15.0/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: External ID not found in the system: account.tax_group_taxes

Need answers for few questions .. Are you using odoo15 CE or Enterprise? using base accounting module or custom? are their any custom module installed modifying accounting ??

Best Answer

File "/home/odoo/src/odoo/15.0/addons/account/models/account_tax.py", line 69, in _default_tax_group return self.env.ref('account.tax_group_taxes')

From your error i can see that you don't have a default tax group in your system it's either because you don't have a chart of account installed or you have deleted the default tax group.

So if you have Odoo 15 EE:

1) Install a chart of account localization if you haven't already.
2) Add a new tax group from Accounting > Configuration > Accounting > Tax Groups.

Or if you have Odoo 15 CE download the accounting app from Odoo app store here.



Happy to help :) an upvote will be awesome



Avatar
Discard