Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
2503 Vistas

Dear odoo community member, i need help to solve this problem. my database have error model Account, i cant open data account model (Customer Invoice,Vendor bill, Journal, Reconcile and other with relation to account) and also expenses canot open.


Odoo Log

Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 642, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/http.py", line 334, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/http.py", line 327, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo/http.py", line 942, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/pos_retail/controllers/pos_controllers.py", line 25, in call_kw
response = super(dataset, self).call_kw(model, method, args, kwargs, path)
File "/opt/odoo/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 895, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 887, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/api.py", line 687, in call_kw
return call_kw_model(method, model, args, kwargs)
File "/opt/odoo/odoo/api.py", line 672, in call_kw_model
result = method(recs, *args, **kwargs)
File "/opt/odoo/addons/web_planner/models/web_planner.py", line 46, in render
values.update(getattr(self, planner_find_method_name)()) # update the default value
File "/opt/odoo/addons/account/models/web_planner.py", line 17, in _prepare_planner_account_data
'is_coa_installed': bool(self.env['account.account'].search_count([])),
File "/opt/odoo/odoo/models.py", line 1498, in search_count
res = self.search(args, count=True)
File "/opt/odoo/odoo/models.py", line 1521, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/opt/odoo/odoo/models.py", line 4290, in _search
self._cr.execute(query_str, where_clause_params)
File "/opt/odoo/odoo/sql_db.py", line 154, in wrapper
return f(self, *args, **kwargs)
File "/opt/odoo/odoo/sql_db.py", line 231, in execute
res = self._obj.execute(query, params)
InternalError: invalid page in block 8 of relation base/49632/2659
LINE 1: SELECT count(1) FROM "account_account"

PostgreSQL Log

2023-03-24 11:47:53 WIB [3714-7] odoo@RLC ERROR: invalid page in block 8 of relation base/49632/2659 at character 22
2023-03-24 11:47:53 WIB [3714-8] odoo@RLC STATEMENT: SELECT count(1) FROM "account_account"
2023-03-24 11:49:28 WIB [4092-1] odoo@RLC ERROR: invalid page in block 8 of relation base/49632/2659 at character 815
2023-03-24 11:49:28 WIB [4092-2] odoo@RLC STATEMENT: SELECT "account_account"."internal_type" as "internal_type","account_account"."name" as "name","account_account"."note" as "note","account_account"."write_uid" as "write_uid","account_account"."deprecated" as "deprecated","account_account"."company_id" as "company_id","account_account"."create_uid" as "create_uid","account_account"."create_date" as "create_date","account_account"."compacted" as "compacted","account_account"."code" as "code","account_account"."user_type_id" as "user_type_id","account_account"."id" as "id","account_account"."type_third_parties" as "type_third_parties","account_account"."last_time_entries_checked" as "last_time_entries_checked","account_account"."currency_id" as "currency_id","account_account"."write_date" as "write_date","account_account"."reconcile" as "reconcile" FROM "account_account"
WHERE "account_account".id IN (1, 4, 13, 6, 5) ORDER BY "account_account"."code" 
 
2023-03-24 11:49:34 WIB [3981-1] odoo@RLC ERROR: invalid page in block 8 of relation base/49632/2659 at character 815
2023-03-24 11:49:34 WIB [3981-2] odoo@RLC STATEMENT: SELECT "account_account"."internal_type" as "internal_type","account_account"."name" as "name","account_account"."note" as "note","account_account"."write_uid" as "write_uid","account_account"."deprecated" as "deprecated","account_account"."company_id" as "company_id","account_account"."create_uid" as "create_uid","account_account"."create_date" as "create_date","account_account"."compacted" as "compacted","account_account"."code" as "code","account_account"."user_type_id" as "user_type_id","account_account"."id" as "id","account_account"."type_third_parties" as "type_third_parties","account_account"."last_time_entries_checked" as "last_time_entries_checked","account_account"."currency_id" as "currency_id","account_account"."write_date" as "write_date","account_account"."reconcile" as "reconcile" FROM "account_account"
WHERE "account_account".id IN (1, 4, 13, 6, 5) ORDER BY "account_account"."code" 
 
