title: insertion amount of a newly created product
body: <p>I'm creating a product on prestashop, I enter the amount with this function:</p>
  
  <pre><code>echo "1";
  StockAvailable::setQuantity($id_prod, 0, $quantity,1);
  echo "2";
  </code></pre>
  
  <p>the result is:</p>
  
  <pre><code>1fatal error
  </code></pre>
  
  <p>going on the backend, the product is and the amount set correctly.
  How can I avoid the "fatal error"?
  Report me error here: classes/Product.php in line 2582: if (!$id_cart &amp;&amp; !isset($context->employee)) die(Tools::displayError()); </p>
  
  <p>This code is in the function "getPriceStatic". It is normal that it is pulled to perform "StockAvailable::setQuantity"?</p>
  
  <p>I have not changed classes and I do not override</p>