[FIX] account : correct button title invoice email manually
Sending invoice in emails to customers now display View Journal Entry in v16.2 instead of view Invoice. Steps to reproduce the error : 1- Install accounting 2- Go to accounting/customers/invoices 3- Create an invoice and send it by email to the customer 4- View The email on mailhog The reason of the error was becayse we didn't provide model_descirption to the function of sending the email, so it will take the one by default whch is Journal Entry. opw-3289880 closes odoo/odoo#120480 X-original-commit: 21cab7ffa6a71a67b64d3a7e7a62a6599127343d Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
This commit is contained in:
@@ -355,6 +355,7 @@ class AccountMoveSend(models.Model):
|
||||
body = self.mail_body or self._get_default_mail_body(mail_template, mail_lang, move)
|
||||
subject = self.mail_subject or self._get_default_mail_subject(mail_template, mail_lang, move)
|
||||
email_from = self._get_default_email_from(mail_template, mail_lang, move)
|
||||
model_description = move.with_context(lang=mail_lang).type_name
|
||||
|
||||
self._send_mail(
|
||||
mail_template,
|
||||
@@ -365,6 +366,7 @@ class AccountMoveSend(models.Model):
|
||||
subtype_id=subtype.id,
|
||||
partner_ids=partners.ids,
|
||||
attachment_ids=attachment_ids,
|
||||
model_description=model_description,
|
||||
)
|
||||
|
||||
def _generate_documents_success_hook(self, moves, from_cron):
|
||||
|
||||
Reference in New Issue
Block a user