2023-03-24 12:01:16 WIB [3710-3] odoo@RLC ERROR: invalid page in block 8 of relation base/49632/2659 at character 22
2023-03-24 12:01:16 WIB [3710-4] odoo@RLC STATEMENT: SELECT count(1) FROM "account_account"
2023-03-24 12:02:51 WIB [4092-3] odoo@RLC ERROR: invalid page in block 8 of relation base/49632/2659 at character 22
2023-03-24 12:02:51 WIB [4092-4] odoo@RLC STATEMENT: SELECT count(1) FROM "account_account"
2023-03-24 12:02:57 WIB [3981-3] odoo@RLC ERROR: invalid page in block 8 of relation base/49632/2659 at character 113
2023-03-24 12:02:57 WIB [3981-4] odoo@RLC STATEMENT: SELECT account_account_type_rel.journal_id, account_account_type_rel.account_id FROM account_account_type_rel, "account_account"
WHERE ("account_account"."deprecated" IS NULL or "account_account"."deprecated" = false ) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))) AND account_account_type_rel.journal_id IN (6, 5) AND account_account_type_rel.account_id = account_account.id
ORDER BY "account_account"."code" OFFSET 0
 
2023-03-24 12:03:51 WIB [4092-5] odoo@RLC ERROR: invalid page in block 8 of relation base/49632/2659 at character 815
2023-03-24 12:03:51 WIB [4092-6] odoo@RLC STATEMENT: SELECT "account_account"."internal_type" as "internal_type","account_account"."name" as "name","account_account"."note" as "note","account_account"."write_uid" as "write_uid","account_account"."deprecated" as "deprecated","account_account"."company_id" as "company_id","account_account"."create_uid" as "create_uid","account_account"."create_date" as "create_date","account_account"."compacted" as "compacted","account_account"."code" as "code","account_account"."user_type_id" as "user_type_id","account_account"."id" as "id","account_account"."type_third_parties" as "type_third_parties","account_account"."last_time_entries_checked" as "last_time_entries_checked","account_account"."currency_id" as "currency_id","account_account"."write_date" as "write_date","account_account"."reconcile" as "reconcile" FROM "account_account"
WHERE "account_account".id IN (1, 4, 5, 6, 7) ORDER BY "account_account"."code" 
 
2023-03-24 12:04:12 WIB [4092-7] odoo@RLC ERROR: invalid page in block 8 of relation base/49632/2659 at character 22
2023-03-24 12:04:12 WIB [4092-8] odoo@RLC STATEMENT: SELECT count(1) FROM "account_account"

Avatar
Descartar
Autor Mejor respuesta

thanks, this solved 1 hour ago. i try fix posgre

$SET zero_damaged_pages = on;
$VACUUM FULL account_account;
$REINDEX TABLE account_account;
$REINDEX DATABASE account_accout;
$REINDEX SYSTEM db_name;

reboot server ,work again. 


thanks


Avatar
Descartar
Mejor respuesta

Hi Wimpy,

Based on the Odoo and PostgreSQL logs you provided, it seems that your database is corrupted and you are unable to access certain account-related models and expenses.

The error message in the Odoo log indicates an "invalid page in block 8 of relation base/49632/2659" while trying to execute a SELECT statement on the "account_account" table. This suggests that there might be some corruption or damage to the database at the physical level.

The first thing you should do is to take a backup of your database to prevent any further data loss. Once you have taken the backup, you can try to restore it on a test server and see if the issue persists.

If the issue persists, you can try running the Odoo database consistency check tool to see if it can detect and fix any errors in the database. To do this, you can run the following command:

odoo.py --database= --db-filter= --check-db

This command will check the database for consistency and report any errors that it finds. If there are any errors, it will try to fix them automatically.

If the database consistency check tool does not fix the issue, you can try to run the PostgreSQL utility called "pg_resetxlog" to reset the write-ahead log and clear any corruption in the database. To do this, you can follow these steps:

  1. Stop the Odoo service and make sure that there are no PostgreSQL processes running.
  2. Go to the PostgreSQL data directory and locate the file "PG_VERSION". This file contains the version number of your PostgreSQL installation.
  3. Open a terminal and run the following command, replacing the version number with the version number of your installation:

/path/to/postgresql/bin/pg_resetxlog /path/to/postgresql/data -o

  1. Start the PostgreSQL service and try to access the affected models in Odoo again.

Please note that running "pg_resetxlog" should only be done as a last resort, as it can cause data loss and other issues if not done correctly. Therefore, it is highly recommended to take a backup of your database before attempting this solution.

If none of the above solutions work, you may need to seek the help of an experienced Odoo and PostgreSQL administrator or developer to further diagnose and fix the issue.


Regards,

Ksolves Team!

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
oct 19
2353
1
nov 18
3020
1
ago 25
616
1
ago 25
333
2
ago 25
1498