summaryrefslogtreecommitdiff
path: root/odoo
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-08-27 12:52:35 +0000
committerThibault Delavallée <tde@odoo.com>2020-08-27 14:29:54 +0000
commitf5df1ed912455e5ed52a65df3149f30a9d424de0 (patch)
treebf25cb5783f8e7f8a8e0c3d06b3489eb1544b4c5 /odoo
parent4a5fc70cfc3c86da33e2480fbd59c8f6d575c6e9 (diff)
[REF] mail: move generic methods from thread to BaseModel
PURPOSE Since v13 some commits added code in mail thread file. This file is already quite long and keeping it organized allow to understand its content. SPECIFICATIONS Some methods defined on mail.thread may actually be called on models not inheriting from mail.thread . Instead of having model methods on mail thread receiving a records parameter it seems better to have those available directly on BaseModel. Move static_message_track on BaseModel in models.py. This method is now called _mail_track, to be coherent with othe rmail-related naming. It is used in accounting to track values in line model that does not inherit from mail. thread. Update accounting accordingly (followup of d862965). Move _message_get_default_recipients_on_records in models.py. Renaming it _message_get_default_recipients() allow to be compatible with current behavior and current override available in some addons (like CRM, event, ...). Move _notify_get_reply_to_on_records in models.py. Renaming it _notify_get_reply_to() allows to be shorter and coherent. Move _alias_check_contact_on_record in models.py. Renaming it _alias_check_contact_() allows to be shorter and coherent. Its override in hr is also moved on BaseModel. Backward compatibility is kept for those methods as this PR target a mostly stable version. LINKS Task ID-2327096 (code cleaning) PR #56631
Diffstat (limited to 'odoo')
0 files changed, 0 insertions, 0 deletions