Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: .travis.yml
This commit is contained in:
commit
3757d7e952
@ -416,7 +416,7 @@ script:
|
|||||||
php step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
|
php step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
|
||||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
|
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
|
||||||
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
|
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
|
||||||
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
|
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log
|
||||||
ls -alrt $TRAVIS_BUILD_DIR/
|
ls -alrt $TRAVIS_BUILD_DIR/
|
||||||
|
|
||||||
- |
|
- |
|
||||||
|
|||||||
@ -94,12 +94,12 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as s on p.rowid = s.fk_product";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as s on p.rowid = s.fk_product";
|
||||||
$sql .= ' WHERE p.entity IN ('.getEntity($productstatic->element).')';
|
$sql .= ' WHERE p.entity IN ('.getEntity($productstatic->element).')';
|
||||||
$sql .= " AND p.tosell = 1 AND p.seuil_stock_alerte > 0";
|
$sql .= " AND p.seuil_stock_alerte > 0";
|
||||||
if (empty($user->rights->produit->lire)) {
|
if (empty($user->rights->produit->lire)) {
|
||||||
$sql .= ' AND p.fk_product_type != 0';
|
$sql .= ' AND p.fk_product_type <> 0';
|
||||||
}
|
}
|
||||||
if (empty($user->rights->service->lire)) {
|
if (empty($user->rights->service->lire)) {
|
||||||
$sql .= ' AND p.fk_product_type != 1';
|
$sql .= ' AND p.fk_product_type <> 1';
|
||||||
}
|
}
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
if (is_object($hookmanager)) {
|
if (is_object($hookmanager)) {
|
||||||
|
|||||||
@ -129,7 +129,7 @@ $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'com
|
|||||||
// Common permissions
|
// Common permissions
|
||||||
$usercanread = ($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire);
|
$usercanread = ($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire);
|
||||||
$usercancreate = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
|
$usercancreate = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
|
||||||
$usercandelete = ($user->rights->fournisseur->commande->supprimer || $user->rights->supplier_order->supprimer);
|
$usercandelete = (($user->rights->fournisseur->commande->supprimer || $user->rights->supplier_order->supprimer) || ($usercancreate && isset($object->statut) && $object->statut == $object::STATUS_DRAFT));
|
||||||
|
|
||||||
// Advanced permissions
|
// Advanced permissions
|
||||||
$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_order_advance->validate)));
|
$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_order_advance->validate)));
|
||||||
@ -2582,14 +2582,14 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Cancel
|
// Cancel
|
||||||
if ($object->statut == 2) {
|
if ($object->statut == CommandeFournisseur::STATUS_ACCEPTED) {
|
||||||
if ($usercanorder) {
|
if ($usercanorder) {
|
||||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel">'.$langs->trans("CancelOrder").'</a>';
|
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel">'.$langs->trans("CancelOrder").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if (!empty($usercandelete) || ($object->statut == CommandeFournisseur::STATUS_DRAFT && !empty($usercancreate))) {
|
if (!empty($usercandelete)) {
|
||||||
if ($hasreception) {
|
if ($hasreception) {
|
||||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("ReceptionExist").'">'.$langs->trans("Delete").'</a>';
|
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("ReceptionExist").'">'.$langs->trans("Delete").'</a>';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1602,7 +1602,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||||||
}
|
}
|
||||||
// cssfile is a relative path
|
// cssfile is a relative path
|
||||||
$urlforcss = dol_buildpath($cssfile, 1);
|
$urlforcss = dol_buildpath($cssfile, 1);
|
||||||
if ($urlforcss) {
|
if ($urlforcss && $urlforcss != '/') {
|
||||||
print '<!-- Includes CSS added by module '.$modcss.' -->'."\n".'<link rel="stylesheet" type="text/css" href="'.$urlforcss;
|
print '<!-- Includes CSS added by module '.$modcss.' -->'."\n".'<link rel="stylesheet" type="text/css" href="'.$urlforcss;
|
||||||
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
||||||
if (!preg_match('/\.css$/i', $cssfile)) {
|
if (!preg_match('/\.css$/i', $cssfile)) {
|
||||||
@ -1746,7 +1746,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||||||
foreach ($filesjs as $jsfile) {
|
foreach ($filesjs as $jsfile) {
|
||||||
// jsfile is a relative path
|
// jsfile is a relative path
|
||||||
$urlforjs = dol_buildpath($jsfile, 1);
|
$urlforjs = dol_buildpath($jsfile, 1);
|
||||||
if ($urlforjs) {
|
if ($urlforjs && $urlforjs != '/') {
|
||||||
print '<!-- Include JS added by module '.$modjs.'-->'."\n".'<script src="'.$urlforjs.((strpos($jsfile, '?') === false) ? '?' : '&').'lang='.$langs->defaultlang.'"></script>'."\n";
|
print '<!-- Include JS added by module '.$modjs.'-->'."\n".'<script src="'.$urlforjs.((strpos($jsfile, '?') === false) ? '?' : '&').'lang='.$langs->defaultlang.'"></script>'."\n";
|
||||||
} else {
|
} else {
|
||||||
dol_syslog("Warning: module ".$modjs." declared a js path file for a file we can't find.", LOG_WARNING);
|
dol_syslog("Warning: module ".$modjs." declared a js path file for a file we can't find.", LOG_WARNING);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user