[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>
This commit is contained in:
Swapnesh Shah
2020-02-04 09:55:06 +00:00
committed by GitHub
parent c3151daea7
commit 5706ff62df
@@ -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