diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 7e7cd9d6507..f6ce6e0823a 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -226,7 +226,7 @@ class account_voucher(osv.osv): if context.get('type', 'sale') in ('purchase', 'payment'): nodes = doc.xpath("//field[@name='partner_id']") for node in nodes: - node.set('context', "{'search_default_supplier': 1}") + node.set('context', "{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}") if context.get('invoice_type','') in ('in_invoice', 'in_refund'): node.set('string', _("Supplier")) res['arch'] = etree.tostring(doc)