From 864cdd87f1dc68d7c46533bdfe06719bb98ac4d8 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Fri, 29 Apr 2011 14:23:55 +0530 Subject: [PATCH] [FIX] account: invoices - missing field in tree view bzr revid: ara@tinyerp.com-20110429085355-uysrsn2scz8dsctt --- addons/account/account_invoice_view.xml | 2 +- addons/account/invoice.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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)