Denis Ledoux
b4a7996e96
[IMP] base, *: change the API of init hooks to pass env
...
This is mostly a cleaning/refactoring change.
The current API for init hooks (pre, post, uninstall) is to pass
`cr, registry`.
But the first thing which was done by most
post init and uninstall hooks was to create an env using
the cr passed
e.g.
`env = api.Environment(cr, SUPERUSER_ID, {})`
and the `registry` argument was unused in all these hooks,
completely.
By changing the API of hooks to pass `env` instead
of `cr, registry`, we gain in average two lines in every
hooks:
- the line creating the env `env = api.Environment(cr, SUPERUSER_ID, {})`
- the line importing `api` and `SUPERUSER_ID`
Therefore removing ~250 lines of repeated code lines accross odoo/odoo and
odoo/enterprise.
In addition to these lines removed,
it also ease the API of init hooks for Odoo developers,
who are used to that `env` and not so much how to create an `env`
from a cursor.
Part-of: odoo/odoo#108254
2023-02-01 10:25:01 +01:00
..
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 17:29:16 +01:00
2023-01-31 16:25:03 +01:00
2023-02-01 10:25:01 +01:00
2023-01-31 16:25:03 +01:00
2023-02-01 10:25:01 +01:00
2023-01-26 19:56:07 +01:00
2023-01-31 12:56:24 +01:00
2023-01-17 01:10:09 +01:00
2023-01-16 19:45:57 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-01-25 16:36:53 +01:00
2023-01-16 19:45:52 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 21:10:16 +01:00
2023-01-30 22:27:14 +01:00
2023-01-19 09:13:17 +01:00
2023-01-27 02:41:48 +01:00
2023-01-27 19:56:03 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 19:56:03 +01:00
2023-01-24 10:20:38 +01:00
2023-01-17 18:12:48 +01:00
2023-01-31 15:17:55 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2023-01-31 12:56:22 +01:00
2023-01-31 16:24:45 +01:00
2023-01-11 22:43:14 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 10:16:53 +01:00
2023-01-30 19:45:59 +01:00
2023-01-31 18:37:28 +01:00
2023-01-27 08:17:52 +01:00
2023-01-24 10:20:30 +01:00
2023-01-31 12:56:14 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 19:56:08 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-01-25 17:50:14 +01:00
2023-01-26 10:16:53 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-31 12:55:49 +01:00
2023-01-17 18:12:48 +01:00
2023-01-27 23:17:35 +01:00
2023-01-18 17:38:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-31 16:24:40 +01:00
2023-01-17 19:55:50 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-23 16:01:27 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-18 13:25:32 +01:00
2023-01-18 13:25:32 +01:00
2023-01-24 16:18:23 +01:00
2023-01-27 14:03:35 +01:00
2023-01-18 13:25:32 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-31 12:56:27 +01:00
2023-01-30 09:39:40 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-26 14:19:00 +01:00
2023-02-01 10:25:01 +01:00
2023-01-10 15:43:16 +01:00
2023-01-24 16:18:18 +01:00
2023-01-25 16:37:10 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-30 19:45:56 +01:00
2023-01-30 15:35:25 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:50 +01:00
2023-01-17 19:55:50 +01:00
2023-01-31 12:55:58 +01:00
2023-01-31 12:55:58 +01:00
2023-01-31 14:04:10 +01:00
2023-01-23 16:01:27 +01:00
2023-02-01 10:25:01 +01:00
2023-01-16 10:32:18 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-17 19:55:50 +01:00
2023-01-31 18:37:39 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-29 03:41:52 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-23 16:01:27 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-20 06:21:02 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 19:56:03 +01:00
2023-01-17 20:58:34 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-01-26 22:09:53 +01:00
2023-01-26 22:09:53 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-26 17:33:49 +01:00
2023-01-11 13:20:48 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-01-10 18:54:47 +01:00
2023-01-30 22:27:15 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-01-30 19:45:59 +01:00
2023-01-23 16:01:27 +01:00
2023-01-23 16:01:27 +01:00
2023-01-25 08:18:01 +01:00
2023-01-23 16:01:27 +01:00
2023-01-27 23:17:35 +01:00
2023-01-23 16:01:27 +01:00
2023-01-27 23:17:35 +01:00
2023-01-25 16:37:10 +01:00
2023-01-27 23:17:35 +01:00
2023-01-25 16:37:10 +01:00
2023-01-23 16:01:27 +01:00
2023-01-30 17:54:34 +01:00
2023-01-23 16:01:27 +01:00
2023-01-19 18:49:53 +01:00
2023-01-23 16:01:27 +01:00
2023-01-23 16:01:27 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 17:33:49 +01:00
2023-01-17 20:58:34 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-31 16:25:03 +01:00
2023-01-31 15:17:52 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 13:47:26 +01:00
2023-01-13 16:27:26 +01:00
2023-01-13 16:27:26 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 19:56:09 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 10:16:53 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-18 21:08:52 +01:00
2023-01-24 09:12:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-26 12:19:09 +01:00
2023-01-18 21:08:52 +01:00
2023-01-25 08:18:01 +01:00
2023-01-30 16:45:40 +01:00
2023-01-13 16:27:26 +01:00
2023-02-01 10:25:01 +01:00
2023-01-16 15:43:00 +01:00
2023-01-26 12:19:17 +01:00
2023-01-20 09:41:00 +01:00
2023-02-01 10:25:01 +01:00
2023-01-10 18:54:47 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 13:47:31 +01:00
2023-01-17 20:59:02 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-13 16:27:17 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 19:56:04 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 19:56:05 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 19:56:04 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:35 +01:00
2023-01-13 16:27:38 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 19:56:09 +01:00
2023-01-27 19:56:08 +01:00
2023-01-25 09:16:47 +01:00
2023-01-27 19:56:08 +01:00
2023-01-27 23:17:35 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-20 06:21:02 +01:00
2023-01-31 14:04:35 +01:00
2023-01-30 19:46:02 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 19:56:03 +01:00
2023-01-27 23:17:35 +01:00
2023-01-17 20:58:34 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-16 19:45:57 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-17 20:58:41 +01:00
2023-01-16 19:45:57 +01:00
2023-01-24 21:10:52 +01:00
2023-01-31 15:18:01 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-31 15:17:58 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-16 19:45:57 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-18 21:08:52 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-31 14:04:30 +01:00
2023-01-17 18:12:48 +01:00
2023-01-16 19:45:57 +01:00
2023-01-24 10:20:30 +01:00