diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index ae8afe696bc..4938ec3e033 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -279,7 +279,7 @@ if ($id > 0 || $ref) // Status (to sell) print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { - print ajax_productonoff($product->id, 'status'); + print ajax_object_onoff($product, 'status'); } else { print $product->getLibStatut(2,0); } @@ -288,7 +288,7 @@ if ($id > 0 || $ref) // Status (to buy) print ''.$langs->trans("Status").' ('.$langs->trans("Buy").')'; if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { - print ajax_productonoff($product->id, 'status_buy'); + print ajax_object_onoff($product, 'status_buy'); } else { print $product->getLibStatut(2,1); }