diff options
| author | Raphael Collet <rco@odoo.com> | 2020-09-03 09:17:26 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2020-09-03 09:17:26 +0000 |
| commit | e9e37091a65d5ae2caa9eb6728abaffb7c9555a8 (patch) | |
| tree | a9045da0be927e8608afee70b58118f2ebcdd97b /addons/website/__init__.py | |
| parent | d4b2e9224839aed8fc160ebe5a89e0f7d4c6a5bb (diff) | |
[IMP] core: deprecate method cr.after()
Use the more convenient `cr.postcommit.add()` instead.
closes odoo/odoo#56990
Related: odoo/enterprise#12914
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/website/__init__.py')
| -rw-r--r-- | addons/website/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website/__init__.py b/addons/website/__init__.py index 748058ff042..c4161c8635e 100644 --- a/addons/website/__init__.py +++ b/addons/website/__init__.py @@ -19,7 +19,8 @@ def uninstall_hook(cr, registry): ('name', '=', 'website_id'), ('model', '=', 'res.config.settings'), ]).unlink() - cr.after('commit', partial(rem_website_id_null, cr.dbname)) + + cr.postcommit.add(partial(rem_website_id_null, cr.dbname)) def post_init_hook(cr, registry): |
