diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index ede327f3884..ed45c705674 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -123,7 +123,7 @@
-
+
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index a8fe0baeecc..679799f2cc1 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -319,11 +319,11 @@ class account_invoice(osv.osv):
doc.remove(node)
if view_type == 'tree':
- partner_string = _('Supplier')
- if context.get('type', 'in_invoice') in ('out_invoice', 'out_refund'):
- partner_string = _('Customer')
+ partner_string = _('Customer')
+ if context.get('type', 'out_invoice') in ('in_invoice', 'in_refund'):
+ partner_string = _('Supplier')
for node in doc.xpath("//field[@name='reference']"):
- doc.remove(node)
+ node.set('invisible', '0')
for node in doc.xpath("//field[@name='partner_id']"):
node.set('string', partner_string)
res['arch'] = etree.tostring(doc)