diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-08-05 09:07:26 +0000 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-08-05 09:36:41 +0000 |
| commit | 886eca0131716e137e60a1e398a9fc3996dfa425 (patch) | |
| tree | 00ac8640600ae255631c768dff54cc3ff9efad49 /addons/fetchmail/models/mail_mail.py | |
| parent | 0033659ff4c6efac8209d5fec9d0f4f02b2bbebd (diff) | |
[IMP] *: remove usage of `oldname` attribute
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.
Moreover, this feature was misused. It was:
- left on fields during multiple versions.
- used on reports (SQL views). This would be ok if the feature was
complete, but, as is, it was useless.
- kept unchanged after a second renaming of the field (which can happen
versions later the first rename).
- used, even when the meaning of the field changed. i.e. the field
`archived` has been renamed to the classic `active`, but the value
in the database should be switched.
Diffstat (limited to 'addons/fetchmail/models/mail_mail.py')
| -rw-r--r-- | addons/fetchmail/models/mail_mail.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/fetchmail/models/mail_mail.py b/addons/fetchmail/models/mail_mail.py index 79f47d8dd12..88a977c247d 100644 --- a/addons/fetchmail/models/mail_mail.py +++ b/addons/fetchmail/models/mail_mail.py @@ -7,4 +7,4 @@ from odoo import fields, models class MailMail(models.Model): _inherit = 'mail.mail' - fetchmail_server_id = fields.Many2one('fetchmail.server', "Inbound Mail Server", readonly=True, index=True, oldname='server_id') + fetchmail_server_id = fields.Many2one('fetchmail.server', "Inbound Mail Server", readonly=True, index=True) |
