From 78b2aa4ce5972e27cbef902a6d8567ffe8253d61 Mon Sep 17 00:00:00 2001
From: dut-odoo
Date: Fri, 21 Oct 2016 18:29:59 +0530
Subject: [PATCH] [IMP] account: show send by email button on invoice for
pro-forma stage too
- when we send invoice by email, the template shows `False` at invoice number,
we will show `pro-forma` invoice instead of `False`
---
addons/account/data/email_template_data_invoice.xml | 7 ++++++-
addons/account/views/account_invoice_view.xml | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/addons/account/data/email_template_data_invoice.xml b/addons/account/data/email_template_data_invoice.xml
index 41731b7c527..68ddbfa230a 100644
--- a/addons/account/data/email_template_data_invoice.xml
+++ b/addons/account/data/email_template_data_invoice.xml
@@ -25,7 +25,12 @@
(${object.partner_id.parent_id.name})
% endif
,
-Here is your invoice ${object.number}
+
Here is your
+% if object.number:
+invoice ${object.number}
+% else:
+pro-forma invoice
+% endif
% if object.origin:
(with reference: ${object.origin} )
% endif
diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml
index e1da859f9d0..40feb8caa75 100644
--- a/addons/account/views/account_invoice_view.xml
+++ b/addons/account/views/account_invoice_view.xml
@@ -347,9 +347,9 @@