Merge pull request #11933 from atm-gauthier/fix_conf_to_allow_changeproducttype
FIX : change product type must be allowed if we activate hidden conf
This commit is contained in:
commit
4928a999a0
@ -12,7 +12,6 @@
|
|||||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
|
||||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||||
*
|
*
|
||||||
@ -1614,7 +1613,9 @@ else
|
|||||||
{
|
{
|
||||||
// TODO change for compatibility with edit in place
|
// TODO change for compatibility with edit in place
|
||||||
$typeformat='select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
|
$typeformat='select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
|
||||||
print '<tr><td class="titlefield">'.$form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat).'</td><td colspan="2">';
|
print '<tr><td class="titlefield">';
|
||||||
|
print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type');
|
||||||
|
print '</td><td colspan="2">';
|
||||||
print $form->editfieldval("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat);
|
print $form->editfieldval("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user