Romain Derie
a6bf6cf44d
[FIX] website, test_website: prevent fuzzy search to crash with inherits
...
This commit ensures that when searching on a `inherits` field of
a model (like `name` of `website.page`), it works properly when
`pg_trgm` is activated.
Indeed, `name` is a field of `website.page` record but only at the ORM
level, not in SQL, due to how `inherits` works.
So, when the `pg_trgm` extension is enabled, it will switch from ORM
queries to raw SQL query (to use the native SQL similarity feature and
not our custom python/orm one, as obviously the SQL one is better, more
powerfull/accurate and faster).
But this will actually make the code fail when searching on fields from
a model which has `inherits` and that you search on that `inherits`
model fields.
Note that in 15.2, the `pg_trgm` extension is auto installed when
possible thanks to [1] and [2].
[1]: https://github.com/odoo/odoo/commit/eedf37d6e286b995c47b946be1a6b66817094eff
[2]: https://github.com/odoo/odoo/commit/75e6b645acdc95aece506ce0249fd0760838281c
opw-3063592
closes odoo/odoo#107178
X-original-commit: 3d978caad9de2010603581687ee39a5240b74074
Signed-off-by: Romain Derie (rde) <rde@odoo.com >
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com >
2022-12-04 23:41:55 +01:00
..
2022-12-04 23:41:52 +01:00
2022-12-04 23:41:52 +01:00
2022-10-04 07:28:57 +02:00
2022-11-28 15:52:59 +01:00
2022-10-09 22:04:00 +02:00
2022-11-29 17:22:56 +01:00
2022-09-24 15:00:56 +02:00
2022-09-20 13:48:49 +02:00
2022-11-29 17:22:54 +01:00
2022-11-11 17:54:39 +01:00
2022-11-23 21:56:09 +01:00
2022-10-25 18:44:57 +02:00
2022-12-04 17:58:01 +01:00
2022-09-17 00:51:32 +02:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-09-16 20:51:56 +02:00
2022-09-16 20:51:56 +02:00
2022-12-02 14:40:25 +01:00
2022-10-11 13:15:12 +02:00
2022-10-06 14:56:52 +02:00
2022-12-02 14:40:25 +01:00
2022-11-24 19:25:14 +01:00
2022-11-09 16:08:07 +01:00
2022-11-25 10:52:12 +01:00
2022-10-21 17:17:07 +02:00
2022-11-21 11:50:23 +01:00
2022-09-20 13:48:49 +02:00
2022-09-30 09:31:52 +02:00
2022-11-07 11:26:33 +01:00
2022-11-21 21:18:53 +01:00
2022-12-01 17:32:36 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-11-29 13:20:31 +01:00
2022-11-25 18:55:05 +01:00
2022-12-01 16:27:47 +01:00
2022-11-07 22:38:56 +01:00
2022-11-24 13:29:05 +01:00
2022-12-02 16:41:50 +01:00
2022-11-30 15:06:30 +01:00
2022-12-02 14:40:25 +01:00
2022-11-06 02:16:48 +01:00
2022-11-14 16:21:55 +01:00
2022-11-29 13:20:31 +01:00
2022-12-02 14:40:25 +01:00
2022-09-20 13:48:49 +02:00
2022-10-06 18:00:49 +02:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-10-07 11:13:17 +02:00
2022-11-15 13:01:29 +01:00
2022-10-07 21:43:23 +02:00
2022-11-17 14:56:42 +01:00
2022-12-02 14:40:25 +01:00
2022-11-25 08:52:07 +01:00
2022-10-04 07:28:57 +02:00
2022-09-28 20:29:50 +02:00
2022-11-25 17:56:31 +01:00
2022-10-25 16:11:59 +02:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-12-01 09:11:48 +01:00
2022-12-04 17:58:01 +01:00
2022-09-30 09:32:23 +02:00
2022-11-22 08:34:55 +01:00
2022-12-02 14:40:28 +01:00
2022-11-29 09:32:48 +01:00
2022-09-30 09:31:52 +02:00
2022-10-21 11:09:14 +02:00
2022-10-21 11:09:22 +02:00
2022-11-14 17:18:02 +01:00
2022-12-02 14:40:25 +01:00
2022-11-30 12:13:55 +01:00
2022-12-02 14:40:25 +01:00
2022-10-06 19:04:28 +02:00
2022-09-29 09:08:50 +02:00
2022-09-14 20:25:01 +02:00
2022-12-02 19:49:57 +01:00
2022-11-30 20:03:11 +01:00
2022-12-01 17:32:33 +01:00
2022-11-29 14:22:59 +01:00
2022-10-21 12:06:04 +02:00
2022-11-21 11:50:26 +01:00
2022-11-22 11:28:58 +01:00
2022-09-26 09:36:02 +02:00
2022-12-02 14:40:25 +01:00
2022-09-20 13:48:49 +02:00
2022-12-01 16:27:44 +01:00
2022-09-20 13:48:49 +02:00
2022-11-29 17:22:56 +01:00
2022-10-25 18:44:57 +02:00
2022-11-02 11:38:38 +01:00
2022-12-04 14:32:15 +01:00
2022-11-11 17:54:39 +01:00
2022-10-04 13:29:08 +02:00
2022-11-29 16:19:46 +01:00
2022-11-30 11:08:58 +01:00
2022-09-13 13:53:04 +02:00
2022-09-13 13:53:04 +02:00
2022-10-04 13:29:08 +02:00
2022-10-04 13:29:08 +02:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-10-25 18:44:57 +02:00
2022-10-04 13:29:08 +02:00
2022-12-04 14:32:15 +01:00
2022-10-19 16:09:55 +02:00
2022-11-15 18:25:45 +01:00
2022-11-15 18:25:45 +01:00
2022-11-21 19:55:05 +01:00
2022-10-04 13:29:08 +02:00
2022-10-04 13:29:08 +02:00
2022-10-04 13:29:08 +02:00
2022-11-29 13:20:31 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 17:44:15 +01:00
2022-12-02 14:40:25 +01:00
2022-10-04 13:29:08 +02:00
2022-12-02 22:04:54 +01:00
2022-10-28 09:17:43 +02:00
2022-11-30 21:43:15 +01:00
2022-10-08 17:02:51 +02:00
2022-11-10 22:22:01 +01:00
2022-11-29 16:19:46 +01:00
2022-11-29 13:20:31 +01:00
2022-11-11 17:54:39 +01:00
2022-10-21 11:09:14 +02:00
2022-11-11 17:54:39 +01:00
2022-11-11 17:54:39 +01:00
2022-10-04 13:29:08 +02:00
2022-09-13 13:53:04 +02:00
2022-09-16 11:12:29 +02:00
2022-10-04 13:29:08 +02:00
2022-12-02 14:40:25 +01:00
2022-09-13 13:53:04 +02:00
2022-11-14 17:17:53 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-09-14 20:25:01 +02:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-10-04 13:29:08 +02:00
2022-12-02 14:40:25 +01:00
2022-09-27 12:43:44 +02:00
2022-11-25 17:56:37 +01:00
2022-11-23 16:14:45 +01:00
2022-11-11 17:54:39 +01:00
2022-12-04 23:41:53 +01:00
2022-09-30 22:54:47 +02:00
2022-10-04 13:29:08 +02:00
2022-11-11 17:54:39 +01:00
2022-09-13 13:53:04 +02:00
2022-10-04 13:29:08 +02:00
2022-09-24 15:00:56 +02:00
2022-12-02 14:40:25 +01:00
2022-11-29 13:20:31 +01:00
2022-11-04 09:52:54 +01:00
2022-10-07 12:41:12 +02:00
2022-10-04 13:29:08 +02:00
2022-10-25 16:12:15 +02:00
2022-12-01 16:27:39 +01:00
2022-11-24 19:25:21 +01:00
2022-10-04 13:29:08 +02:00
2022-09-13 13:53:04 +02:00
2022-11-30 20:03:40 +01:00
2022-12-01 18:30:46 +01:00
2022-10-25 13:03:28 +02:00
2022-10-24 13:05:52 +02:00
2022-11-11 17:54:39 +01:00
2022-11-11 17:54:39 +01:00
2022-10-04 13:29:08 +02:00
2022-09-13 13:53:04 +02:00
2022-10-04 13:29:08 +02:00
2022-11-18 12:58:22 +01:00
2022-10-04 13:29:08 +02:00
2022-10-04 13:29:08 +02:00
2022-10-25 21:20:50 +02:00
2022-10-04 13:29:08 +02:00
2022-11-11 17:54:39 +01:00
2022-10-04 13:29:08 +02:00
2022-09-13 13:53:04 +02:00
2022-10-10 16:11:01 +02:00
2022-11-30 12:13:52 +01:00
2022-09-20 13:48:49 +02:00
2022-12-02 14:40:25 +01:00
2022-12-02 16:41:50 +01:00
2022-10-31 18:52:59 +01:00
2022-11-11 17:54:39 +01:00
2022-11-28 15:52:59 +01:00
2022-09-24 15:00:56 +02:00
2022-11-24 12:26:01 +01:00
2022-12-02 14:40:25 +01:00
2022-10-06 14:56:52 +02:00
2022-09-20 13:48:49 +02:00
2022-12-01 16:27:52 +01:00
2022-09-20 13:48:49 +02:00
2022-11-25 17:56:31 +01:00
2022-10-25 16:11:59 +02:00
2022-12-02 14:40:25 +01:00
2022-11-18 14:00:11 +01:00
2022-12-02 13:41:53 +01:00
2022-11-14 13:01:57 +01:00
2022-11-16 13:23:41 +01:00
2022-10-05 14:26:14 +02:00
2022-12-01 17:32:22 +01:00
2022-11-06 02:16:48 +01:00
2022-11-11 17:54:39 +01:00
2022-12-02 14:40:25 +01:00
2022-12-01 14:34:07 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 17:22:54 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-25 18:55:20 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-09-24 15:00:56 +02:00
2022-11-25 10:52:01 +01:00
2022-09-20 13:48:49 +02:00
2022-12-02 14:40:25 +01:00
2022-11-11 17:54:39 +01:00
2022-11-14 12:03:51 +01:00
2022-12-01 16:28:00 +01:00
2022-12-02 14:40:25 +01:00
2022-11-09 16:08:07 +01:00
2022-12-02 14:40:25 +01:00
2022-09-14 21:22:05 +02:00
2022-12-02 14:40:25 +01:00
2022-11-11 17:54:39 +01:00
2022-11-11 17:54:39 +01:00
2022-11-29 13:20:31 +01:00
2022-11-13 21:54:40 +01:00
2022-11-03 16:43:36 +01:00
2022-12-01 16:27:58 +01:00
2022-12-02 14:40:25 +01:00
2022-09-20 13:48:49 +02:00
2022-12-02 14:40:25 +01:00
2022-09-20 13:48:49 +02:00
2022-11-24 21:54:48 +01:00
2022-11-25 17:55:59 +01:00
2022-12-02 19:49:57 +01:00
2022-11-09 21:17:46 +01:00
2022-09-24 15:00:56 +02:00
2022-11-04 10:54:57 +01:00
2022-10-17 10:11:09 +02:00
2022-10-08 13:30:24 +02:00
2022-12-02 14:40:25 +01:00
2022-12-04 17:58:01 +01:00
2022-09-20 13:48:49 +02:00
2022-11-25 17:55:59 +01:00
2022-11-25 18:55:40 +01:00
2022-10-05 19:38:45 +02:00
2022-12-02 14:40:25 +01:00
2022-11-18 15:00:56 +01:00
2022-11-25 18:55:35 +01:00
2022-12-01 17:32:28 +01:00
2022-12-04 23:41:50 +01:00
2022-11-10 13:15:39 +01:00
2022-09-27 12:43:50 +02:00
2022-11-29 09:32:45 +01:00
2022-11-09 23:33:27 +01:00
2022-11-09 23:33:27 +01:00
2022-12-02 14:40:25 +01:00
2022-11-24 10:02:53 +01:00
2022-11-09 16:08:19 +01:00
2022-10-09 22:03:50 +02:00
2022-11-25 17:55:59 +01:00
2022-11-30 20:03:12 +01:00
2022-11-07 14:52:51 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-10-17 12:13:25 +02:00
2022-12-02 14:40:25 +01:00
2022-12-03 02:23:07 +01:00
2022-12-02 14:40:25 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-28 14:51:24 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-11-29 13:20:31 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-11-18 17:03:56 +01:00
2022-09-20 13:48:49 +02:00
2022-12-01 08:13:38 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 16:41:50 +01:00
2022-10-10 16:11:01 +02:00
2022-11-21 22:20:27 +01:00
2022-11-21 22:20:27 +01:00
2022-12-02 16:41:50 +01:00
2022-11-24 12:26:01 +01:00
2022-11-25 18:55:21 +01:00
2022-10-26 00:55:05 +02:00
2022-11-25 18:55:20 +01:00
2022-10-04 16:01:19 +02:00
2022-12-01 17:32:22 +01:00
2022-12-04 23:41:55 +01:00
2022-10-06 00:37:25 +02:00
2022-09-24 15:00:56 +02:00
2022-10-06 14:56:52 +02:00
2022-12-02 14:40:25 +01:00
2022-12-02 10:11:23 +01:00
2022-10-27 14:41:17 +02:00
2022-11-29 11:33:55 +01:00
2022-10-27 14:41:17 +02:00
2022-12-04 23:41:55 +01:00
2022-11-29 13:20:31 +01:00
2022-11-28 00:25:44 +01:00
2022-12-02 14:40:25 +01:00
2022-11-25 18:55:29 +01:00
2022-10-12 10:35:05 +02:00
2022-12-02 16:41:50 +01:00
2022-09-20 13:48:49 +02:00
2022-09-24 15:00:56 +02:00
2022-09-20 13:48:49 +02:00
2022-11-09 16:08:07 +01:00
2022-12-02 14:40:25 +01:00
2022-10-12 10:35:05 +02:00
2022-11-04 14:00:24 +01:00
2022-10-10 19:03:15 +02:00
2022-12-02 14:40:25 +01:00
2022-09-20 13:48:49 +02:00
2022-09-14 20:25:01 +02:00
2022-11-03 16:43:45 +01:00
2022-11-29 13:20:31 +01:00
2022-11-07 11:26:33 +01:00
2022-09-14 20:25:01 +02:00
2022-10-10 16:11:01 +02:00
2022-12-02 14:40:25 +01:00
2022-11-24 19:25:14 +01:00
2022-11-24 19:25:14 +01:00
2022-11-24 19:25:14 +01:00
2022-09-20 13:48:49 +02:00
2022-12-01 16:27:52 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-10-06 14:56:52 +02:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-11-11 17:54:39 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-11-14 14:20:29 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-11-10 09:50:40 +01:00
2022-11-04 16:59:54 +01:00
2022-12-02 14:40:25 +01:00
2022-10-24 14:12:34 +02:00
2022-11-11 17:54:39 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00