Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3077 Widoki

Hello everyone,

I have created an app and want to import it in another database (new Odoo Studio). I've managed to Export it by clicking Customization --> Export. On the new database, I clicked Cusomization --> Import but get the error as below:


RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/saas-16.2/odoo/tools/cache.py", line 91, in lookup
r = d[key]
File "", line 2, in __getitem__
File "/home/odoo/src/odoo/saas-16.2/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/saas-16.2/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('ir.model.access', , 2, 'write')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/saas-16.2/odoo/http.py", line 1692, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/src/odoo/saas-16.2/odoo/service/model.py", line 134, in retrying
result = func()
File "/home/odoo/src/odoo/saas-16.2/odoo/http.py", line 1719, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/src/odoo/saas-16.2/odoo/http.py", line 1916, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/src/odoo/saas-16.2/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/src/odoo/saas-16.2/odoo/http.py", line 709, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/src/odoo/saas-16.2/addons/web/controllers/dataset.py", line 32, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/saas-16.2/addons/web/controllers/dataset.py", line 24, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/saas-16.2/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/saas-16.2/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/saas-16.2/addons/base_import_module/models/base_import_module.py", line 24, in import_module
self.write({'state': 'done', 'import_message': res[0]})
File "/home/odoo/src/odoo/saas-16.2/odoo/models.py", line 3722, in write
self.check_access_rights('write')
File "/home/odoo/src/odoo/saas-16.2/odoo/models.py", line 3508, in check_access_rights
return self.env['ir.model.access'].check(self._name, operation, raise_exception)
File "/home/odoo/src/odoo/saas-16.2/odoo/addons/base/models/ir_model.py", line 1812, in check
has_access = model in self._get_allowed_models(mode)
File "", line 2, in _get_allowed_models
File "/home/odoo/src/odoo/saas-16.2/odoo/tools/cache.py", line 96, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/saas-16.2/odoo/addons/base/models/ir_model.py", line 1780, in _get_allowed_models
self.env.cr.execute(f"""
File "/home/odoo/src/odoo/saas-16.2/odoo/sql_db.py", line 311, in execute
res = self._obj.execute(query, params)
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block


The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (https://tuoitre-uit.odoo.com/web/assets/23-58d7efa/web.assets_backend.min.js:962:163)
at XMLHttpRequest. (https://tuoitre-uit.odoo.com/web/assets/23-58d7efa/web.assets_backend.min.js:970:13)


Database version:

Exported customization: 16.0+e

Imported customization: saas~16.2+e


I don't know where I have done wrong? Please help

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

The error you're encountering indicates a problem with accessing or modifying certain database records during the import process. This could be caused by various factors, such as data inconsistencies, missing dependencies, or conflicts with existing data.

Here are some steps you can take to troubleshoot and resolve the issue:

  1. Check Data Consistency: Review the exported customization file to ensure that it contains valid data and references to existing records. Look for any anomalies or inconsistencies that could cause issues during the import process.
  2. Verify Dependencies: Ensure that all dependencies required by the exported customization are present and properly configured in the new database. This includes any custom modules, third-party addons, or external libraries that may be referenced in the customization.
  3. Review Error Logs: Examine the error logs and traceback messages provided in the error report. They may contain valuable information about the specific database operations that failed and the underlying cause of the problem.
  4. Database Integrity: Check the integrity of the database in both the source and destination environments. Verify that there are no data corruption issues or constraints violations that could interfere with the import process.
  5. Transaction Handling: The error message mentions a "failed SQL transaction." This suggests that there may be a problem with transaction handling or database locking. Try restarting the Odoo server and reattempting the import to see if the issue persists.
  6. Database Version Compatibility: Ensure that the exported customization is compatible with the version of Odoo running in the new database. Mismatched versions could lead to compatibility issues and errors during the import process

By following these steps and thoroughly investigating the error message, you should be able to identify and address the underlying cause of the import error in Odoo.


Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lut 24
878
1
lut 23
2960
1
wrz 21
3462
1
lut 24
1796
2
paź 24
2828