diff options
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/stock/stock.py | 4 | ||||
| -rw-r--r-- | addons/stock/stock_view.xml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py index dd531491c38..773f131f398 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1283,7 +1283,7 @@ class stock_picking(models.Model): for ops in operations: #for each operation, create the links with the stock move by seeking on the matching reserved quants, #and deffer the operation if there is some ambiguity on the move to select - if ops.package_id and not ops.product_id and (not done_qtys or ops.product_qty): + if ops.package_id and not ops.product_id and (not done_qtys or ops.qty_done): #entire package quant_ids = package_obj.get_content(cr, uid, [ops.package_id.id], context=context) for quant in quant_obj.browse(cr, uid, quant_ids, context=context): @@ -1298,7 +1298,7 @@ class stock_picking(models.Model): need_rereserve = True elif ops.product_id.id: #Check moves with same product - product_qty = done_qtys and ops.qty_done or ops.product_qty + product_qty = ops.qty_done if done_qtys else ops.product_qty qty_to_assign = uom_obj._compute_qty_obj(cr, uid, ops.product_uom_id, product_qty, ops.product_id.uom_id, context=context) for move_dict in prod2move_ids.get(ops.product_id.id, []): move = move_dict['move'] diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index b53f0b9bdd5..602d4919d0d 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -753,7 +753,6 @@ states="confirmed,assigned,waiting,partially_available"/> </tree> </field> - <button class="oe_link oe_right" name="put_in_pack" type="object" string="↳Put in Pack" attrs="{'invisible': [('state', 'in', ('done', 'cancel'))]}" groups="stock.group_tracking_lot"/> <field name="picking_type_entire_packs" invisible="1"/> <field name="pack_operation_pack_ids" attrs="{'invisible': [('pack_operation_pack_ids', '=', []), ('picking_type_entire_packs', '=', False)]}" context="{'default_picking_id': id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_picking_id': id}" groups="stock.group_tracking_lot"> <tree editable="bottom" colors="grey:qty_done>0;"> @@ -771,6 +770,7 @@ states="confirmed,assigned,waiting,partially_available"/> </tree> </field> + <button class="oe_link oe_right" name="put_in_pack" type="object" string="↳Put in Pack" attrs="{'invisible': [('state', 'in', ('done', 'cancel'))]}" groups="stock.group_tracking_lot"/> </page> <page string="Initial Demand" attrs="{'invisible': [('state', 'not in', ('draft', 'confirmed', 'waiting'))]}"> <field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree', 'default_picking_type_id': picking_type_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}"> |
