In module MRP, creating or modifying a BOM, new lines doesn't show until page refresh. Modifying existing line doesn't show new values on save until page refresh.
Added or saved lines will show right away.
Go to MRP -> New bill of material -> Input name, product ant qty -> Create.
On the next screen, try add 脿 new line (select 脿 product, set qty and other values -> Click ADD button). The new line form is reset but the line (despite being correctly writed to database) does not show in the card. Reloading the BOM will show the line (Refreshing the page or navigate away and come back to this BOM).
Similar thing happen when modifying an existing line. New values doesn't show until page relaod.
+1
I confirm on v12.0.1, debian, french
Further confirm that this bug is still available in 12.0.2
+1
confirmed in 12.0.2, ubuntu 18.04, mariaDB 10.5
Ok, dont know why this issue has been closed but the problem still partially exist on 12.0.3.
The issue have been corrected on the line update but not on the line add.
Fortunately it's an easy fix, edit the file : /dolibar_root_folder/htdocs/bom/bom_card.php
Around line 181 / 186, change :
{
unset($_POST['idprod']);
unset($_POST['qty']);
unset($_POST['qty_frozen']);
unset($_POST['disable_stock_change']);
}
To
{
unset($_POST["idprod"]);
unset($_POST["qty"]);
unset($_POST["qty_frozen"]);
unset($_POST["disable_stock_change"]);
$object->fetchLines()
}
If you are on a version prior to 12.0.3 do the same thing around lines 223 / 229.
Simon3P that did the job, thanks for the easy fix. Hope this will be included in the next release
While the above code works their is still a redirecting issue when reloading the page.
it redirects to bom_card.php?id=27#addline this results in not showing the prices
it should redirect to bom_card.php?id=27
Most helpful comment
+1
I confirm on v12.0.1, debian, french