diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 6a0a29cb2fe..b1c5db23df6 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -306,7 +306,7 @@ class account_invoice(osv.osv):
if view_type == 'form':
if partner['supplier'] and not partner['customer']:
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name', '=', 'account.invoice.supplier.form')])
- else:
+ elif partner['customer'] and not partner['supplier']:
view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name', '=', 'account.invoice.form')])
if view_id and isinstance(view_id, (list, tuple)):
view_id = view_id[0]
diff --git a/addons/purchase/partner_view.xml b/addons/purchase/partner_view.xml
index d155f210ca8..87b40f398e6 100644
--- a/addons/purchase/partner_view.xml
+++ b/addons/purchase/partner_view.xml
@@ -47,6 +47,22 @@
+
+
+ Supplier Invoices
+ account.invoice
+ form
+ tree,form,graph
+ [('type','=','in_invoice')]
+ {'search_default_partner_id': active_id, 'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase'}
+
+ Click here to create Supplier invoice.
+ <p>
+ You can control the invoice from your supplier according to what you purchased or received.
+ <p>
+ OpenERP can also generate draft invoices automatically from purchase orders or receipts.
+
+ res.partner.view.purchase.buttons
@@ -59,6 +75,8 @@
+