From 29b8919a4000e1957defdee0039e1091aa947ca3 Mon Sep 17 00:00:00 2001
From: atm-robin <robin.jaquet@atm-consulting.fr>
Date: Mon, 26 Oct 2015 14:34:46 +0100
Subject: [PATCH] FIX supplier rights for orderToInvoice

---
 htdocs/fourn/commande/orderstoinvoice.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php
index 083ea05bc64..b63b3d9dd1d 100644
--- a/htdocs/fourn/commande/orderstoinvoice.php
+++ b/htdocs/fourn/commande/orderstoinvoice.php
@@ -44,7 +44,7 @@ $langs->load('orders');
 $langs->load('deliveries');
 $langs->load('companies');
 
-if (! $user->rights->facture->creer)
+if (! $user->rights->fournisseur->facture->creer)
 	accessforbidden();
 
 $id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST("facid")); // For backward compatibility
-- 
GitLab