summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/model.js
diff options
context:
space:
mode:
authorMitali Patel <mpa@odoo.com>2015-08-12 16:27:34 +0530
committerMartin Trigaux <mat@odoo.com>2016-03-17 15:36:54 +0100
commit7b1d655d8cead801397ca2a2dd9712255f34c99e (patch)
tree8cafc807a3236ed495288aecb4ea1073f5b30aae /addons/web/static/src/js/framework/model.js
parentf4f6e6c5dd76af769ac2782670b45371a9447ae8 (diff)
[FIX] mrp_byproduct: correctly handle fixed quantities
If the fixed quantity was higher than the produced quantity, the quantity of the manufacturing order was used for the byproducts instead of the one specified on the BoM. This bug was due to the computation of the subfactor (`_get_subproduct_factor` in mrp, because I love the modularity) that was computing remaining quantity, only considering the variable quantities cases. In fixed quantity, the MO quantity being lower than the byproduct quantity, it was never fully produced. Corrected the test to correctly check the quantities and handle the usecase with an higher quantity in fixed byproduct. Added a field subproduct_id on the stock.move object that allows to easily find the attributes of the mrp.subproduct item without making hacky (and probably wrong in case of more than one byproduct) search to find it back. Closes #8031
Diffstat (limited to 'addons/web/static/src/js/framework/model.js')
0 files changed, 0 insertions, 0 deletions