[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:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
# ------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user