diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml index 9cab56fb073..c38b1f8829a 100644 --- a/addons/account/edi/invoice_action_data.xml +++ b/addons/account/edi/invoice_action_data.xml @@ -67,7 +67,7 @@ View Invoice - % if object.company_id.paypal_account: + % if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'): <% comp_name = quote(object.company_id.name) inv_number = quote(object.number) @@ -138,7 +138,7 @@ A new invoice is available for ${object.partner_id.name}: You can view the invoice document, download it and pay online using the following link: ${ctx.get('edi_web_url_view') or 'n/a'} -% if object.company_id.paypal_account: +% if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'): <% comp_name = quote(object.company_id.name) inv_number = quote(object.number) diff --git a/addons/edi/static/src/xml/edi.xml b/addons/edi/static/src/xml/edi.xml index 8c569011559..1e662a2b2cc 100644 --- a/addons/edi/static/src/xml/edi.xml +++ b/addons/edi/static/src/xml/edi.xml @@ -41,7 +41,7 @@
- +

diff --git a/addons/edi/static/src/xml/edi_account.xml b/addons/edi/static/src/xml/edi_account.xml index fcb9f89a98a..d9c9af9c401 100644 --- a/addons/edi/static/src/xml/edi_account.xml +++ b/addons/edi/static/src/xml/edi_account.xml @@ -124,7 +124,7 @@ - +

Pay Online