Permalink
Browse files

[IMP]

  • Loading branch information...
kic-odoo committed Feb 11, 2019
1 parent 9abf0c9 commit e505fc9b8550894377d34e0a154e58a090ebb5b9
Showing with 3 additions and 2 deletions.
  1. +3 −2 addons/stock/models/stock_move.py
@@ -1168,13 +1168,14 @@ def _split_mts(self):
for dest_move in self.move_dest_ids:
if dest_move.procure_method == 'make_to_order':
qty_split = dest_move.product_uom_qty - dest_move.reserved_availability
if qty_split == dest_move.product_uom_qty:
decimal_precision = self.env['decimal.precision'].precision_get('Product Unit of Measure')
if float_compare(qty_split, dest_move.product_uom_qty, precision_digits=decimal_precision) == 0:
dest_move.write({
'move_orig_ids': [(5, 0, 0)],
'procure_method': 'make_to_stock',
})
dest_move._action_assign()
elif qty_split > 0:
elif float_round(qty_split, precision_digits=decimal_precision) > 0:
new_move = dest_move._split(qty_split)
rec = self.env['stock.move'].browse(new_move)
rec.write({

0 comments on commit e505fc9

Please sign in to comment.