[FIX] core: log full path in ir_logging when using postgresql handler
[FIX] core: log full path in ir_logging when using postgresql handler

When the PostgreSQLHandler is used to store some logs in the ir_logging
table of a database, the log record pathname is truncated to keep only
the relevant part of the path. In some circumstances, the path is
wrongly truncated, leading to totally invalid paths.

e.g.: When using an addon-path like `/data/build/enteprise` the removed
part correspond to the length of `/data/build/odoo/`. The resulting path
is `prise/....`.

With this commit, the full path is kept.

This commit is mainly a fix for the runbot logs and should not have an
impact on existing databases.

closes odoo/odoo#50246

X-original-commit: f3c96aa21ad0d8756fadc1608107438ba8cd6c05
Signed-off-by: Christophe Monniez (moc) <c96e125261f5e7e830d26ea98a02884db1f08bc3@odoo.com>

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo