[FIX] account,purchase,sale: wrong mail thread method signature

Since 3eb9680602, 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 odoo/odoo#163418

X-original-commit: d4b31842d6c3e1c5c86d9019a353601914ebf1f7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
Victor Feyens
2024-04-26 10:05:20 +00:00
parent cf16b96ae0
commit 27ef7d571b
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -4786,7 +4786,7 @@ class AccountMove(models.Model):
'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(
+1 -1
View File
@@ -376,7 +376,7 @@ class PurchaseOrder(models.Model):
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,
+1 -1
View File
@@ -1495,7 +1495,7 @@ class SaleOrder(models.Model):
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,