From 5706ff62df3da78a03b1fade4b99c4c887f63d7b Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Thu, 2 Jan 2020 18:26:46 +0000 Subject: [PATCH] [FIX] account: Set newly created template Before this commit, Creating New Template from "Send Invoice" wizard doesn't update template_id on the Wizard. In this commit, We write newly created template_id on the wizard. closes odoo/odoo#44561 X-original-commit: 454e6ed9d956ac131d6476c95e59b2ab390df5b6 Signed-off-by: Laurent Smet --- addons/account/wizard/account_invoice_send.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/wizard/account_invoice_send.py b/addons/account/wizard/account_invoice_send.py index d4bd9417bc2..a4e4a8802b9 100644 --- a/addons/account/wizard/account_invoice_send.py +++ b/addons/account/wizard/account_invoice_send.py @@ -120,6 +120,7 @@ class AccountInvoiceSend(models.TransientModel): def save_as_template(self): self.ensure_one() self.composer_id.save_as_template() + self.template_id = self.composer_id.template_id.id action = _reopen(self, self.id, self.model, context=self._context) action.update({'name': _('Send Invoice')}) return action