Skip to content
Snippets Groups Projects
Commit 78b2aa4c authored by dut-odoo's avatar dut-odoo Committed by Yannick Tivisse
Browse files

[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`
parent 018144b8
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,12 @@
(<i>${object.partner_id.parent_id.name}</i>)
% endif
,</p>
<p>Here is your invoice <strong>${object.number}</strong>
<p>Here is your
% if object.number:
invoice <strong>${object.number}</strong>
% else:
pro-forma invoice
% endif
% if object.origin:
(with reference: ${object.origin} )
% endif
......
......@@ -347,9 +347,9 @@
<field name="arch" type="xml">
<form string="Invoice">
<header>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',True), ('state', 'not in', ('open', 'proforma', 'proforma2'))]}" class="oe_highlight" groups="base.group_user"/>
<button name="invoice_print" string="Print" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',False), ('state', 'not in', ('open', 'proforma', 'proforma2'))]}" groups="base.group_user"/>
<button name="invoice_print" string="Print Invoice" type="object" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
<button name="%(action_account_invoice_payment)d" type="action" states="open" string="Register Payment" groups="account.group_account_invoice" class="oe_highlight"/>
<button name="action_invoice_open" type="object" states="draft" string="Validate" class="oe_highlight" groups="account.group_account_invoice"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment