[IMP] mail: concatenate all Base class code in a single override

Merge two overrides of Base into the same file. Just moving code to clean
module, nothing changes functionally or technically.

LINKS

Task ID-2431217
COM PR odoo/odoo#67322
ENT PR odoo/enterprise#16876
UPG PR odoo/upgrade#2236
This commit is contained in:
Thibault Delavallée
2021-05-26 07:43:50 +00:00
parent 14036869c7
commit 3ffd6acc02
2 changed files with 7 additions and 11 deletions
-11
View File
@@ -5,17 +5,6 @@ from odoo import _, api, fields, models
from odoo.exceptions import UserError
class Base(models.AbstractModel):
_inherit = 'base'
def _valid_field_parameter(self, field, name):
# allow tracking on abstract models; see also 'mail.thread'
return (
name == 'tracking' and self._abstract
or super()._valid_field_parameter(field, name)
)
class IrModel(models.Model):
_inherit = 'ir.model'
_order = 'is_mail_thread DESC, name ASC'
+7
View File
@@ -9,6 +9,13 @@ from odoo import api, models, tools, _
class BaseModel(models.AbstractModel):
_inherit = 'base'
def _valid_field_parameter(self, field, name):
# allow tracking on abstract models; see also 'mail.thread'
return (
name == 'tracking' and self._abstract
or super()._valid_field_parameter(field, name)
)
# ------------------------------------------------------------
# GENERIC MAIL FEATURES
# ------------------------------------------------------------