'Force picking in order to be set as done.'

def _force_picking_done(self, picking):

    self.ensure_one()
    contains_tracked_products = any([(product_id.tracking != 'none') for product_id in self.lines.mapped('product_id')])
    if contains_tracked_products:
        picking.action_confirm()
    else:
        picking.action_assign()
    picking.force_assign()
    self.set_pack_operation_lot(picking)
    if (not contains_tracked_products):
        picking.action_done()
