NEW : conf to use next product/service ref when we clone a product/service
Conflicts: htdocs/langs/en_US/admin.lang htdocs/langs/fr_FR/admin.lang htdocs/product/admin/product.php
This commit is contained in:
parent
c42859e85a
commit
900c287de4
@ -1392,6 +1392,7 @@ ModifyProductDescAbility=Personalization of product descriptions in forms
|
||||
ViewProductDescInFormAbility=Visualization of product descriptions in the forms (otherwise as popup tooltip)
|
||||
MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal
|
||||
ViewProductDescInThirdpartyLanguageAbility=Visualization of products descriptions in the thirdparty language
|
||||
UseMaskOnClone=Use product next ref when we clone a product%s (available if mask configured)
|
||||
UseSearchToSelectProductTooltip=Also if you have a large number of product (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
||||
UseSearchToSelectProduct=Use a search form to choose a product (rather than a drop-down list).
|
||||
UseEcoTaxeAbility=Support Eco-Taxe (WEEE)
|
||||
|
||||
@ -1392,6 +1392,7 @@ ModifyProductDescAbility=Personnalisation des descriptions produits dans les for
|
||||
ViewProductDescInFormAbility=Visualisation des descriptions produits dans les formulaires (sinon en tant que bulle d'aide)
|
||||
MergePropalProductCard=Ajoute dans l'onglet Fichiers joints des produits/services, une option pour fusionner le document PDF du produit au PDF des propositions Azur si le produit/services est inclut dans la proposition.
|
||||
ViewProductDescInThirdpartyLanguageAbility=Visualisation des descriptions produits dans la langue du tiers
|
||||
UseMaskOnClone=Utiliser la prochaine référence lors du clonage d'un produit%s (disponible si le masque est configuré ci-dessus)
|
||||
UseSearchToSelectProductTooltip=Si vous avez un nombre important de produits (>100 000), vous pourrez améliorer les performances en positionnant la constante PRODUCT_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limité au début des chaines.
|
||||
UseSearchToSelectProduct=Utilisez un champ avec auto-complétion pour choisir les produits (plutôt qu'une liste déroulante).
|
||||
UseEcoTaxeAbility=Prise en charge des éco-taxes (DEEE)
|
||||
|
||||
@ -169,6 +169,11 @@ else if ($action == 'usesearchtoselectproduct')
|
||||
$usesearch = GETPOST('activate_usesearchtoselectproduct','alpha');
|
||||
$res = dolibarr_set_const($db, "PRODUIT_USE_SEARCH_TO_SELECT", $usesearch,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
else if ($action == 'useMaskOnClone')
|
||||
{
|
||||
$usemask = GETPOST('activate_useMaskOnClone','alpha');
|
||||
$res = dolibarr_set_const($db, "PRODUIT_USE_MASK_ON_CLONE", $usemask,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
else if ($action == 'set')
|
||||
{
|
||||
$const = "PRODUCT_SPECIAL_".strtoupper(GETPOST('spe','alpha'));
|
||||
@ -439,6 +444,21 @@ print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
// Pouvoir utiliser la numérotation configurée dans le masque produit lors du clonage d'un produit
|
||||
$var=!$var;
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="useMaskOnClone">';
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("UseMaskOnClone", $conf->service->enabled ? '/service' : '').'</td>';
|
||||
print '<td width="60" align="right">';
|
||||
print $form->selectyesno("activate_useMaskOnClone",$conf->global->PRODUIT_USE_MASK_ON_CLONE,1);
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
// Activate propal merge produt card
|
||||
/* disabled. PRODUIT_PDF_MERGE_PROPAL can be added manually. Still did not understand how this feature works.
|
||||
$var=!$var;
|
||||
|
||||
@ -1601,11 +1601,25 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
// Load object modCodeProduct
|
||||
$module=(! empty($conf->global->PRODUCT_CODEPRODUCT_ADDON)?$conf->global->PRODUCT_CODEPRODUCT_ADDON:'mod_codeproduct_leopard');
|
||||
if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php')
|
||||
{
|
||||
$module = substr($module, 0, dol_strlen($module)-4);
|
||||
}
|
||||
$result=dol_include_once('/core/modules/product/'.$module.'.php');
|
||||
if ($result > 0)
|
||||
{
|
||||
$modCodeProduct = new $module();
|
||||
}
|
||||
|
||||
$tmpcode='';
|
||||
if (! empty($modCodeProduct->code_auto) && $conf->global->PRODUIT_USE_MASK_ON_CLONE) $tmpcode=$modCodeProduct->getNextValue($object,$object->type);
|
||||
|
||||
// Define confirmation messages
|
||||
$formquestionclone=array(
|
||||
'text' => $langs->trans("ConfirmClone"),
|
||||
array('type' => 'text', 'name' => 'clone_ref','label' => $langs->trans("NewRefForClone"), 'value' => $langs->trans("CopyOf").' '.$object->ref, 'size'=>24),
|
||||
array('type' => 'text', 'name' => 'clone_ref','label' => $langs->trans("NewRefForClone"), 'value' => empty($tmpcode) ? $langs->trans("CopyOf").' '.$object->ref : $tmpcode, 'size'=>24),
|
||||
array('type' => 'checkbox', 'name' => 'clone_content','label' => $langs->trans("CloneContentProduct"), 'value' => 1),
|
||||
array('type' => 'checkbox', 'name' => 'clone_prices', 'label' => $langs->trans("ClonePricesProduct").' ('.$langs->trans("FeatureNotYetAvailable").')', 'value' => 0, 'disabled' => true),
|
||||
array('type' => 'checkbox', 'name' => 'clone_composition', 'label' => $langs->trans('CloneCompositionProduct'), 'value' => 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user