From ea9ff60a7539568fb1c6923ee195d4214a4847c8 Mon Sep 17 00:00:00 2001 From: svs-odoo Date: Wed, 18 Dec 2019 13:04:40 +0000 Subject: [PATCH] [FIX] stock: show move lines with quantity done Before this commit, pickings of picking type with `show_reserved` on False don't show pre-fill moves -what is expected- even if those pre-fill moves have quantity done -what is less wanted and can happened, with stock_barcode for example. With this commit, we continue to hide pre-fill moves for this kind of picking, except for pre-fill moves who have a quantity done. --- addons/stock/models/stock_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py index ae056a00594..80db78749e0 100644 --- a/addons/stock/models/stock_move.py +++ b/addons/stock/models/stock_move.py @@ -140,7 +140,7 @@ class StockMove(models.Model): picking_type_id = fields.Many2one('stock.picking.type', 'Operation Type', check_company=True) inventory_id = fields.Many2one('stock.inventory', 'Inventory', check_company=True) move_line_ids = fields.One2many('stock.move.line', 'move_id') - move_line_nosuggest_ids = fields.One2many('stock.move.line', 'move_id', domain=[('product_qty', '=', 0.0)]) + move_line_nosuggest_ids = fields.One2many('stock.move.line', 'move_id', domain=['|', ('product_qty', '=', 0.0), ('qty_done', '!=', 0.0)]) origin_returned_move_id = fields.Many2one('stock.move', 'Origin return move', copy=False, help='Move that created the return move', check_company=True) returned_move_ids = fields.One2many('stock.move', 'origin_returned_move_id', 'All returned moves', help='Optional: all returned moves created from this move') reserved_availability = fields.Float(