summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorArnold Moyaux <arm@odoo.com>2018-12-10 12:24:44 +0000
committerArnold Moyaux <arm@odoo.com>2018-12-10 12:43:39 +0000
commitb0d79b980295c724f9c12bb9991772845776adb0 (patch)
tree5119a04a737a3e80716dfe191a16c05e1a9c9a3c /addons/web/static/src/js/fields/basic_fields.js
parentbc38850c96972988992821cffed6e5d957a51ec0 (diff)
[FIX] stock, mrp: log less activity on PC type
Usecase to reproduce: - Set manufacture step to 2 or 3 steps - Create a MO - Go on the PC picking and validate some quantities w/h BO Traceback because there is no documents to log the activity. It happens because the function used in groupby and sorted (in the method _log_less_quantities_than_expected) expect a picking. The purpose of _log_less_quantities_than_expected is to generate an activity on the next picking in order to notify that some quantities will be missing due to the cancelation of the back order. In order to find the following picking it uses the destination moves from the current's picking moves. Picking w/h BO Next Picking (activity to post) | | moves -----------> destination moves However in the case of 'pick components' picking type(PC) the destination moves are linked to a manufacturing order and not a picking. So it _log_activity_get_documents return an empty parent since picking_id is False. In order to fix it, _log_activity_get_documents only add the tuple (object where the activity should be log, responsible for the activity) if the object is not False. It also add a hook in order to add (mo_id, repsonsible) during _log_less_quantities_than_expected on top of (picking_id, repsonsible) in order to log activity on MO directly linked to PC. This commit also add a missing precision_rounding in backorder confirmation opw-1908753 closes odoo/odoo#29385
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions