From 25ee7aff549a86ffd1190c476ccbf0d66284f0c3 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Wed, 9 Mar 2011 11:19:13 +0530 Subject: [PATCH] [FIX] account: [6.0] invoice - must check if product is to_sell, to_purchase bzr revid: ara@tinyerp.com-20110309054913-ohllm2ppeyprk8n1 --- addons/account/account_invoice_view.xml | 4 ++-- addons/account/invoice.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index b41c4db08e9..2ef71e5014f 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -172,7 +172,7 @@ - + @@ -280,7 +280,7 @@ - + diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 290be952cee..9cda94efeea 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -1297,7 +1297,7 @@ class account_invoice_line(osv.osv): if context.get('type', False): doc = etree.XML(res['arch']) for node in doc.xpath("//field[@name='product_id']"): - if context['type'] in ('in_invoice','in_refund'): + if context['type'] in ('in_invoice', 'in_refund'): node.set('domain', "[('purchase_ok', '=', True)]") else: node.set('domain', "[('sale_ok', '=', True)]")