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/mail/wizard/mail_compose_message.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/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 2abc898f368..c997294df3c 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -135,8 +135,7 @@ class MailComposer(models.TransientModel): ('notification', 'System notification')], 'Type', required=True, default='comment', help="Message type: email for email message, notification for system " - "message, comment for other messages such as user replies", - oldname='type') + "message, comment for other messages such as user replies") subtype_id = fields.Many2one( 'mail.message.subtype', 'Subtype', ondelete='set null', index=True, default=lambda self: self.env['ir.model.data'].xmlid_to_res_id('mail.mt_comment')) |
