Skip to content

Commit

Permalink
[FIX] account,purchase,sale: wrong mail thread method signature
Browse files Browse the repository at this point in the history
Since 3eb9680, the signature of method
`_notify_by_email_prepare_rendering_context` has been changed to provide
a default values to `msg_vals` and some overrides were not adapted
(or have been added afterwards).

No true bug/issue has been found caused by that discrepancy, but for
consistency, this commit makes sure those overrides are adapted to
provide the same API as the parent method.

Fixes #162742

closes #163334

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
  • Loading branch information
Feyensv committed Apr 25, 2024
1 parent 3c7ee85 commit d4b3184
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addons/account/models/account_move.py
Expand Up @@ -4382,7 +4382,7 @@ def _creation_message(self):
'in_receipt': _('Purchase Receipt Created'),
}[self.move_type]

def _notify_by_email_prepare_rendering_context(self, message, msg_vals, model_description=False,
def _notify_by_email_prepare_rendering_context(self, message, msg_vals=False, model_description=False,
force_email_company=False, force_email_lang=False):
# EXTENDS mail mail.thread
render_context = super()._notify_by_email_prepare_rendering_context(
Expand Down
2 changes: 1 addition & 1 deletion addons/purchase/models/purchase.py
Expand Up @@ -386,7 +386,7 @@ def _notify_get_recipients_groups(self, msg_vals=None):

return groups

def _notify_by_email_prepare_rendering_context(self, message, msg_vals, model_description=False,
def _notify_by_email_prepare_rendering_context(self, message, msg_vals=False, model_description=False,
force_email_company=False, force_email_lang=False):
render_context = super()._notify_by_email_prepare_rendering_context(
message, msg_vals, model_description=model_description,
Expand Down
2 changes: 1 addition & 1 deletion addons/sale/models/sale_order.py
Expand Up @@ -1275,7 +1275,7 @@ def _notify_get_recipients_groups(self, msg_vals=None):

return groups

def _notify_by_email_prepare_rendering_context(self, message, msg_vals, model_description=False,
def _notify_by_email_prepare_rendering_context(self, message, msg_vals=False, model_description=False,
force_email_company=False, force_email_lang=False):
render_context = super()._notify_by_email_prepare_rendering_context(
message, msg_vals, model_description=model_description,
Expand Down

0 comments on commit d4b3184

Please sign in to comment.