vault backup: 2024-01-31 08:41:41
This commit is contained in:
1 parent
cf3acfa34b
commit
a5a9d50fe0
3 files changed
+168
-160
No files matched your search
+167
-59
@@ -4,7 +4,10 @@ tags:
|
||||
---
|
||||
# Odoo Troubleshooting
|
||||
|
||||
## Odoo-Client-Fehler
|
||||
|
||||
## Client
|
||||
|
||||
### Odoo lcient error
|
||||
|
||||
**Problem**
|
||||
|
||||
@@ -21,64 +24,11 @@ _executeWindowAction/<@https://metallprojekt.mintsys.ch/web/content/625-ed50555/
|
||||
|
||||
**Solution**
|
||||
|
||||
Reassmble all assets. Alernatively delete assets entries.
|
||||
Reassemble all assets. Alternative delete assets entries.
|
||||
|
||||
## Python OSError
|
||||
## Modules
|
||||
|
||||
**Problem**
|
||||
|
||||
When generating a report with p3yo this error occurs:
|
||||
|
||||
```
|
||||
OSError: [Errno 8] Exec format error: '/usr/local/bin/libreoffice'
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
Apply shebang line `#!/bin/sh` in shell script.
|
||||
**
|
||||
|
||||
## wkhtmlpdf unpatched
|
||||
|
||||
**Problem**
|
||||
|
||||
```
|
||||
wkhtmltopdf: b'The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.'
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
|
||||
# Select an appropriate link for your system (32 or 64 bit) from the page https://wkhtmltopdf.org/downloads.html and past to the next line
|
||||
|
||||
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4\_linux-generic-amd64.tar.xz
|
||||
|
||||
tar xvf wkhtmltox\*.tar.xz
|
||||
|
||||
sudo mv wkhtmltox/bin/wkhtmlto\* /usr/bin
|
||||
|
||||
sudo apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig
|
||||
```
|
||||
|
||||
## Watch limit reached
|
||||
|
||||
**Problem**
|
||||
|
||||
```
|
||||
OSError(errno.ENOSPC, "inotify watch limit reached")
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
Temporary:
|
||||
|
||||
```bash
|
||||
sudo sysctl fs.inotify.max_user_watches=524288
|
||||
```
|
||||
|
||||
## Cannot unreserve product in stock
|
||||
### Cannot unreserve product in stock
|
||||
|
||||
**Problem**
|
||||
|
||||
@@ -95,7 +45,7 @@ See here for details: <https://www.odoo.com/de_DE/forum/hilfe-1/it-is-not-possib
|
||||
|
||||
The original script <https://gist.github.com/amoyaux/279aee13eaddacbddb435dafbc0a6295>.
|
||||
|
||||
## Wrong translation
|
||||
### Wrong translation
|
||||
|
||||
When opening the sale report it fails.
|
||||
|
||||
@@ -122,4 +72,162 @@ SyntaxError: invalid syntax
|
||||
|
||||
Reset the translated name of the report.
|
||||
|
||||
![[Odoo troubleshooting - wrong translation.png]]
|
||||
![[Odoo troubleshooting - wrong translation.png]]
|
||||
|
||||
### Python OSError
|
||||
|
||||
**Problem**
|
||||
|
||||
When generating a report with p3yo this error occurs:
|
||||
|
||||
```
|
||||
OSError: [Errno 8] Exec format error: '/usr/local/bin/libreoffice'
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
Apply shebang line `#!/bin/sh` in shell script.
|
||||
|
||||
## Server
|
||||
### wkhtmlpdf unpatched
|
||||
|
||||
**Problem**
|
||||
|
||||
```
|
||||
wkhtmltopdf: b'The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.'
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
|
||||
# Select an appropriate link for your system (32 or 64 bit) from the page https://wkhtmltopdf.org/downloads.html and past to the next line
|
||||
|
||||
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4\_linux-generic-amd64.tar.xz
|
||||
|
||||
tar xvf wkhtmltox\*.tar.xz
|
||||
|
||||
sudo mv wkhtmltox/bin/wkhtmlto\* /usr/bin
|
||||
|
||||
sudo apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Watch limit reached
|
||||
|
||||
**Problem**
|
||||
|
||||
```
|
||||
OSError(errno.ENOSPC, "inotify watch limit reached")
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
Temporary:
|
||||
|
||||
```bash
|
||||
sudo sysctl fs.inotify.max_user_watches=524288
|
||||
```
|
||||
|
||||
|
||||
## Upgrade
|
||||
### Cannot change data type from numeric to double precision
|
||||
|
||||
**Problem**
|
||||
|
||||
After the upgrade the restore to the local postgres instance fails with this error message:
|
||||
|
||||
```
|
||||
2024-01-23 05:05:41 INFO: Restore the dump file 'upgraded.dump' as the database 'erp_17.0'
|
||||
2024-01-23 05:06:36 ERROR: Error: The 'pg_restore' command has failed with the following output:
|
||||
pg_restore: while PROCESSING TOC:
|
||||
pg_restore: from TOC entry 14650; 2618 472738965 RULE report_project_task_user _RETURN db_1222611
|
||||
pg_restore: error: could not execute query: ERROR: cannot change data type of view column "delay_endings_days" from numeric to double precision
|
||||
Command was: CREATE OR REPLACE VIEW public.report_project_task_user AS
|
||||
SELECT ( SELECT 1) AS nbr,
|
||||
t.id,
|
||||
t.id AS task_id,
|
||||
t.active,
|
||||
t.create_date,
|
||||
t.date_assign,
|
||||
t.date_end,
|
||||
t.date_last_stage_update,
|
||||
t.date_deadline,
|
||||
t.project_id,
|
||||
t.priority,
|
||||
t.name,
|
||||
t.company_id,
|
||||
t.partner_id,
|
||||
t.parent_id,
|
||||
t.stage_id,
|
||||
t.state,
|
||||
t.milestone_id,
|
||||
CASE
|
||||
WHEN (pm.id IS NOT NULL) THEN true
|
||||
ELSE false
|
||||
END AS has_late_and_unreached_milestone,
|
||||
t.description,
|
||||
NULLIF(t.rating_last_value, (0)::double precision) AS rating_last_value,
|
||||
avg(rt.rating) AS rating_avg,
|
||||
t.working_days_close,
|
||||
t.working_days_open,
|
||||
t.working_hours_open,
|
||||
t.working_hours_close,
|
||||
(EXTRACT(epoch FROM (t.date_deadline - (now() AT TIME ZONE 'UTC'::text))) / ((3600 * 24))::numeric) AS delay_endings_days,
|
||||
count(td.task_id) AS dependent_ids_count,
|
||||
CASE
|
||||
WHEN (COALESCE(t.allocated_hours, (0)::double precision) = (0)::double precision) THEN (0.0)::double precision
|
||||
ELSE LEAST(((t.effective_hours * (100)::double precision) / t.allocated_hours), (100)::double precision)
|
||||
END AS progress,
|
||||
t.effective_hours,
|
||||
((t.allocated_hours - t.effective_hours) - t.subtask_effective_hours) AS remaining_hours,
|
||||
CASE
|
||||
WHEN (t.allocated_hours > (0)::double precision) THEN (t.remaining_hours / t.allocated_hours)
|
||||
ELSE (0)::double precision
|
||||
END AS remaining_hours_percentage,
|
||||
t.allocated_hours,
|
||||
t.overtime,
|
||||
t.total_hours_spent,
|
||||
t.planned_date_begin,
|
||||
t.sale_line_id,
|
||||
t.sale_order_id,
|
||||
sol.remaining_hours AS remaining_hours_so
|
||||
FROM ((((public.project_task t
|
||||
LEFT JOIN public.rating_rating rt ON (((rt.res_id = t.id) AND ((rt.res_model)::text = 'project.task'::text) AND (rt.consumed = true) AND (rt.rating >= (1)::double precision))))
|
||||
LEFT JOIN public.project_milestone pm ON (((pm.id = t.milestone_id) AND (pm.is_reached = false) AND (pm.deadline <= (now())::date))))
|
||||
LEFT JOIN public.task_dependencies_rel td ON ((td.depends_on_id = t.id)))
|
||||
LEFT JOIN public.sale_order_line sol ON ((t.id = sol.task_id)))
|
||||
WHERE (t.project_id IS NOT NULL)
|
||||
GROUP BY t.id, t.active, t.create_date, t.date_assign, t.date_end, t.date_last_stage_update, t.date_deadline, t.project_id, t.priority, t.name, t.company_id, t.partner_id, t.parent_id, t.stage_id, t.state, t.rating_last_value, t.working_days_close, t.working_days_open, t.working_hours_open, t.working_hours_close, t.milestone_id, pm.id, td.depends_on_id, t.effective_hours, t.subtask_effective_hours, t.allocated_hours, t.overtime, t.total_hours_spent, t.planned_date_begin, t.sale_line_id, t.sale_order_id, sol.remaining_hours;
|
||||
|
||||
|
||||
pg_restore: warning: errors ignored on restore: 2
|
||||
```
|
||||
|
||||
**Cause**
|
||||
|
||||
This error is mostly likely connect with the wrong psql version.
|
||||
|
||||
This versions have been confirmed to work:
|
||||
|
||||
```
|
||||
➜ Odoo-Build git:(16.0) ✗ pg_restore -V
|
||||
pg_restore (PostgreSQL) 13.6 (Ubuntu 13.6-0ubuntu0.21.10.1)
|
||||
➜ Odoo-Build git:(16.0) ✗ pg_dump -V
|
||||
pg_dump (PostgreSQL) 13.6 (Ubuntu 13.6-0ubuntu0.21.10.1)
|
||||
```
|
||||
|
||||
And these versions did not:
|
||||
|
||||
```bash
|
||||
laszlokr@mintsystem:~/work/mintsystem/Odoo-Build$ pg_restore -V
|
||||
pg_restore (PostgreSQL) 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)
|
||||
laszlokr@mintsystem:~/work/mintsystem/Odoo-Build$ pg_dump -V
|
||||
pg_dump (PostgreSQL) 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
If required downgrade the psql tools.
|
||||
@@ -118,103 +118,3 @@ Deploy the upgraded database.
|
||||
|
||||
Restore the upgraded database.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Cannot change data type from numeric to double precision
|
||||
|
||||
**Problem**
|
||||
|
||||
After the upgrade the restore to the local postgres instance fails with this error message:
|
||||
|
||||
```
|
||||
2024-01-23 05:05:41 INFO: Restore the dump file 'upgraded.dump' as the database 'erp_17.0'
|
||||
2024-01-23 05:06:36 ERROR: Error: The 'pg_restore' command has failed with the following output:
|
||||
pg_restore: while PROCESSING TOC:
|
||||
pg_restore: from TOC entry 14650; 2618 472738965 RULE report_project_task_user _RETURN db_1222611
|
||||
pg_restore: error: could not execute query: ERROR: cannot change data type of view column "delay_endings_days" from numeric to double precision
|
||||
Command was: CREATE OR REPLACE VIEW public.report_project_task_user AS
|
||||
SELECT ( SELECT 1) AS nbr,
|
||||
t.id,
|
||||
t.id AS task_id,
|
||||
t.active,
|
||||
t.create_date,
|
||||
t.date_assign,
|
||||
t.date_end,
|
||||
t.date_last_stage_update,
|
||||
t.date_deadline,
|
||||
t.project_id,
|
||||
t.priority,
|
||||
t.name,
|
||||
t.company_id,
|
||||
t.partner_id,
|
||||
t.parent_id,
|
||||
t.stage_id,
|
||||
t.state,
|
||||
t.milestone_id,
|
||||
CASE
|
||||
WHEN (pm.id IS NOT NULL) THEN true
|
||||
ELSE false
|
||||
END AS has_late_and_unreached_milestone,
|
||||
t.description,
|
||||
NULLIF(t.rating_last_value, (0)::double precision) AS rating_last_value,
|
||||
avg(rt.rating) AS rating_avg,
|
||||
t.working_days_close,
|
||||
t.working_days_open,
|
||||
t.working_hours_open,
|
||||
t.working_hours_close,
|
||||
(EXTRACT(epoch FROM (t.date_deadline - (now() AT TIME ZONE 'UTC'::text))) / ((3600 * 24))::numeric) AS delay_endings_days,
|
||||
count(td.task_id) AS dependent_ids_count,
|
||||
CASE
|
||||
WHEN (COALESCE(t.allocated_hours, (0)::double precision) = (0)::double precision) THEN (0.0)::double precision
|
||||
ELSE LEAST(((t.effective_hours * (100)::double precision) / t.allocated_hours), (100)::double precision)
|
||||
END AS progress,
|
||||
t.effective_hours,
|
||||
((t.allocated_hours - t.effective_hours) - t.subtask_effective_hours) AS remaining_hours,
|
||||
CASE
|
||||
WHEN (t.allocated_hours > (0)::double precision) THEN (t.remaining_hours / t.allocated_hours)
|
||||
ELSE (0)::double precision
|
||||
END AS remaining_hours_percentage,
|
||||
t.allocated_hours,
|
||||
t.overtime,
|
||||
t.total_hours_spent,
|
||||
t.planned_date_begin,
|
||||
t.sale_line_id,
|
||||
t.sale_order_id,
|
||||
sol.remaining_hours AS remaining_hours_so
|
||||
FROM ((((public.project_task t
|
||||
LEFT JOIN public.rating_rating rt ON (((rt.res_id = t.id) AND ((rt.res_model)::text = 'project.task'::text) AND (rt.consumed = true) AND (rt.rating >= (1)::double precision))))
|
||||
LEFT JOIN public.project_milestone pm ON (((pm.id = t.milestone_id) AND (pm.is_reached = false) AND (pm.deadline <= (now())::date))))
|
||||
LEFT JOIN public.task_dependencies_rel td ON ((td.depends_on_id = t.id)))
|
||||
LEFT JOIN public.sale_order_line sol ON ((t.id = sol.task_id)))
|
||||
WHERE (t.project_id IS NOT NULL)
|
||||
GROUP BY t.id, t.active, t.create_date, t.date_assign, t.date_end, t.date_last_stage_update, t.date_deadline, t.project_id, t.priority, t.name, t.company_id, t.partner_id, t.parent_id, t.stage_id, t.state, t.rating_last_value, t.working_days_close, t.working_days_open, t.working_hours_open, t.working_hours_close, t.milestone_id, pm.id, td.depends_on_id, t.effective_hours, t.subtask_effective_hours, t.allocated_hours, t.overtime, t.total_hours_spent, t.planned_date_begin, t.sale_line_id, t.sale_order_id, sol.remaining_hours;
|
||||
|
||||
|
||||
pg_restore: warning: errors ignored on restore: 2
|
||||
```
|
||||
|
||||
**Cause**
|
||||
|
||||
This error is mostly likely connect with the wrong psql version.
|
||||
|
||||
This versions have been confirmed to work:
|
||||
|
||||
```
|
||||
➜ Odoo-Build git:(16.0) ✗ pg_restore -V
|
||||
pg_restore (PostgreSQL) 13.6 (Ubuntu 13.6-0ubuntu0.21.10.1)
|
||||
➜ Odoo-Build git:(16.0) ✗ pg_dump -V
|
||||
pg_dump (PostgreSQL) 13.6 (Ubuntu 13.6-0ubuntu0.21.10.1)
|
||||
```
|
||||
|
||||
And these versions did not:
|
||||
|
||||
```bash
|
||||
laszlokr@mintsystem:~/work/mintsystem/Odoo-Build$ pg_restore -V
|
||||
pg_restore (PostgreSQL) 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)
|
||||
laszlokr@mintsystem:~/work/mintsystem/Odoo-Build$ pg_dump -V
|
||||
pg_dump (PostgreSQL) 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
If required downgrade the psql tools.
|
||||
+1
-1
@@ -6,7 +6,7 @@ tags:
|
||||
|
||||
Ein Odoo Upgrade ist ein iterativer Prozess. Im Upgrade-Prozess wird die Odoo-Umgebung in der Entwicklungsumgebung bereitgestellt und mit den Upgrade-Skripten aktualisiert. Module von Dritten werden installiert, aktualisiert oder entfernt. Abhängig von der Odoo Version werden Einstellungen und Anpassungen hinzugefügt oder entfernt. Die aktualisierte Odoo Datenbank wird in der Testumgebung bereitgestellt und mit dem Kunden getestet. Gemeldete Fehler und Feedback fliessen zurück in den Upgrade-Prozess und werden mit dem Odoo Support koordiniert. Wurde die Testumgebung freigegeben, kann das produktive Upgrade an einem Stichtag durchgeführt werden.
|
||||
|
||||
Siehe [[Odoo Community Upgrade]] und [[Odoo Enterprise Upgrade]].
|
||||
Siehe [[Odoo Community Upgrade]], [[Odoo Enterprise Upgrade]], [[Odoo Troubleshooting]].
|
||||
|
||||
## Prozessbeschreibung
|
||||
|
||||
|
||||
Reference in new issue
Block a user