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

Conflicts:
	htdocs/core/class/commondocgenerator.class.php
This commit is contained in:
Laurent Destailleur 2020-08-04 13:43:00 +02:00
commit 30560397e4
2 changed files with 18 additions and 2 deletions

View File

@ -459,11 +459,26 @@ if (empty($reshook))
if ($idprod > 0)
{
$label = $productsupplier->label;
// Define output language
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$outputlangs = $langs;
$newlang = '';
if (empty($newlang) && GETPOST('lang_id', 'aZ09'))
$newlang = GETPOST('lang_id', 'aZ09');
if (empty($newlang))
$newlang = $object->thirdparty->default_lang;
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$desc = (!empty($productsupplier->multilangs [$outputlangs->defaultlang] ["description"])) ? $productsupplier->multilangs [$outputlangs->defaultlang] ["description"] : $productsupplier->description;
} else {
$desc = $productsupplier->description;
}
// if we use supplier description of the products
if (!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) {
$desc = $productsupplier->desc_supplier;
} else $desc = $productsupplier->description;
}
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION));

View File

@ -78,6 +78,7 @@ $cancel != $langs->trans("Cancel") &&
$object->label = $_POST["libelle"];
$object->description = dol_htmlcleanlastbr($_POST["desc"]);
$object->other = dol_htmlcleanlastbr($_POST["other"]);
$object->update($object->id, $user);
}
else
{