diff options
| author | Adrian Torres <adt@odoo.com> | 2018-06-11 09:47:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-11 09:47:34 +0200 |
| commit | 503b8ed6925eddc36afd05683eaaad1a93312c8d (patch) | |
| tree | 06f26ae173a08b792ef5bd32779de0f9561b5fdb /addons/website/models/ir_model_fields.py | |
| parent | c0aacce182790ed909cc3b556826e3276a21a565 (diff) | |
[FIX] *: cleanup (un|re)installation hacks
Replace hacks introduced in V11 by the proper solution.
Diffstat (limited to 'addons/website/models/ir_model_fields.py')
| -rw-r--r-- | addons/website/models/ir_model_fields.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/addons/website/models/ir_model_fields.py b/addons/website/models/ir_model_fields.py deleted file mode 100644 index 51f5c2a7dc5..00000000000 --- a/addons/website/models/ir_model_fields.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details - -from odoo import models - - -# This is a nasty hack, targeted for V11 only -class IrModelFields(models.Model): - _inherit = 'ir.model.fields' - - def unlink(self): - # Prevent the deletion of some `shared` fields... -_- - social = ( - 'social_facebook', - 'social_github', - 'social_googleplus', - 'social_linkedin', - 'social_twitter', - 'social_youtube', - ) - - self = self.filtered( - lambda rec: not ( - (rec.model == 'res.company' and rec.name in social) - or (rec.model == 'res.config.settings' - and rec.name == 'auth_signup_uninvited') - ) - ) - return super(IrModelFields, self).unlink() |
