Missing user
This commit is contained in:
parent
a7e0fdba49
commit
a833c271e1
@ -140,9 +140,10 @@ class ProductAttributeValue
|
|||||||
/**
|
/**
|
||||||
* Creates a value for a product attribute
|
* Creates a value for a product attribute
|
||||||
*
|
*
|
||||||
|
* @param User $user Object user
|
||||||
* @return int <0 KO >0 OK
|
* @return int <0 KO >0 OK
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create(User $user)
|
||||||
{
|
{
|
||||||
if (!$this->fk_product_attribute) {
|
if (!$this->fk_product_attribute) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -65,7 +65,7 @@ if ($action == 'add')
|
|||||||
$objectval->ref = $ref;
|
$objectval->ref = $ref;
|
||||||
$objectval->value = $value;
|
$objectval->value = $value;
|
||||||
|
|
||||||
if ($objectval->create() > 0) {
|
if ($objectval->create($user) > 0) {
|
||||||
setEventMessage($langs->trans('RecordSaved'));
|
setEventMessage($langs->trans('RecordSaved'));
|
||||||
header('Location: '.DOL_URL_ROOT.'/variants/card.php?id='.$object->id);
|
header('Location: '.DOL_URL_ROOT.'/variants/card.php?id='.$object->id);
|
||||||
exit();
|
exit();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user