summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwapnesh Shah <swapneshshah111@gmail.com>2020-01-02 18:26:46 +0000
committerGitHub <noreply@github.com>2020-02-04 09:55:06 +0000
commit5706ff62df3da78a03b1fade4b99c4c887f63d7b (patch)
treef59faba13beb9546a885cacea6424ce1d8c6f01e
parentc3151daea7256a8b967f8ebc747602c86bd0d804 (diff)
[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 <smetl@users.noreply.github.com>
-rw-r--r--addons/account/wizard/account_invoice_send.py1
1 files changed, 1 insertions, 0 deletions
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