Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2019-11-28 16:24:53 +01:00
commit 616623c4f9
81 changed files with 47 additions and 133269 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -67,9 +67,12 @@ if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
}
}
print '<span class="opacitymedium">';
print $langs->trans("SetupDescription1");
print $langs->trans("AreaForAdminOnly").' ';
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"))."<br><br>";
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"));
print '</span>';
print "<br><br>";
print '<br>';

View File

@ -693,7 +693,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content
$delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang);
print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('bom'));

View File

@ -1146,11 +1146,13 @@ class Categorie extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel.
* It is called by get_full_arbo()
* This function is a memory scan only from $this->cats and $this->motherof, no database access must be done here.
*
* @param int $id_categ id_categ entry to update
* @param int $protection Deep counter to avoid infinite loop
* @return void
* @see get_full_arbo()
*/
public function build_path_from_id_categ($id_categ, $protection = 1000)
{

View File

@ -7546,7 +7546,7 @@ abstract class CommonObject
{
if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)')
{
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE ref = '(PROV)' AND rowid = ".$this->id;
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".$this->id;
$resqlupdate = $this->db->query($sql);
if ($resqlupdate === false)

View File

@ -121,7 +121,7 @@ class modBom extends DolibarrModules
// 1=>array('BILLOFMATERIALS_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
// );
$this->const = array(
1=>array('BOM_ADDON_PDF', 'chaine', 'alpha', 'Name of PDF model of BOM', 0),
1=>array('BOM_ADDON_PDF', 'chaine', 'generic_bom_odt', 'Name of PDF model of BOM', 0),
2=>array('BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0),
3=>array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/boms', '', 0)
);

View File

@ -1960,3 +1960,4 @@ BaseOnSabeDavVersion=Based on the library SabreDAV version
NotAPublicIp=Not a public IP
MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation.
FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled
EmailTemplate=Template for email

View File

@ -541,7 +541,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->mymodule->myobject->read; // If you can read, you can build the PDF to read content
$delallowed = $user->rights->mymodule->myobject->create; // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('mymodule', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
print $formfile->showdocuments('mymodule', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
*/
// Show links to link elements

View File

@ -82,6 +82,8 @@ if ($id > 0 || !empty($ref))
}
$modulepart = 'produit';
$permissiontoadd = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));
/*
* Actions
@ -233,7 +235,6 @@ if ($object->id)
dol_fiche_end();
$permission = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';

View File

@ -1580,7 +1580,13 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul
print '</td>';
// User
print '<td class="right"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$objp->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$objp->login.'</a></td>';
print '<td class="right">';
if ($objp->user_id > 0) {
$userstatic = new User($db);
$userstatic->fetch($objp->user_id);
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
}
print '</td>';
// Action
if ($user->rights->produit->supprimer)
@ -1944,7 +1950,8 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
$userstatic = new User($db);
$userstatic->fetch($line->fk_user);
print '<td class="right">';
print $userstatic->getLoginUrl(1);
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
//print $userstatic->getLoginUrl(1);
print '</td>';
print '</tr>';
}
@ -2153,7 +2160,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
$userstatic = new User($db);
$userstatic->fetch($line->fk_user);
print '<td class="right">';
print $userstatic->getLoginUrl(1);
print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login');
print '</td>';
// Todo Edit or delete button

View File

@ -66,7 +66,24 @@ if ($action == "getProducts") {
}
}
elseif ($action == "search" && $term != '') {
$sql = 'SELECT rowid, ref, label, tosell, tobuy FROM '.MAIN_DB_PREFIX.'product';
// Define $filteroncategids, the filter on category ID if there is a Root category defined.
$filteroncategids = '';
if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) { // A root category is defined, we must filter on products inside this category tree
$object = new Categorie($db);
//$result = $object->fetch($conf->global->TAKEPOS_ROOT_CATEGORY_ID);
$arrayofcateg = $object->get_full_arbo('product', $conf->global->TAKEPOS_ROOT_CATEGORY_ID, 1);
if (is_array($arrayofcateg) && count($arrayofcateg) > 0) {
foreach($arrayofcateg as $val)
{
$filteroncategids .= ($filteroncategids ? ', ' : '').$val['id'];
}
}
}
$sql = 'SELECT rowid, ref, label, tosell, tobuy FROM '.MAIN_DB_PREFIX.'product as p';
if ($filteroncategids) {
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid AND cp.fk_categorie IN ('.$filteroncategids.')';
}
$sql .= ' WHERE entity IN ('.getEntity('product').')';
$sql .= ' AND tosell = 1';
$sql .= natural_search(array('ref', 'label', 'barcode'), $term);

View File

@ -93,6 +93,10 @@ div.wrapper2{
background-color:#fff;
}
img.imgwrapper {
max-width: 100%;
}
button:active{
background:black;
color: white;

View File

@ -2461,8 +2461,8 @@ class User extends CommonObject
$linkstart = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$this->id.'">';
$linkend = '</a>';
//Check user's rights to see an other user
if ((!$user->rights->user->user->lire && $this->id != $user->id)) $option = 'nolink';
//Check user's rights to see an other user
if ((!$user->rights->user->user->lire && $this->id != $user->id)) $option = 'nolink';
if ($option == 'xxx')
{